Chromium Code Reviews| 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 12412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12423 calling_context0.Dispose(); | 12423 calling_context0.Dispose(); |
| 12424 calling_context1.Dispose(); | 12424 calling_context1.Dispose(); |
| 12425 calling_context2.Dispose(); | 12425 calling_context2.Dispose(); |
| 12426 calling_context0.Clear(); | 12426 calling_context0.Clear(); |
| 12427 calling_context1.Clear(); | 12427 calling_context1.Clear(); |
| 12428 calling_context2.Clear(); | 12428 calling_context2.Clear(); |
| 12429 } | 12429 } |
| 12430 | 12430 |
| 12431 | 12431 |
| 12432 // Check that a variable declaration with no explicit initialization | 12432 // Check that a variable declaration with no explicit initialization |
| 12433 // value does not shadow an existing property in the prototype chain. | 12433 // value does not shadow an existing property in the prototype chain. |
|
Michael Starzinger
2012/04/16 11:32:30
The whole comment no longer applies.
rossberg
2012/04/16 13:15:44
Done.
| |
| 12434 // | 12434 // |
| 12435 // This is consistent with Firefox and Safari. | 12435 // This is consistent with Firefox and Safari. |
| 12436 // | 12436 // |
| 12437 // See http://crbug.com/12548. | 12437 // See http://crbug.com/12548. |
| 12438 THREADED_TEST(InitGlobalVarInProtoChain) { | 12438 THREADED_TEST(InitGlobalVarInProtoChain) { |
| 12439 v8::HandleScope scope; | 12439 v8::HandleScope scope; |
| 12440 LocalContext context; | 12440 LocalContext context; |
| 12441 // Introduce a variable in the prototype chain. | 12441 // Introduce a variable in the prototype chain. |
| 12442 CompileRun("__proto__.x = 42"); | 12442 CompileRun("__proto__.x = 42"); |
| 12443 v8::Handle<v8::Value> result = CompileRun("var x; x"); | 12443 v8::Handle<v8::Value> result = CompileRun("var x = 43; x"); |
| 12444 CHECK(!result->IsUndefined()); | 12444 CHECK(!result->IsUndefined()); |
| 12445 CHECK_EQ(42, result->Int32Value()); | 12445 CHECK_EQ(43, result->Int32Value()); |
| 12446 } | 12446 } |
| 12447 | 12447 |
| 12448 | 12448 |
| 12449 // Regression test for issue 398. | 12449 // Regression test for issue 398. |
| 12450 // If a function is added to an object, creating a constant function | 12450 // If a function is added to an object, creating a constant function |
| 12451 // field, and the result is cloned, replacing the constant function on the | 12451 // field, and the result is cloned, replacing the constant function on the |
| 12452 // original should not affect the clone. | 12452 // original should not affect the clone. |
| 12453 // See http://code.google.com/p/v8/issues/detail?id=398 | 12453 // See http://code.google.com/p/v8/issues/detail?id=398 |
| 12454 THREADED_TEST(ReplaceConstantFunction) { | 12454 THREADED_TEST(ReplaceConstantFunction) { |
| 12455 v8::HandleScope scope; | 12455 v8::HandleScope scope; |
| (...skipping 3938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 16394 | 16394 |
| 16395 TEST(SecondaryStubCache) { | 16395 TEST(SecondaryStubCache) { |
| 16396 StubCacheHelper(true); | 16396 StubCacheHelper(true); |
| 16397 } | 16397 } |
| 16398 | 16398 |
| 16399 | 16399 |
| 16400 TEST(PrimaryStubCache) { | 16400 TEST(PrimaryStubCache) { |
| 16401 StubCacheHelper(false); | 16401 StubCacheHelper(false); |
| 16402 } | 16402 } |
| 16403 | 16403 |
| OLD | NEW |