Chromium Code Reviews| 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. |