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

Unified Diff: sky/engine/tonic/dart_state.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 | « sky/engine/tonic/dart_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/tonic/dart_state.cc
diff --git a/sky/engine/tonic/dart_state.cc b/sky/engine/tonic/dart_state.cc
index c5bcdff71ebb2a3fd187fa3499c37d24724c37d3..a614d01e6404a3591093cb04c1ceda0a54c1adba 100644
--- a/sky/engine/tonic/dart_state.cc
+++ b/sky/engine/tonic/dart_state.cc
@@ -32,12 +32,16 @@ DartState::DartState()
DartState::~DartState() {
}
-void DartState::DidSetIsolateInternal() {
- {
- Scope dart_scope(this);
- index_handle_.Set(this, ToDart("index"));
+void DartState::SetIsolate(Dart_Isolate isolate) {
+ CHECK(!isolate_);
+ isolate_ = isolate;
+ if (isolate_) {
eseidel 2015/06/10 19:56:41 I might have early returned instead. but ok.
+ {
+ Scope dart_scope(this);
+ index_handle_.Set(this, ToDart("index"));
+ }
+ DidSetIsolate();
}
- DidSetIsolate();
}
DartState* DartState::From(Dart_Isolate isolate) {
« no previous file with comments | « sky/engine/tonic/dart_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698