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

Unified Diff: sky/engine/core/script/dart_controller.cc

Issue 1175053002: Fix shutdown crash in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more idiot-proof Created 5 years, 6 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 | sky/engine/core/script/dom_dart_state.cc » ('j') | sky/engine/tonic/dart_state.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dart_controller.cc
diff --git a/sky/engine/core/script/dart_controller.cc b/sky/engine/core/script/dart_controller.cc
index 62665abac720fb4f9b15a720afb076927ac277ed..37f9cfe656a1f55655b6661884dd0f9f69a09ac8 100644
--- a/sky/engine/core/script/dart_controller.cc
+++ b/sky/engine/core/script/dart_controller.cc
@@ -246,7 +246,7 @@ static Dart_Isolate IsolateCreateCallback(const char* script_uri,
nullptr,
error);
CHECK(isolate) << error;
- dart_state->set_isolate(isolate);
+ dart_state->SetIsolate(isolate);
CHECK(Dart_IsServiceIsolate(isolate));
CHECK(!LogIfError(Dart_SetLibraryTagHandler(LibraryTagHandler)));
{
@@ -276,7 +276,7 @@ static Dart_Isolate IsolateCreateCallback(const char* script_uri,
Dart_Isolate isolate = Dart_CreateIsolate("sky:handle_watcher", "",
kDartIsolateSnapshotBuffer, dart_state, error);
CHECK(isolate) << error;
- dart_state->set_isolate(isolate);
+ dart_state->SetIsolate(isolate);
CHECK(!LogIfError(Dart_SetLibraryTagHandler(LibraryTagHandler)));
@@ -324,7 +324,7 @@ void DartController::CreateIsolateFor(PassOwnPtr<DOMDartState> state) {
static_cast<DartState*>(dom_dart_state_.get()), &error);
Dart_SetMessageNotifyCallback(MessageNotifyCallback);
CHECK(isolate) << error;
- dom_dart_state_->set_isolate(isolate);
+ dom_dart_state_->SetIsolate(isolate);
Dart_SetGcCallbacks(DartGCPrologue, DartGCEpilogue);
CHECK(!LogIfError(Dart_SetLibraryTagHandler(LibraryTagHandler)));
@@ -362,6 +362,7 @@ void DartController::ClearForClose() {
// Don't use a DartIsolateScope here since we never exit the isolate.
Dart_EnterIsolate(dom_dart_state_->isolate());
Dart_ShutdownIsolate();
+ dom_dart_state_->SetIsolate(nullptr);
dom_dart_state_.clear();
}
« no previous file with comments | « no previous file | sky/engine/core/script/dom_dart_state.cc » ('j') | sky/engine/tonic/dart_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698