mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 618871 - Try again to fix accessing content constructors from chrome through Xray wrappers. r=jst@mozilla.com, a=blocker
This commit is contained in:
parent
b195811fd6
commit
617e140f0e
@ -6115,8 +6115,19 @@ GetXPCProto(nsIXPConnect *aXPConnect, JSContext *cx, nsGlobalWindow *aWin,
|
||||
}
|
||||
NS_ENSURE_TRUE(ci, NS_ERROR_UNEXPECTED);
|
||||
|
||||
return aXPConnect->GetWrappedNativePrototype(cx, aWin->GetGlobalJSObject(),
|
||||
ci, aProto);
|
||||
nsresult rv =
|
||||
aXPConnect->GetWrappedNativePrototype(cx, aWin->GetGlobalJSObject(), ci,
|
||||
aProto);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
JSObject *proto_obj;
|
||||
(*aProto)->GetJSObject(&proto_obj);
|
||||
if (!JS_WrapObject(cx, &proto_obj)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IF_RELEASE(*aProto);
|
||||
return aXPConnect->HoldObject(cx, proto_obj, aProto);
|
||||
}
|
||||
|
||||
// Either ci_data must be non-null or name_struct must be non-null and of type
|
||||
|
@ -15,6 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=610390
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<iframe type="content"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
src="data:text/html,<script>var x=3</script>"
|
||||
onload="go()"
|
||||
id="ifr">
|
||||
|
@ -59,6 +59,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=500931
|
||||
saw0 = true;
|
||||
}
|
||||
ok(saw0, "properly enumerated the 0 value");
|
||||
|
||||
ok(win.XPathEvaluator.toString().indexOf("XPathEvaluator") >= 0,
|
||||
"Can access content window.XPathEvaluator");
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
Loading…
Reference in New Issue
Block a user