| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 | 76 |
| 77 // Builtin constructors. | 77 // Builtin constructors. |
| 78 var functions = [ | 78 var functions = [ |
| 79 Array, | 79 Array, |
| 80 ArrayBuffer, | 80 ArrayBuffer, |
| 81 Boolean, | 81 Boolean, |
| 82 // DataView, | 82 // DataView, |
| 83 Date, | 83 Date, |
| 84 Error, | 84 Error, |
| 85 Float32Array, | 85 // Float32Array, prototype is %TypedArray% |
| 86 Float64Array, | 86 // Float64Array, |
| 87 Function, | 87 Function, |
| 88 Int16Array, | 88 // Int16Array, |
| 89 Int32Array, | 89 // Int32Array, |
| 90 Int8Array, | 90 // Int8Array, |
| 91 Map, | 91 Map, |
| 92 Number, | 92 Number, |
| 93 Object, | 93 Object, |
| 94 // Promise, | 94 // Promise, |
| 95 RegExp, | 95 RegExp, |
| 96 Set, | 96 Set, |
| 97 String, | 97 String, |
| 98 // Symbol, not constructible | 98 // Symbol, not constructible |
| 99 Uint16Array, | 99 // Uint16Array, |
| 100 Uint32Array, | 100 // Uint32Array, |
| 101 Uint8Array, | 101 // Uint8Array, |
| 102 Uint8ClampedArray, | 102 // Uint8ClampedArray, |
| 103 WeakMap, | 103 WeakMap, |
| 104 WeakSet, | 104 WeakSet, |
| 105 ]; | 105 ]; |
| 106 | 106 |
| 107 for (var f of functions) { | 107 for (var f of functions) { |
| 108 assertPrototypeOf(f, Function.prototype); | 108 assertPrototypeOf(f, Function.prototype); |
| 109 assertPrototypeOf(new f(), f.prototype); | 109 assertPrototypeOf(new f(), f.prototype); |
| 110 } | 110 } |
| 111 | 111 |
| 112 var p = new Promise(function() {}); | 112 var p = new Promise(function() {}); |
| 113 assertPrototypeOf(p, Promise.prototype); | 113 assertPrototypeOf(p, Promise.prototype); |
| 114 | 114 |
| 115 var dv = new DataView(new ArrayBuffer()); | 115 var dv = new DataView(new ArrayBuffer()); |
| 116 assertPrototypeOf(dv, DataView.prototype); | 116 assertPrototypeOf(dv, DataView.prototype); |
| OLD | NEW |