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

Unified Diff: sky/engine/core/script/dom_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
Index: sky/engine/core/script/dom_dart_state.cc
diff --git a/sky/engine/core/script/dom_dart_state.cc b/sky/engine/core/script/dom_dart_state.cc
index ecc429fb203f8b37c1d73f14103aea0156736fa1..439c7ca92691ae94088565d88245e2f9a9456d84 100644
--- a/sky/engine/core/script/dom_dart_state.cc
+++ b/sky/engine/core/script/dom_dart_state.cc
@@ -16,6 +16,10 @@ DOMDartState::DOMDartState(Document* document, const KURL& url)
}
DOMDartState::~DOMDartState() {
+ // We've already destroyed the isolate. Revoke any weak ptrs held by
+ // DartPersistentValues so they don't try to enter the destroyed isolate to
+ // clean themselves up.
+ weak_factory_.InvalidateWeakPtrs();
}
void DOMDartState::DidSetIsolate() {

Powered by Google App Engine
This is Rietveld 408576698