зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c2ffd91dee7c (bug 828137)
This commit is contained in:
Родитель
fca1be3e56
Коммит
82aadf2de5
|
@ -917,9 +917,9 @@ nsOuterWindowProxy::set(JSContext *cx, JS::Handle<JSObject*> proxy,
|
|||
{
|
||||
int32_t index = GetArrayIndexFromId(cx, id);
|
||||
if (IsArrayIndex(index)) {
|
||||
// Reject the set. It's up to the caller to decide whether to throw a
|
||||
// TypeError. If the caller is strict mode JS code, it'll throw.
|
||||
return result.failReadOnly();
|
||||
// Reject (which means throw if and only if strict) the set.
|
||||
// XXX See bug 828137.
|
||||
return result.succeed();
|
||||
}
|
||||
|
||||
return js::Wrapper::set(cx, proxy, receiver, id, vp, result);
|
||||
|
|
|
@ -42,12 +42,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
is(x.contentWindow, window[0], "First frame should have correct window");
|
||||
is(y.contentWindow, window[1], "Second frame should have correct window");
|
||||
|
||||
// set() hook test
|
||||
throws(TypeError, function () {
|
||||
"use strict";
|
||||
window[1] = "FAIL strict";
|
||||
});
|
||||
|
||||
// set() hook test
|
||||
window[1] = "FAIL";
|
||||
is(window[1].name, "y", "Second frame is still y");
|
||||
|
@ -77,10 +71,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=823228
|
|||
is(window[1], undefined, "We should not have a value here either");
|
||||
|
||||
// More set() hook test
|
||||
throws(TypeError, function () {
|
||||
"use strict";
|
||||
window[1] = "FAIL3 strict";
|
||||
});
|
||||
window[1] = "FAIL3";
|
||||
ok(!("1" in window), "We shouldn't allow indexed expandos");
|
||||
is(window[1], undefined, "We should not have a value for an indexed expando");
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
support-files =
|
||||
|
||||
|
||||
[test_window-indexed-properties-strict.html.json]
|
||||
[test_window-named-properties.html.json]
|
||||
skip-if = true # bug 859075
|
||||
[test_window-properties.html.json]
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"Indexed properties of the window object (strict mode) 1": true,
|
||||
"Indexed properties of the window object (strict mode) 2": true
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
[window-indexed-properties-strict.html]
|
||||
type: testharness
|
||||
[Indexed properties of the window object (strict mode) 1]
|
||||
expected: FAIL
|
||||
|
||||
[Indexed properties of the window object (strict mode) 2]
|
||||
expected: FAIL
|
||||
|
Загрузка…
Ссылка в новой задаче