mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1003905 - Refactor DevToolsUtils.js to be worker friendly; r=past
This commit is contained in:
parent
6f9d23b28e
commit
1ad5aa5b65
@ -290,6 +290,12 @@ exports.hasSafeGetter = function hasSafeGetter(aDesc) {
|
||||
* True if it is safe to read properties from aObj, or false otherwise.
|
||||
*/
|
||||
exports.isSafeJSObject = function isSafeJSObject(aObj) {
|
||||
// If we are running on a worker thread, Cu is not available. In this case,
|
||||
// we always return false, just to be on the safe side.
|
||||
if (!Cu) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Cu.getGlobalForObject(aObj) ==
|
||||
Cu.getGlobalForObject(exports.isSafeJSObject)) {
|
||||
return true; // aObj is not a cross-compartment wrapper.
|
||||
|
@ -102,7 +102,6 @@ function createModule(id) {
|
||||
//
|
||||
// TODO: Remove this when the whitelist becomes empty
|
||||
let chromeWhitelist = [
|
||||
"devtools/toolkit/DevToolsUtils",
|
||||
"devtools/toolkit/event-emitter",
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user