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

Unified Diff: sky/engine/tonic/dart_state.h

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
Index: sky/engine/tonic/dart_state.h
diff --git a/sky/engine/tonic/dart_state.h b/sky/engine/tonic/dart_state.h
index 27d25e389aeef121b26c2b8878bb4192753cf1b3..83eca4da71f52477da342c92db545596694c1747 100644
--- a/sky/engine/tonic/dart_state.h
+++ b/sky/engine/tonic/dart_state.h
@@ -48,11 +48,7 @@ class DartState : public base::SupportsUserData {
base::WeakPtr<DartState> GetWeakPtr();
Dart_Isolate isolate() { return isolate_; }
- void set_isolate(Dart_Isolate isolate) {
- CHECK(!isolate_);
- isolate_ = isolate;
- DidSetIsolateInternal();
- }
+ void SetIsolate(Dart_Isolate isolate);
DartClassLibrary& class_library() { return *class_library_; }
DartStringCache& string_cache() { return *string_cache_; }
@@ -64,16 +60,15 @@ class DartState : public base::SupportsUserData {
virtual void DidSetIsolate() {}
private:
- void DidSetIsolateInternal();
-
Dart_Isolate isolate_;
OwnPtr<DartClassLibrary> class_library_;
OwnPtr<DartStringCache> string_cache_;
OwnPtr<DartExceptionFactory> exception_factory_;
OwnPtr<DartTimerHeap> timer_heap_;
+ DartPersistentValue index_handle_;
+ protected:
base::WeakPtrFactory<DartState> weak_factory_;
- DartPersistentValue index_handle_;
DISALLOW_COPY_AND_ASSIGN(DartState);
};

Powered by Google App Engine
This is Rietveld 408576698