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

Side by Side Diff: src/api.cc

Issue 1522703002: Add Isolate::DiscardThreadSpecificMetadata method to embedder API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove rocketsoftware wildcard from AUTHORS Created 5 years 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 | « include/v8.h ('k') | src/isolate.h » ('j') | 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 #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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698