Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(794)

Unified Diff: test/mjsunit/regress/regress-3483.js

Issue 433413002: `1..isPrototypeOf.call(null)` should return false, not throw TypeError. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: s/Copyright 2013/Copyright 2014/ Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/mjsunit/function-call.js ('K') | « test/mjsunit/function-call.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-3483.js
diff --git a/test/mjsunit/regress/regress-1327557.js b/test/mjsunit/regress/regress-3483.js
similarity index 87%
copy from test/mjsunit/regress/regress-1327557.js
copy to test/mjsunit/regress/regress-3483.js
index cd8f08f5a7258d0e0632470e5c7e534d912767fb..6bd8138cc71987606697bf031c1ef0cdded47c51 100644
--- a/test/mjsunit/regress/regress-1327557.js
+++ b/test/mjsunit/regress/regress-3483.js
@@ -1,4 +1,4 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,14 +25,14 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-var x = { valueOf: function() { throw "x"; } };
-var y = { valueOf: function() { throw "y"; } };
+assertFalse(isPrototypeOf.call());
+assertFalse(isPrototypeOf.call(null, 1));
var exception = false;
try {
- x * -y;
+ isPrototypeOf.call(null, {});
} catch (e) {
exception = true;
- assertEquals("y", e);
+ assertTrue(e.message.indexOf("called on null or undefined") >= 0);
}
assertTrue(exception);
« test/mjsunit/function-call.js ('K') | « test/mjsunit/function-call.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698