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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 7144 matching lines...) Loading... |
7155 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7155 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7156 if (!Utils::ApiCheck(!isolate->IsInUse(), | 7156 if (!Utils::ApiCheck(!isolate->IsInUse(), |
7157 "v8::Isolate::Dispose()", | 7157 "v8::Isolate::Dispose()", |
7158 "Disposing the isolate that is entered by a thread.")) { | 7158 "Disposing the isolate that is entered by a thread.")) { |
7159 return; | 7159 return; |
7160 } | 7160 } |
7161 isolate->TearDown(); | 7161 isolate->TearDown(); |
7162 } | 7162 } |
7163 | 7163 |
7164 | 7164 |
| 7165 void Isolate::DiscardThreadSpecificMetadata() { |
| 7166 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 7167 isolate->DiscardPerThreadDataForThisThread(); |
| 7168 } |
| 7169 |
| 7170 |
7165 void Isolate::Enter() { | 7171 void Isolate::Enter() { |
7166 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7172 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7167 isolate->Enter(); | 7173 isolate->Enter(); |
7168 } | 7174 } |
7169 | 7175 |
7170 | 7176 |
7171 void Isolate::Exit() { | 7177 void Isolate::Exit() { |
7172 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 7178 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
7173 isolate->Exit(); | 7179 isolate->Exit(); |
7174 } | 7180 } |
(...skipping 1311 matching lines...) Loading... |
8486 Address callback_address = | 8492 Address callback_address = |
8487 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8493 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8488 VMState<EXTERNAL> state(isolate); | 8494 VMState<EXTERNAL> state(isolate); |
8489 ExternalCallbackScope call_scope(isolate, callback_address); | 8495 ExternalCallbackScope call_scope(isolate, callback_address); |
8490 callback(info); | 8496 callback(info); |
8491 } | 8497 } |
8492 | 8498 |
8493 | 8499 |
8494 } // namespace internal | 8500 } // namespace internal |
8495 } // namespace v8 | 8501 } // namespace v8 |
OLD | NEW |