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

Unified Diff: third_party/WebKit/Source/modules/permissions/Permissions.cpp

Issue 2446723002: Permissions: Avoid poking at the heap after Blink shutdown (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/permissions/Permissions.cpp
diff --git a/third_party/WebKit/Source/modules/permissions/Permissions.cpp b/third_party/WebKit/Source/modules/permissions/Permissions.cpp
index b3117794d08b21d18c6df9235b5f34eda1994b70..cebf9b8a670f6e3014121392f91c0f145a61aca3 100644
--- a/third_party/WebKit/Source/modules/permissions/Permissions.cpp
+++ b/third_party/WebKit/Source/modules/permissions/Permissions.cpp
@@ -264,6 +264,13 @@ PermissionService* Permissions::getService(ExecutionContext* executionContext) {
}
void Permissions::serviceConnectionError() {
+ if (!Platform::current()) {
+ // TODO(rockot): Remove this hack once renderer shutdown sequence is fixed.
+ // Note that reaching this code indicates that the MessageLoop has already
+ // been torn down, so it's impossible for any pending reply callbacks on
+ // |m_service| to fire beyond this point anyway.
+ return;
+ }
m_service.reset();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698