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 12465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12476 calling_context2.Dispose(); | 12476 calling_context2.Dispose(); |
12477 calling_context0.Clear(); | 12477 calling_context0.Clear(); |
12478 calling_context1.Clear(); | 12478 calling_context1.Clear(); |
12479 calling_context2.Clear(); | 12479 calling_context2.Clear(); |
12480 } | 12480 } |
12481 | 12481 |
12482 | 12482 |
12483 // Check that a variable declaration with no explicit initialization | 12483 // Check that a variable declaration with no explicit initialization |
12484 // value does shadow an existing property in the prototype chain. | 12484 // value does shadow an existing property in the prototype chain. |
12485 THREADED_TEST(InitGlobalVarInProtoChain) { | 12485 THREADED_TEST(InitGlobalVarInProtoChain) { |
12486 v8::internal::FLAG_es52_globals = true; | |
Michael Starzinger
2012/04/20 13:28:45
Can we just use "i::FLAG_es52_globals"?
rossberg
2012/04/20 14:01:07
Done.
| |
12486 v8::HandleScope scope; | 12487 v8::HandleScope scope; |
12487 LocalContext context; | 12488 LocalContext context; |
12488 // Introduce a variable in the prototype chain. | 12489 // Introduce a variable in the prototype chain. |
12489 CompileRun("__proto__.x = 42"); | 12490 CompileRun("__proto__.x = 42"); |
12490 v8::Handle<v8::Value> result = CompileRun("var x = 43; x"); | 12491 v8::Handle<v8::Value> result = CompileRun("var x = 43; x"); |
12491 CHECK(!result->IsUndefined()); | 12492 CHECK(!result->IsUndefined()); |
12492 CHECK_EQ(43, result->Int32Value()); | 12493 CHECK_EQ(43, result->Int32Value()); |
12493 } | 12494 } |
12494 | 12495 |
12495 | 12496 |
(...skipping 3944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16440 | 16441 |
16441 | 16442 |
16442 TEST(SecondaryStubCache) { | 16443 TEST(SecondaryStubCache) { |
16443 StubCacheHelper(true); | 16444 StubCacheHelper(true); |
16444 } | 16445 } |
16445 | 16446 |
16446 | 16447 |
16447 TEST(PrimaryStubCache) { | 16448 TEST(PrimaryStubCache) { |
16448 StubCacheHelper(false); | 16449 StubCacheHelper(false); |
16449 } | 16450 } |
OLD | NEW |