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

Unified Diff: test/mjsunit/es6/prototype-ordinary-objects.js

Issue 1051373002: ES6: Number and Boolean prototype should be ordinary objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add mozilla.status exceptions Created 5 years, 8 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
« no previous file with comments | « src/v8natives.js ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/prototype-ordinary-objects.js
diff --git a/test/mjsunit/es6/prototype-ordinary-objects.js b/test/mjsunit/es6/prototype-ordinary-objects.js
new file mode 100644
index 0000000000000000000000000000000000000000..6704288089a50dd355a09e16d96de47925d83e85
--- /dev/null
+++ b/test/mjsunit/es6/prototype-ordinary-objects.js
@@ -0,0 +1,64 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+var funcs = [
+
+ // https://code.google.com/p/v8/issues/detail?id=4002
+ // Error,
+ // EvalError,
+ // RangeError,
+ // ReferenceError,
+ // SyntaxError,
+ // TypeError,
+ // URIError,
+
+ // https://code.google.com/p/v8/issues/detail?id=4003
+ // RegExp,
+
+ // https://code.google.com/p/v8/issues/detail?id=4004
+ // Date,
+
+ // https://code.google.com/p/v8/issues/detail?id=4006
+ // String,
+
+ ArrayBuffer,
+ Boolean,
+ DataView,
+ Float32Array,
+ Float64Array,
+ Int16Array,
+ Int32Array,
+ Int8Array,
+ Map,
+ Number,
+ Object,
+ Promise,
+ // Proxy,
+ Set,
+ Symbol,
+ Uint16Array,
+ Uint32Array,
+ Uint8Array,
+ Uint8ClampedArray,
+ WeakMap,
+ WeakSet,
+];
+
+for (var fun of funcs) {
+ var p = fun.prototype;
+ assertEquals('[object Object]', Object.prototype.toString.call(p));
+}
+
+
+// These still have special prototypes for legacy reason.
+var funcs = [
+ Array,
+ Function,
+];
+
+for (var fun of funcs) {
+ var p = fun.prototype;
+ assertEquals('[object ' + fun.name + ']', Object.prototype.toString.call(p));
+}
« no previous file with comments | « src/v8natives.js ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698