Fix bug 584180.

This commit is contained in:
Blake Kaplan 2010-08-11 14:35:07 -07:00
parent ac88c9a7d5
commit 5ba7037a43

View File

@ -420,13 +420,21 @@ GetScopeFunction(JSContext *cx, JSObject *outerObj)
return nsnull;
}
if (JSVAL_IS_OBJECT(v)) {
return JSVAL_TO_OBJECT(v);
JSObject *unsafeObj = GetUnsafeObject(cx, outerObj);
JSObject *scopeobj = JS_GetGlobalForObject(cx, unsafeObj);
OBJ_TO_INNER_OBJECT(cx, scopeobj);
if (!scopeobj) {
return nsnull;
}
JSObject *unsafeObj = GetUnsafeObject(cx, outerObj);
JSFunction *fun = JS_NewFunction(cx, DummyNative, 0, 0,
JS_GetGlobalForObject(cx, unsafeObj),
if (JSVAL_IS_OBJECT(v)) {
JSObject *funobj = JSVAL_TO_OBJECT(v);
if (JS_GetGlobalForObject(cx, funobj) == scopeobj) {
return funobj;
}
}
JSFunction *fun = JS_NewFunction(cx, DummyNative, 0, 0, scopeobj,
"SJOWContentBoundary");
if (!fun) {
return nsnull;