Backed out changeset 4903ca450b3f (bug 890081) for widespread mochitest orange.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2013-07-08 15:19:30 -04:00
parent b879e83ec0
commit 2d21e8fd70
3 changed files with 7 additions and 19 deletions

View File

@ -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;
}

View File

@ -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.

View File

@ -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(){});