mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-01-13 11:30:02 +00:00
M1329323
This commit is contained in:
parent
09ba0c2cc2
commit
c32ad86171
@ -810,9 +810,6 @@ nsOuterWindowProxy::getOwnPropertyDescriptor(JSContext* cx,
|
||||
}
|
||||
// else fall through to js::Wrapper
|
||||
|
||||
// When we change this to always claim the property is configurable (bug
|
||||
// 1178639), update the comments in nsOuterWindowProxy::defineProperty
|
||||
// accordingly.
|
||||
return js::Wrapper::getOwnPropertyDescriptor(cx, proxy, id, desc);
|
||||
}
|
||||
|
||||
@ -831,29 +828,6 @@ nsOuterWindowProxy::defineProperty(JSContext* cx,
|
||||
return result.failCantDefineWindowElement();
|
||||
}
|
||||
|
||||
#ifndef RELEASE_BUILD // To be turned on in bug 1178638.
|
||||
// For now, allow chrome code to define non-configurable properties
|
||||
// on windows, until we sort out what exactly the addon SDK is
|
||||
// doing. In the meantime, this still allows us to test web compat
|
||||
// behavior.
|
||||
if (desc.hasConfigurable() && !desc.configurable() &&
|
||||
!nsContentUtils::IsCallerChrome()) {
|
||||
return ThrowErrorMessage(cx, MSG_DEFINE_NON_CONFIGURABLE_PROP_ON_WINDOW);
|
||||
}
|
||||
|
||||
// Note that if hasConfigurable() is false we do NOT want to
|
||||
// setConfigurable(true). That would make this code:
|
||||
//
|
||||
// var x;
|
||||
// window.x = 5;
|
||||
//
|
||||
// fail, because the JS engine ends up converting the assignment into a define
|
||||
// with !hasConfigurable(), but the var actually declared a non-configurable
|
||||
// property on our underlying Window object, so the set would fail if we
|
||||
// forced setConfigurable(true) here. What we want to do instead is change
|
||||
// getOwnPropertyDescriptor to always claim configurable. See bug 1178639.
|
||||
#endif
|
||||
|
||||
return js::Wrapper::defineProperty(cx, proxy, id, desc, result);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user