OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-ayle license that can be | 2 // Use of this source code is governed by a BSD-ayle license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --allow-natives-syntax --track-fields --expose-gc | 5 // Flags: --allow-natives-syntax --track-fields --expose-gc |
6 | 6 |
7 var global = Function('return this')(); | 7 var global = Function('return this')(); |
8 var verbose = 0; | 8 var verbose = 0; |
9 | 9 |
10 function test(ctor_desc, use_desc, migr_desc) { | 10 function test(ctor_desc, use_desc, migr_desc) { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 set: function(value) {}, | 271 set: function(value) {}, |
272 configurable: true, | 272 configurable: true, |
273 }); | 273 }); |
274 }, | 274 }, |
275 }, | 275 }, |
276 { | 276 { |
277 name: "observe", | 277 name: "observe", |
278 migr: function(o, i) { Object.observe(o, function(){}); }, | 278 migr: function(o, i) { Object.observe(o, function(){}); }, |
279 }, | 279 }, |
280 { | 280 { |
281 name: "%EnableAccessChecks", | |
282 migr: function(o, i) { | |
283 if (typeof (o) !== 'function') %EnableAccessChecks(o); | |
284 }, | |
285 }, | |
286 { | |
287 name: "%DisableAccessChecks", | |
288 migr: function(o, i) { | |
289 if ((typeof (o) !== 'function') && (o !== global)) %DisableAccessChecks(o)
; | |
290 }, | |
291 }, | |
292 { | |
293 name: "seal", | 281 name: "seal", |
294 migr: function(o, i) { Object.seal(o); }, | 282 migr: function(o, i) { Object.seal(o); }, |
295 }, | 283 }, |
296 { // Must be the last in the sequence, because after the global object freeze | 284 { // Must be the last in the sequence, because after the global object freeze |
297 // the other modifications does not make sence. | 285 // the other modifications does not make sence. |
298 name: "freeze", | 286 name: "freeze", |
299 migr: function(o, i) { Object.freeze(o); }, | 287 migr: function(o, i) { Object.freeze(o); }, |
300 }, | 288 }, |
301 ]; | 289 ]; |
302 | 290 |
303 | 291 |
304 | 292 |
305 migrations.forEach(function(migr) { | 293 migrations.forEach(function(migr) { |
306 uses.forEach(function(use) { | 294 uses.forEach(function(use) { |
307 ctors.forEach(function(ctor) { | 295 ctors.forEach(function(ctor) { |
308 test(ctor, use, migr); | 296 test(ctor, use, migr); |
309 }); | 297 }); |
310 }); | 298 }); |
311 }); | 299 }); |
OLD | NEW |