mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 4903ca450b3f (bug 890081) for widespread mochitest orange.
CLOSED TREE
This commit is contained in:
parent
b879e83ec0
commit
2d21e8fd70
@ -11382,7 +11382,7 @@ nsIDocument::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
|
||||
(doc_str.get()),
|
||||
doc_str.Length(), JS::ObjectValue(*obj),
|
||||
JS_PropertyStub, JS_StrictPropertyStub,
|
||||
JSPROP_READONLY | JSPROP_ENUMERATE | JSPROP_PERMANENT)) {
|
||||
JSPROP_READONLY | JSPROP_ENUMERATE)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -4510,7 +4510,8 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
false);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// nsIDocument::WrapObject will handle defining the property.
|
||||
// The PostCreate hook for the document will handle defining the
|
||||
// property
|
||||
*objp = obj;
|
||||
|
||||
// NB: We need to do this for any Xray wrapper.
|
||||
|
@ -37,27 +37,14 @@ ok(canDefine, "Should have access to __defineGetter__ and __defineSetter__");
|
||||
try {
|
||||
this.__defineGetter__('window', function() {});
|
||||
ok(false, "should not be able to defineGetter(window)");
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
this.__defineGetter__('document', function() {});
|
||||
ok(false, "should not be able to defineGetter(document)");
|
||||
} catch (e) { }
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
this.__defineGetter__.call(window, 'location', function(){});
|
||||
ok(false, "should not be able to defineGetter(window.location)");
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
this.__defineGetter__.call(window, 'document', function(){});
|
||||
ok(false, "should not be able to defineGetter(window.document)");
|
||||
} catch (e) { }
|
||||
|
||||
try {
|
||||
this.__defineGetter__.call(document, 'location', function(){});
|
||||
ok(false, "should not be able to defineGetter(document.location)");
|
||||
} catch (e) { }
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
this.__defineGetter__.call(window.location, 'href', function(){});
|
||||
|
Loading…
Reference in New Issue
Block a user