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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1439483003: - Add an OSThread structure which is the generic TLS structure for all C++ (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code-review Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 7f7198615bfcd3e32399ecf321b97f73a600e5f8..b220e1f58d93411a7fad4799b9770acffa5196a1 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1365,7 +1365,6 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
char** error) {
CHECK_NO_ISOLATE(Isolate::Current());
char* isolate_name = BuildIsolateName(script_uri, main);
- Thread::EnsureInit();
// Setup default flags in case none were passed.
Dart_IsolateFlags api_flags;
@@ -1459,26 +1458,25 @@ DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate) {
if (iso->HasMutatorThread()) {
FATAL("Multiple mutators within one isolate is not supported.");
}
- Thread::EnsureInit();
Thread::EnterIsolate(iso);
}
DART_EXPORT void Dart_ThreadDisableProfiling() {
- Thread* T = Thread::Current();
- if (T == NULL) {
+ OSThread* os_thread = OSThread::Current();
+ if (os_thread == NULL) {
return;
}
- T->DisableThreadInterrupts();
+ os_thread->DisableThreadInterrupts();
}
DART_EXPORT void Dart_ThreadEnableProfiling() {
- Thread* T = Thread::Current();
- if (T == NULL) {
+ OSThread* os_thread = OSThread::Current();
+ if (os_thread == NULL) {
return;
}
- T->EnableThreadInterrupts();
+ os_thread->EnableThreadInterrupts();
}
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698