mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 952190 - Pretty output for native objects from chrome windows; r=past
This commit is contained in:
parent
67e6b36b20
commit
077abafc2f
@ -91,7 +91,7 @@ function test()
|
||||
},
|
||||
{
|
||||
name: "console.dir output",
|
||||
consoleDir: "XULDocument {",
|
||||
consoleDir: /XULDocument .+ chrome:\/\/.+\/browser\.xul/,
|
||||
},
|
||||
{
|
||||
name: "console.time output",
|
||||
|
@ -260,6 +260,11 @@ this.isSafeJSObject = function isSafeJSObject(aObj) {
|
||||
return true; // aObj is not a cross-compartment wrapper.
|
||||
}
|
||||
|
||||
let principal = Services.scriptSecurityManager.getObjectPrincipal(aObj);
|
||||
if (Services.scriptSecurityManager.isSystemPrincipal(principal)) {
|
||||
return true; // allow chrome objects
|
||||
}
|
||||
|
||||
return Cu.isXrayWrapper(aObj);
|
||||
};
|
||||
|
||||
|
@ -3656,7 +3656,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
||||
},
|
||||
|
||||
function DOMNode({obj, threadActor}, aGrip, aRawObj) {
|
||||
if (!aRawObj || !(aRawObj instanceof Ci.nsIDOMNode)) {
|
||||
if (obj.class == "Object" || !aRawObj || !(aRawObj instanceof Ci.nsIDOMNode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user