| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 String.prototype.match, | 60 String.prototype.match, |
| 61 String.prototype.replace, | 61 String.prototype.replace, |
| 62 String.prototype.search, | 62 String.prototype.search, |
| 63 String.prototype.slice, | 63 String.prototype.slice, |
| 64 String.prototype.split, | 64 String.prototype.split, |
| 65 String.prototype.substring, | 65 String.prototype.substring, |
| 66 String.prototype.toLowerCase, | 66 String.prototype.toLowerCase, |
| 67 String.prototype.toLocaleLowerCase, | 67 String.prototype.toLocaleLowerCase, |
| 68 String.prototype.toUpperCase, | 68 String.prototype.toUpperCase, |
| 69 String.prototype.toLocaleUpperCase, | 69 String.prototype.toLocaleUpperCase, |
| 70 String.prototype.trim, | 70 String.prototype.trim]; |
| 71 Number.prototype.toLocaleString]; | |
| 72 | 71 |
| 73 // Non generic natives do not work on any input other than the specific | 72 // Non generic natives do not work on any input other than the specific |
| 74 // type, but since this change will allow call to be invoked with undefined | 73 // type, but since this change will allow call to be invoked with undefined |
| 75 // or null as this we still explicitly test that we throw on these here. | 74 // or null as this we still explicitly test that we throw on these here. |
| 76 var non_generic = | 75 var non_generic = |
| 77 [Array.prototype.toString, | 76 [Array.prototype.toString, |
| 78 Array.prototype.toLocaleString, | 77 Array.prototype.toLocaleString, |
| 79 Function.prototype.toString, | 78 Function.prototype.toString, |
| 80 Function.prototype.call, | 79 Function.prototype.call, |
| 81 Function.prototype.apply, | 80 Function.prototype.apply, |
| (...skipping 265 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 |