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 6619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6630 v8::Script::Compile(v8::String::New("eval('a=1')"))->Run(); | 6630 v8::Script::Compile(v8::String::New("eval('a=1')"))->Run(); |
6631 v8::Script::Compile(v8::String::New("eval('a=2')"))->Run(); | 6631 v8::Script::Compile(v8::String::New("eval('a=2')"))->Run(); |
6632 | 6632 |
6633 // Leave context | 6633 // Leave context |
6634 { | 6634 { |
6635 v8::HandleScope scope(isolate); | 6635 v8::HandleScope scope(isolate); |
6636 v8::Local<v8::Context> local_context = | 6636 v8::Local<v8::Context> local_context = |
6637 v8::Local<v8::Context>::New(isolate, context); | 6637 v8::Local<v8::Context>::New(isolate, context); |
6638 local_context->Exit(); | 6638 local_context->Exit(); |
6639 } | 6639 } |
6640 context.Dispose(isolate); | 6640 context.Dispose(); |
6641 | 6641 |
6642 // Do garbage collection to collect the script above which is no longer | 6642 // Do garbage collection to collect the script above which is no longer |
6643 // referenced. | 6643 // referenced. |
6644 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 6644 HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
6645 | 6645 |
6646 CHECK_EQ(2, script_collected_message_count); | 6646 CHECK_EQ(2, script_collected_message_count); |
6647 | 6647 |
6648 v8::Debug::SetMessageHandler2(NULL); | 6648 v8::Debug::SetMessageHandler2(NULL); |
6649 } | 6649 } |
6650 | 6650 |
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7550 TEST(LiveEditDisabled) { | 7550 TEST(LiveEditDisabled) { |
7551 v8::internal::FLAG_allow_natives_syntax = true; | 7551 v8::internal::FLAG_allow_natives_syntax = true; |
7552 LocalContext env; | 7552 LocalContext env; |
7553 v8::HandleScope scope(env->GetIsolate()); | 7553 v8::HandleScope scope(env->GetIsolate()); |
7554 v8::Debug::SetLiveEditEnabled(false); | 7554 v8::Debug::SetLiveEditEnabled(false); |
7555 CompileRun("%LiveEditCompareStrings('', '')"); | 7555 CompileRun("%LiveEditCompareStrings('', '')"); |
7556 } | 7556 } |
7557 | 7557 |
7558 | 7558 |
7559 #endif // ENABLE_DEBUGGER_SUPPORT | 7559 #endif // ENABLE_DEBUGGER_SUPPORT |
OLD | NEW |