Mercurial > pymonkey
diff src/context.cpp @ 140:ce8099238c01
As per a discussion with jorendorff, it looks like we can pass NULL to compile_script(), since we're not using object principals (and instead just using an object capability model for now).
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 24 Aug 2009 21:53:39 -0700 |
parents | b4e216d06e83 |
children | 5d53f6293a81 |
line wrap: on
line diff
--- a/src/context.cpp Mon Aug 24 11:39:58 2009 -0700 +++ b/src/context.cpp Mon Aug 24 21:53:39 2009 -0700 @@ -315,22 +315,19 @@ PYM_compileScript(PYM_JSContextObject *self, PyObject *args) { PYM_SANITY_CHECK(self->runtime); - PYM_JSObject *object; char *source = NULL; int sourceLen; const char *filename; int lineNo; - if (!PyArg_ParseTuple(args, "O!es#si", &PYM_JSObjectType, &object, - "utf-16", &source, &sourceLen, &filename, &lineNo)) + if (!PyArg_ParseTuple(args, "es#si", "utf-16", &source, &sourceLen, + &filename, &lineNo)) return NULL; PYM_UTF16String str(source, sourceLen); - PYM_ENSURE_RUNTIME_MATCH(self->runtime, object->runtime); - JSScript *script; - script = JS_CompileUCScript(self->cx, object->obj, str.jsbuffer, + script = JS_CompileUCScript(self->cx, NULL, str.jsbuffer, str.jslen, filename, lineNo); if (script == NULL) {