Backed out changeset 8b809afd1cea (bug 1021258) for Android m8 bustage on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-06-05 18:23:22 -07:00
Родитель e349c0faa8
Коммит ac2eeb8a93
3 изменённых файлов: 0 добавлений и 61 удалений

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

@ -1063,14 +1063,6 @@ static bool
ProtoSetter(JSContext *cx, unsigned argc, Value *vp) ProtoSetter(JSContext *cx, unsigned argc, Value *vp)
{ {
CallArgs args = CallArgsFromVp(argc, vp); CallArgs args = CallArgsFromVp(argc, vp);
// Do this here, rather than after the this-check so even likely-buggy
// use of the __proto__ setter on unacceptable values, where no subsequent
// use occurs on an acceptable value, will trigger a warning.
RootedObject callee(cx, &args.callee());
if (!GlobalObject::warnOnceAboutPrototypeMutation(cx, callee))
return false;
HandleValue thisv = args.thisv(); HandleValue thisv = args.thisv();
if (thisv.isNullOrUndefined()) { if (thisv.isNullOrUndefined()) {
ReportIncompatible(cx, args); ReportIncompatible(cx, args);

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

@ -91,7 +91,6 @@ support-files =
[test_bug986542.html] [test_bug986542.html]
[test_bug993423.html] [test_bug993423.html]
[test_bug1005806.html] [test_bug1005806.html]
[test_bug1021258.html]
[test_crosscompartment_weakmap.html] [test_crosscompartment_weakmap.html]
[test_frameWrapping.html] [test_frameWrapping.html]
# The JS test component we use below is only available in debug builds. # The JS test component we use below is only available in debug builds.

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

@ -1,52 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1021258
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1021258</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for proto mutation warnings. **/
SimpleTest.waitForExplicitFinish();
var gLoads = 0;
function loaded() {
switch (++gLoads) {
case 1:
info("First load");
SimpleTest.monitorConsole(function() { window[0].location.reload(true); },
[ { message: /mutating/ } ], /* forbidUnexpectedMessages = */ true);
window[0].eval('var foo = {}; Object.setPrototypeOf(foo, {});' +
'var bar = {}; Object.getPrototypeOf(bar, {});');
SimpleTest.endMonitorConsole();
break;
case 2:
info("Second load");
SimpleTest.monitorConsole(SimpleTest.finish.bind(SimpleTest),
[ { message: /mutating/ } ], /* forbidUnexpectedMessages = */ true);
window[0].eval('var foo = {}; foo.__proto__ = {};' +
'var bar = {}; bar.__proto__ = {};');
SimpleTest.endMonitorConsole();
break;
case 3:
ok(false, "Shouldn't have 3 loads!");
}
}
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1021258">Mozilla Bug 1021258</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
<iframe id="ifr" src="file_empty.html" onload="loaded();"></iframe>
</body>
</html>