OLD | NEW |
---|---|
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 assertEquals(p, GetPrototypeOf(NoInitialMap)); | 83 assertEquals(p, GetPrototypeOf(NoInitialMap)); |
84 | 84 |
85 // Check the standard fast case. | 85 // Check the standard fast case. |
86 assertEquals(F.prototype, GetPrototypeOf(F)); | 86 assertEquals(F.prototype, GetPrototypeOf(F)); |
87 | 87 |
88 // Check that getting the prototype of a non-function works. This must | 88 // Check that getting the prototype of a non-function works. This must |
89 // be the last thing we do because this will clobber the optimizations | 89 // be the last thing we do because this will clobber the optimizations |
90 // in GetPrototypeOf and go to a monomorphic IC load instead. | 90 // in GetPrototypeOf and go to a monomorphic IC load instead. |
91 assertEquals(87, GetPrototypeOf({prototype:87})); | 91 assertEquals(87, GetPrototypeOf({prototype:87})); |
92 | 92 |
93 // Check the prototype is enumerable as specified in ECMA262, 15.3.5.2 | 93 // Check the prototype is not enumerable, for compatibility with safari |
Lasse Reichstein
2009/09/09 09:26:38
Perhaps mention that this is a known incompatibili
Christian Plesner Hansen
2009/09/09 09:30:51
Done.
| |
94 var foo = new Function("return x"); | 94 var foo = new Function("return x"); |
95 var result = "" | 95 var result = "" |
96 for (var n in foo) result += n; | 96 for (var n in foo) result += n; |
97 assertEquals(result, "prototype"); | 97 assertEquals(result, ""); |
OLD | NEW |