Commit 019b09b7 authored by wibling@chromium.org's avatar wibling@chromium.org

[oilpan]: Don't assert the context is destroyed _after_ the NewWebSocketChannelImpl in oilpan.

This should fix a couple of the crashes we are seeing in the debug oilpan builds for websockets.

R=ager@chromium.org, erik.corry@gmail.com, haraken@chromium.org, oilpan-reviews@chromium.org, tkent@chromium.org, tyoshino@chromium.org, vegorov@chromium.org, yhirano@chromium.org, zerny@chromium.org
BUG=

Review URL: https://codereview.chromium.org/405453002

git-svn-id: svn://svn.chromium.org/blink/trunk@178379 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 09ef779f
...@@ -149,8 +149,24 @@ private: ...@@ -149,8 +149,24 @@ private:
void didFailLoadingBlob(FileError::ErrorCode); void didFailLoadingBlob(FileError::ErrorCode);
// LifecycleObserver functions. // LifecycleObserver functions.
// This object must be destroyed before the context. virtual void contextDestroyed() OVERRIDE
virtual void contextDestroyed() OVERRIDE { ASSERT_NOT_REACHED(); } {
#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
// This object must be destroyed before the context.
ASSERT_NOT_REACHED();
#endif
}
// m_handle is a handle of the connection. // m_handle is a handle of the connection.
// m_handle == 0 means this channel is closed. // m_handle == 0 means this channel is closed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment