зеркало из https://github.com/mozilla/gecko-dev.git
Bug 858101 - Followup fix for the lack of Cu.isXrayWrapper on esr17/b2g18. r=me, a=bustage
This commit is contained in:
Родитель
3ac341dd51
Коммит
12445841cf
|
@ -6,6 +6,9 @@
|
|||
const TEST_URI = "http://example.com/browser/dom/tests/browser/test-console-api.html";
|
||||
|
||||
var gWindow, gLevel, gArgs, gTestDriver;
|
||||
function isXrayWrapper(x) {
|
||||
return x && typeof x == 'object' && XPCNativeWrapper.unwrap(x) != x;
|
||||
}
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
@ -52,7 +55,7 @@ function testConsoleData(aMessageObject) {
|
|||
// It'd be nice to just use XPCNativeWrapper.unwrap here, but there are
|
||||
// a number of dumb reasons we can't. See bug 868675.
|
||||
var arg = aMessageObject.arguments[i];
|
||||
if (Components.utils.isXrayWrapper(arg))
|
||||
if (isXrayWrapper(arg))
|
||||
arg = arg.wrappedJSObject;
|
||||
is(arg, a, "correct arg " + i);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче