2008-05-30 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / WebCore / page / Frame.cpp
index 08aa942037b39a21eccb6edd385622818862cb60..c74f84262fd6c45f4c525a104221b5a0d517d5b8 100644 (file)
@@ -260,10 +260,7 @@ void Frame::setDocument(PassRefPtr<Document> newDoc)
         d->m_doc->attach();
 
     // Update the cached 'document' property, which is now stale.
-    if (d->m_doc && d->m_jscript.haveWindowShell()) {
-        JSLock lock;
-        d->m_jscript.windowShell()->updateDocument();
-    }
+    d->m_jscript.updateDocument();
 }
 
 Settings* Frame::settings() const