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

Unified Diff: third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp

Issue 2444103002: Broadcast Channel: 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/broadcastchannel/BroadcastChannel.cpp
diff --git a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
index e282b74c62b8dc504e65f610ad7becc2994cd472..215b097587284cd755f9288ad1209a50a9f2a525 100644
--- a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
+++ b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
@@ -74,6 +74,14 @@ void BroadcastChannel::postMessage(const ScriptValue& message,
}
void BroadcastChannel::close() {
+ 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 further incoming messages to be
+ // dispatched on |m_binding| or reply callbacks to be invoked from
+ // |m_remoteClient|.
+ return;
+ }
m_remoteClient.reset();
if (m_binding.is_bound())
m_binding.Close();
« 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