diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 704a8d7af6aa..66ec82e91f01 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -2482,6 +2482,7 @@ js_CloneFunctionObject(JSContext *cx, JSFunction *fun, JSObject *parent, JS_ASSERT(script->compartment != cx->compartment); JS_OPT_ASSERT(script->ownerObject == fun); + cfun->u.i.script = NULL; JSScript *cscript = js_CloneScript(cx, script); if (!cscript) return NULL;