diff options
author | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 22:05:18 +0000 |
---|---|---|
committer | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 22:05:18 +0000 |
commit | dd50e0777dc325f9179eb8732b7d1c4852467948 (patch) | |
tree | b9c1d85f401744abd1d5426d871bfbd3966d7200 /webkit | |
parent | e69d33959a5b34c3796ffc55f187a073d92fd28f (diff) | |
download | chromium_src-dd50e0777dc325f9179eb8732b7d1c4852467948.zip chromium_src-dd50e0777dc325f9179eb8732b7d1c4852467948.tar.gz chromium_src-dd50e0777dc325f9179eb8732b7d1c4852467948.tar.bz2 |
Always disconnect event listeners when clearing for navigation, even if the script context is empty.
R=mbelshe
BUG=13266
TEST=gmail shouldn't crash anymore.
Review URL: http://codereview.chromium.org/119109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17546 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/port/bindings/v8/v8_proxy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webkit/port/bindings/v8/v8_proxy.cpp b/webkit/port/bindings/v8/v8_proxy.cpp index dcc2092..85b963f 100644 --- a/webkit/port/bindings/v8/v8_proxy.cpp +++ b/webkit/port/bindings/v8/v8_proxy.cpp @@ -1827,6 +1827,9 @@ void V8Proxy::clearForClose() void V8Proxy::clearForNavigation() { + // disconnect all event listeners + DisconnectEventListeners(); + if (!m_context.IsEmpty()) { v8::HandleScope handle; ClearDocumentWrapper(); @@ -1839,9 +1842,6 @@ void V8Proxy::clearForNavigation() ASSERT(!wrapper.IsEmpty()); wrapper->TurnOnAccessCheck(); - // disconnect all event listeners - DisconnectEventListeners(); - // Separate the context from its global object. m_context->DetachGlobal(); |