Bug 1225828 - Avoid 'Object in compartment marked as invisible to Debugger' exceptions in the Browser Console / Browser Toolbox;r=fitzgen
This commit is contained in:
@@ -325,8 +325,13 @@ exports.getProperty = function getProperty(aObj, aKey) {
|
||||
exports.hasSafeGetter = function hasSafeGetter(aDesc) {
|
||||
// Scripted functions that are CCWs will not appear scripted until after
|
||||
// unwrapping.
|
||||
let fn = aDesc.get.unwrap();
|
||||
return fn && fn.callable && fn.class == "Function" && fn.script === undefined;
|
||||
try {
|
||||
let fn = aDesc.get.unwrap();
|
||||
return fn && fn.callable && fn.class == "Function" && fn.script === undefined;
|
||||
} catch(e) {
|
||||
// Avoid exception 'Object in compartment marked as invisible to Debugger'
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user