OLD | NEW |
---|---|
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 12 matching lines...) Expand all Loading... | |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 | 28 |
29 var should_throw_on_null_and_undefined = | 29 var should_throw_on_null_and_undefined = |
30 [Object.prototype.toLocaleString, | 30 [Object.prototype.toLocaleString, |
31 Object.prototype.valueOf, | 31 Object.prototype.valueOf, |
32 Object.prototype.hasOwnProperty, | 32 Object.prototype.hasOwnProperty, |
33 Object.prototype.isPrototypeOf, | |
rossberg
2014/08/21 11:16:52
I don't think we want to simply remove this, since
| |
34 Object.prototype.propertyIsEnumerable, | 33 Object.prototype.propertyIsEnumerable, |
35 Array.prototype.concat, | 34 Array.prototype.concat, |
36 Array.prototype.join, | 35 Array.prototype.join, |
37 Array.prototype.pop, | 36 Array.prototype.pop, |
38 Array.prototype.push, | 37 Array.prototype.push, |
39 Array.prototype.reverse, | 38 Array.prototype.reverse, |
40 Array.prototype.shift, | 39 Array.prototype.shift, |
41 Array.prototype.slice, | 40 Array.prototype.slice, |
42 Array.prototype.sort, | 41 Array.prototype.sort, |
43 Array.prototype.splice, | 42 Array.prototype.splice, |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 } | 346 } |
348 } | 347 } |
349 | 348 |
350 | 349 |
351 // Object.prototype.toString() | 350 // Object.prototype.toString() |
352 assertEquals(Object.prototype.toString.call(null), | 351 assertEquals(Object.prototype.toString.call(null), |
353 '[object Null]') | 352 '[object Null]') |
354 | 353 |
355 assertEquals(Object.prototype.toString.call(undefined), | 354 assertEquals(Object.prototype.toString.call(undefined), |
356 '[object Undefined]') | 355 '[object Undefined]') |
OLD | NEW |