Bug 1407026 - Fix CPOW class mistake in the console. r=nchevobbe

MozReview-Commit-ID: 3Mk2kclTReX

--HG--
extra : rebase_source : a52bdf1d1c56f53f6723fe5465958adb81e0cc35
This commit is contained in:
Oriol Brufau 2017-10-10 22:37:29 +02:00
parent 9fb6d528ad
commit b8394ce023
3 changed files with 25 additions and 1 deletions

View File

@ -197,4 +197,16 @@ function* testCPOWInspection(hud) {
// Just a sanity check to make sure a valid packet came back
is(prototypeAndProperties.prototype.class, "XBL prototype JSClass",
"Looks like a valid response");
// The CPOW is in the _contentWindow property.
let cpow = prototypeAndProperties.ownProperties._contentWindow.value;
// But it's only a CPOW in e10s.
let e10sCheck = yield hud.jsterm.requestEvaluation(
"Cu.isCrossProcessWrapper(gBrowser.selectedBrowser._contentWindow)");
if (e10sCheck.result) {
is(cpow.class, "CPOW: Window", "The CPOW grip has the right class.");
} else {
is(cpow.class, "Window", "The object is not a CPOW.");
}
}

View File

@ -197,4 +197,16 @@ function* testCPOWInspection(hud) {
// Just a sanity check to make sure a valid packet came back
is(prototypeAndProperties.prototype.class, "XBL prototype JSClass",
"Looks like a valid response");
// The CPOW is in the _contentWindow property.
let cpow = prototypeAndProperties.ownProperties._contentWindow.value;
// But it's only a CPOW in e10s.
let e10sCheck = yield hud.jsterm.requestEvaluation(
"Cu.isCrossProcessWrapper(gBrowser.selectedBrowser._contentWindow)");
if (e10sCheck.result) {
is(cpow.class, "CPOW: Window", "The CPOW grip has the right class.");
} else {
is(cpow.class, "Window", "The object is not a CPOW.");
}
}

View File

@ -83,7 +83,7 @@ ObjectActor.prototype = {
let unwrapped = DevToolsUtils.unwrap(this.obj);
if (!unwrapped) {
if (DevToolsUtils.isCPOW(this.obj)) {
g.class = "CPOW: " + g.class;
g.class = "CPOW: " + this.obj.class;
} else {
g.class = "Inaccessible";
}