Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Side by Side Diff: src/d8.cc

Issue 1857263002: [d8] reset global handle on exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix shared library build Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 } 2471 }
2472 2472
2473 // Run interactive shell if explicitly requested or if no script has been 2473 // Run interactive shell if explicitly requested or if no script has been
2474 // executed, but never on --test 2474 // executed, but never on --test
2475 if (options.use_interactive_shell()) { 2475 if (options.use_interactive_shell()) {
2476 RunShell(isolate); 2476 RunShell(isolate);
2477 } 2477 }
2478 2478
2479 // Shut down contexts and collect garbage. 2479 // Shut down contexts and collect garbage.
2480 evaluation_context_.Reset(); 2480 evaluation_context_.Reset();
2481 #ifndef V8_SHARED
2482 stringify_function_.Reset();
2483 #endif // !V8_SHARED
2481 CollectGarbage(isolate); 2484 CollectGarbage(isolate);
2482 } 2485 }
2483 OnExit(isolate); 2486 OnExit(isolate);
2484 #ifndef V8_SHARED 2487 #ifndef V8_SHARED
2485 // Dump basic block profiling data. 2488 // Dump basic block profiling data.
2486 if (i::BasicBlockProfiler* profiler = 2489 if (i::BasicBlockProfiler* profiler =
2487 reinterpret_cast<i::Isolate*>(isolate)->basic_block_profiler()) { 2490 reinterpret_cast<i::Isolate*>(isolate)->basic_block_profiler()) {
2488 i::OFStream os(stdout); 2491 i::OFStream os(stdout);
2489 os << *profiler; 2492 os << *profiler;
2490 } 2493 }
2491 #endif // !V8_SHARED 2494 #endif // !V8_SHARED
2492 isolate->Dispose(); 2495 isolate->Dispose();
2493 V8::Dispose(); 2496 V8::Dispose();
2494 V8::ShutdownPlatform(); 2497 V8::ShutdownPlatform();
2495 delete g_platform; 2498 delete g_platform;
2496 2499
2497 return result; 2500 return result;
2498 } 2501 }
2499 2502
2500 } // namespace v8 2503 } // namespace v8
2501 2504
2502 2505
2503 #ifndef GOOGLE3 2506 #ifndef GOOGLE3
2504 int main(int argc, char* argv[]) { 2507 int main(int argc, char* argv[]) {
2505 return v8::Shell::Main(argc, argv); 2508 return v8::Shell::Main(argc, argv);
2506 } 2509 }
2507 #endif 2510 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698