OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 |
| 6 var funcs = [ |
| 7 |
| 8 // https://code.google.com/p/v8/issues/detail?id=4002 |
| 9 // Error, |
| 10 // EvalError, |
| 11 // RangeError, |
| 12 // ReferenceError, |
| 13 // SyntaxError, |
| 14 // TypeError, |
| 15 // URIError, |
| 16 |
| 17 // https://code.google.com/p/v8/issues/detail?id=4003 |
| 18 // RegExp, |
| 19 |
| 20 // https://code.google.com/p/v8/issues/detail?id=4004 |
| 21 // Date, |
| 22 |
| 23 // https://code.google.com/p/v8/issues/detail?id=4006 |
| 24 // String, |
| 25 |
| 26 ArrayBuffer, |
| 27 Boolean, |
| 28 DataView, |
| 29 Float32Array, |
| 30 Float64Array, |
| 31 Int16Array, |
| 32 Int32Array, |
| 33 Int8Array, |
| 34 Map, |
| 35 Number, |
| 36 Object, |
| 37 Promise, |
| 38 // Proxy, |
| 39 Set, |
| 40 Symbol, |
| 41 Uint16Array, |
| 42 Uint32Array, |
| 43 Uint8Array, |
| 44 Uint8ClampedArray, |
| 45 WeakMap, |
| 46 WeakSet, |
| 47 ]; |
| 48 |
| 49 for (var fun of funcs) { |
| 50 var p = fun.prototype; |
| 51 assertEquals('[object Object]', Object.prototype.toString.call(p)); |
| 52 } |
| 53 |
| 54 |
| 55 // These still have special prototypes for legacy reason. |
| 56 var funcs = [ |
| 57 Array, |
| 58 Function, |
| 59 ]; |
| 60 |
| 61 for (var fun of funcs) { |
| 62 var p = fun.prototype; |
| 63 assertEquals('[object ' + fun.name + ']', Object.prototype.toString.call(p)); |
| 64 } |
OLD | NEW |