mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1034682 - Set wantXrays to false for content XBL scopes. r=billm
This commit is contained in:
parent
28f31fb0c4
commit
c14d9c63b1
@ -213,8 +213,16 @@ XPCWrappedNativeScope::EnsureContentXBLScope(JSContext *cx)
|
||||
// Set up the sandbox options. Note that we use the DOM global as the
|
||||
// sandboxPrototype so that the XBL scope can access all the DOM objects
|
||||
// it's accustomed to accessing.
|
||||
//
|
||||
// In general wantXrays shouldn't matter much here, but there are weird
|
||||
// cases when adopting bound content between same-origin globals where a
|
||||
// <destructor> in one content XBL scope sees anonymous content in another
|
||||
// content XBL scope. When that happens, we hit LookupBindingMember for an
|
||||
// anonymous element that lives in a content XBL scope, which isn't a tested
|
||||
// or audited codepath. So let's avoid hitting that case by opting out of
|
||||
// same-origin Xrays.
|
||||
SandboxOptions options;
|
||||
options.wantXrays = true;
|
||||
options.wantXrays = false;
|
||||
options.wantComponents = true;
|
||||
options.proto = global;
|
||||
options.sameZoneAs = global;
|
||||
|
@ -171,6 +171,9 @@
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
// Touch a non-existent property on our anonymous input field. This
|
||||
// serves as test coverage for bug 1034682.
|
||||
this.inputField.foo;
|
||||
if (this.inputField.value)
|
||||
this.boxObject.setProperty('value', this.inputField.value);
|
||||
this.mInputField = null;
|
||||
|
Loading…
Reference in New Issue
Block a user