Chromium Code Reviews| 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) { |