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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 Bootstrapper::InitializeOncePerProcess(); | 92 Bootstrapper::InitializeOncePerProcess(); |
93 } | 93 } |
94 | 94 |
95 | 95 |
96 void V8::InitializeOncePerProcess() { | 96 void V8::InitializeOncePerProcess() { |
97 base::CallOnce(&init_once, &InitializeOncePerProcessImpl); | 97 base::CallOnce(&init_once, &InitializeOncePerProcessImpl); |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 void V8::InitializePlatform(v8::Platform* platform) { | 101 void V8::InitializePlatform(v8::Platform* platform) { |
102 ASSERT(!platform_); | 102 CHECK(!platform_); |
103 ASSERT(platform); | 103 CHECK(platform); |
104 platform_ = platform; | 104 platform_ = platform; |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 void V8::ShutdownPlatform() { | 108 void V8::ShutdownPlatform() { |
109 ASSERT(platform_); | 109 CHECK(platform_); |
110 platform_ = NULL; | 110 platform_ = NULL; |
111 } | 111 } |
112 | 112 |
113 | 113 |
114 v8::Platform* V8::GetCurrentPlatform() { | 114 v8::Platform* V8::GetCurrentPlatform() { |
115 ASSERT(platform_); | 115 ASSERT(platform_); |
116 return platform_; | 116 return platform_; |
117 } | 117 } |
118 | 118 |
119 } } // namespace v8::internal | 119 } } // namespace v8::internal |
OLD | NEW |