Backed out changeset c2ffd91dee7c (bug 828137)

This commit is contained in:
Carsten "Tomcat" Book 2015-03-09 16:49:32 +01:00
Родитель fca1be3e56
Коммит 82aadf2de5
5 изменённых файлов: 16 добавлений и 13 удалений

Просмотреть файл

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