mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1020609 - Fix up mozApps for Array Xrays. r=mccr8
This commit is contained in:
parent
83475d1d2e
commit
33f3b6c595
@ -21,7 +21,14 @@ function convertAppsArray(aApps, aWindow) {
|
||||
let apps = new aWindow.Array();
|
||||
for (let i = 0; i < aApps.length; i++) {
|
||||
let app = aApps[i];
|
||||
apps.push(createApplicationObject(aWindow, app));
|
||||
// Our application objects are JS-implemented XPCOM objects with DOM_OBJECT
|
||||
// set in classinfo. These objects are reflector-per-scope, so as soon as we
|
||||
// pass them to content, we'll end up with a new object in content. But from
|
||||
// this code, they _appear_ to be chrome objects, and so the Array Xray code
|
||||
// vetos the attempt to define a chrome-privileged object on a content Array.
|
||||
// Very carefully waive Xrays so that this can keep working until we convert
|
||||
// mozApps to WebIDL in bug 899322.
|
||||
Cu.waiveXrays(apps)[i] = createApplicationObject(aWindow, app);
|
||||
}
|
||||
|
||||
return apps;
|
||||
|
Loading…
Reference in New Issue
Block a user