Reviewed by John.
[WebKit-https.git] / WebCore / kwq / KWQPageState.mm
index e7548e243b8c61cf4aeb407663618c57cdc8bcd0..110cd5bd9616edb40196a0cb63c14e4c9acace65 100644 (file)
@@ -134,6 +134,7 @@ using KJS::SavedBuiltins;
         document->setInPageCache(NO);
         if (detached) {
             document->detach();
+            document->removeAllEventListenersFromAllNodes();
         }
         document->deref();
         
@@ -169,6 +170,7 @@ using KJS::SavedBuiltins;
         document->setInPageCache(NO);
         if (detached) {
             document->detach();
+            document->removeAllEventListenersFromAllNodes();
         }
         document->deref();