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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1242343002: Remove more uses of Isolate::current_zone. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Access isolate via thread. Created 5 years, 5 months 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 | « no previous file | runtime/vm/dart_api_state.h » ('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 b701c0e28a4deab358e5b16cedf0e4fb55997ca3..052011af06a0134e79ee1c84c544aad95536ad49 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1773,19 +1773,20 @@ DART_EXPORT Dart_Port Dart_GetMainPortId() {
// --- Scopes ----
DART_EXPORT void Dart_EnterScope() {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
CHECK_ISOLATE(isolate);
ApiState* state = isolate->api_state();
ASSERT(state != NULL);
ApiLocalScope* new_scope = state->reusable_scope();
if (new_scope == NULL) {
new_scope = new ApiLocalScope(state->top_scope(),
- isolate->top_exit_frame_info());
+ thread->top_exit_frame_info());
ASSERT(new_scope != NULL);
} else {
- new_scope->Reinit(isolate,
+ new_scope->Reinit(thread,
state->top_scope(),
- isolate->top_exit_frame_info());
+ thread->top_exit_frame_info());
state->set_reusable_scope(NULL);
}
state->set_top_scope(new_scope); // New scope is now the top scope.
@@ -1793,14 +1794,15 @@ DART_EXPORT void Dart_EnterScope() {
DART_EXPORT void Dart_ExitScope() {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
CHECK_ISOLATE_SCOPE(isolate);
ApiState* state = isolate->api_state();
ApiLocalScope* scope = state->top_scope();
ApiLocalScope* reusable_scope = state->reusable_scope();
state->set_top_scope(scope->previous()); // Reset top scope to previous.
if (reusable_scope == NULL) {
- scope->Reset(isolate); // Reset the old scope which we just exited.
+ scope->Reset(thread); // Reset the old scope which we just exited.
state->set_reusable_scope(scope);
} else {
ASSERT(reusable_scope != scope);
« no previous file with comments | « no previous file | runtime/vm/dart_api_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698