OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/once.h" | 8 #include "src/base/once.h" |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 bool V8::Initialize() { | 38 bool V8::Initialize() { |
39 InitializeOncePerProcess(); | 39 InitializeOncePerProcess(); |
40 return true; | 40 return true; |
41 } | 41 } |
42 | 42 |
43 | 43 |
44 void V8::TearDown() { | 44 void V8::TearDown() { |
45 Bootstrapper::TearDownExtensions(); | 45 Bootstrapper::TearDownExtensions(); |
46 ElementsAccessor::TearDown(); | 46 ElementsAccessor::TearDown(); |
47 LOperand::TearDownCaches(); | 47 LOperand::TearDownCaches(); |
48 ExternalReference::TearDownMathExpData(); | |
49 RegisteredExtension::UnregisterAll(); | 48 RegisteredExtension::UnregisterAll(); |
50 Isolate::GlobalTearDown(); | 49 Isolate::GlobalTearDown(); |
51 sampler::Sampler::TearDown(); | 50 sampler::Sampler::TearDown(); |
52 FlagList::ResetAllFlags(); // Frees memory held by string arguments. | 51 FlagList::ResetAllFlags(); // Frees memory held by string arguments. |
53 } | 52 } |
54 | 53 |
55 | 54 |
56 void V8::InitializeOncePerProcessImpl() { | 55 void V8::InitializeOncePerProcessImpl() { |
57 FlagList::EnforceFlagImplications(); | 56 FlagList::EnforceFlagImplications(); |
58 | 57 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 123 |
125 void V8::SetSnapshotBlob(StartupData* snapshot_blob) { | 124 void V8::SetSnapshotBlob(StartupData* snapshot_blob) { |
126 #ifdef V8_USE_EXTERNAL_STARTUP_DATA | 125 #ifdef V8_USE_EXTERNAL_STARTUP_DATA |
127 base::CallOnce(&init_snapshot_once, &SetSnapshotFromFile, snapshot_blob); | 126 base::CallOnce(&init_snapshot_once, &SetSnapshotFromFile, snapshot_blob); |
128 #else | 127 #else |
129 CHECK(false); | 128 CHECK(false); |
130 #endif | 129 #endif |
131 } | 130 } |
132 } // namespace internal | 131 } // namespace internal |
133 } // namespace v8 | 132 } // namespace v8 |
OLD | NEW |