mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 781521 - Fix test_SpecialPowersExtension. r=Ms2ger
The constructor function lives in content, but it's being invoked from chrome, so the |this| object is actually privileged.
This commit is contained in:
parent
6a7102e955
commit
79e4222127
@ -123,7 +123,7 @@ function starttest(){
|
||||
var bis = new BinaryInputStream();
|
||||
ok(/nsISupports/.exec(bis.toString()), "Should get the proper object out of the constructor");
|
||||
function TestConstructor() {
|
||||
this.foo = 2;
|
||||
SpecialPowers.wrap(this).foo = 2;
|
||||
}
|
||||
var WrappedConstructor = SpecialPowers.wrap(TestConstructor);
|
||||
is((new WrappedConstructor()).foo, 2, "JS constructors work properly when wrapped");
|
||||
|
Loading…
Reference in New Issue
Block a user