| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 16952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16963 // Break fast array hole handling by element changes. | 16963 // Break fast array hole handling by element changes. |
| 16964 BreakArrayGuarantees("[].__proto__[1] = 3;"); | 16964 BreakArrayGuarantees("[].__proto__[1] = 3;"); |
| 16965 BreakArrayGuarantees("Object.prototype[3] = 'three';"); | 16965 BreakArrayGuarantees("Object.prototype[3] = 'three';"); |
| 16966 BreakArrayGuarantees("Array.prototype.push(1);"); | 16966 BreakArrayGuarantees("Array.prototype.push(1);"); |
| 16967 BreakArrayGuarantees("Array.prototype.unshift(1);"); | 16967 BreakArrayGuarantees("Array.prototype.unshift(1);"); |
| 16968 // Break fast array hole handling by changing length. | 16968 // Break fast array hole handling by changing length. |
| 16969 BreakArrayGuarantees("Array.prototype.length = 30;"); | 16969 BreakArrayGuarantees("Array.prototype.length = 30;"); |
| 16970 // Break fast array hole handling by prototype structure changes. | 16970 // Break fast array hole handling by prototype structure changes. |
| 16971 BreakArrayGuarantees("[].__proto__.__proto__ = { funny: true };"); | 16971 BreakArrayGuarantees("[].__proto__.__proto__ = { funny: true };"); |
| 16972 // By sending elements to dictionary mode. | 16972 // By sending elements to dictionary mode. |
| 16973 BreakArrayGuarantees("Object.freeze(Array.prototype);"); | |
| 16974 BreakArrayGuarantees("Object.freeze(Object.prototype);"); | |
| 16975 BreakArrayGuarantees( | 16973 BreakArrayGuarantees( |
| 16976 "Object.defineProperty(Array.prototype, 0, {" | 16974 "Object.defineProperty(Array.prototype, 0, {" |
| 16977 " get: function() { return 3; }});"); | 16975 " get: function() { return 3; }});"); |
| 16978 BreakArrayGuarantees( | 16976 BreakArrayGuarantees( |
| 16979 "Object.defineProperty(Object.prototype, 0, {" | 16977 "Object.defineProperty(Object.prototype, 0, {" |
| 16980 " get: function() { return 3; }});"); | 16978 " get: function() { return 3; }});"); |
| 16981 } | 16979 } |
| 16982 | 16980 |
| 16983 | 16981 |
| 16984 TEST(RunTwoIsolatesOnSingleThread) { | 16982 TEST(RunTwoIsolatesOnSingleThread) { |
| (...skipping 4864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21849 " fake.age;\n" | 21847 " fake.age;\n" |
| 21850 " result = 1;\n" | 21848 " result = 1;\n" |
| 21851 " } catch (e) {\n" | 21849 " } catch (e) {\n" |
| 21852 " }\n" | 21850 " }\n" |
| 21853 " test(d+1);\n" | 21851 " test(d+1);\n" |
| 21854 "}\n" | 21852 "}\n" |
| 21855 "test(0);\n" | 21853 "test(0);\n" |
| 21856 "result;\n", | 21854 "result;\n", |
| 21857 0); | 21855 0); |
| 21858 } | 21856 } |
| OLD | NEW |