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

Unified Diff: Source/modules/websockets/NewWebSocketChannelImpl.h

Issue 405453002: [oilpan]: Don't assert the context is destroyed _after_ the NewWebSocketChannelImpl in oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/modules/websockets/NewWebSocketChannelImpl.h
diff --git a/Source/modules/websockets/NewWebSocketChannelImpl.h b/Source/modules/websockets/NewWebSocketChannelImpl.h
index 7364207bf23566ab37cd2c32ae56ded857561b8d..8cd282070ee657baa96bf3f132e55b4a523dd63b 100644
--- a/Source/modules/websockets/NewWebSocketChannelImpl.h
+++ b/Source/modules/websockets/NewWebSocketChannelImpl.h
@@ -150,7 +150,23 @@ private:
// LifecycleObserver functions.
// This object must be destroyed before the context.
sof 2014/07/17 13:39:30 surface nit: move this comment down into the #else
wibling-chromium 2014/07/17 14:16:49 Done.
- virtual void contextDestroyed() OVERRIDE { ASSERT_NOT_REACHED(); }
+ virtual void contextDestroyed() OVERRIDE
+ {
+#if ENABLE(OILPAN)
+ // In oilpan we cannot assume this channel's finalizer has been called
+ // before the document it is observing is dead and finalized since there
+ // is no eager finalization. Instead the finalization happens at the
+ // next GC which could be long enough after the Peer::destroy call for
+ // the context (ie. Document) to be dead too. If the context's finalizer
+ // is run first this method gets called. Instead we assert the channel
+ // has been disconnected which happens in Peer::destroy.
+ ASSERT(!m_handle);
+ ASSERT(!m_client);
+ ASSERT(!m_identifier);
+#else
+ ASSERT_NOT_REACHED();
+#endif
+ }
// m_handle is a handle of the connection.
// m_handle == 0 means this channel is closed.
« 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