- WebKit part of fix for <rdar://problem/
5262230> Crash while loading a popup in addictinggames.com
Made closeWindowSoon fire on a timer instead of happening synchronously.
* WebChromeClient.cpp:
(WebChromeClient::closeWindowSoon): Actually close the window on a timer, not immediately.
* WebKit.vcproj/WebKit.vcproj:
* WebView.cpp:
(WebView::WebView):
(WebView::closeWindowSoon):
(WebView::closeWindowTimerFired):
* WebView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24463
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-07-19 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam.
+
+ - WebKit part of fix for <rdar://problem/5262230> Crash while loading a popup in addictinggames.com
+
+ Made closeWindowSoon fire on a timer instead of happening synchronously.
+
+ * WebChromeClient.cpp:
+ (WebChromeClient::closeWindowSoon): Actually close the window on a timer, not immediately.
+ * WebKit.vcproj/WebKit.vcproj:
+ * WebView.cpp:
+ (WebView::WebView):
+ (WebView::closeWindowSoon):
+ (WebView::closeWindowTimerFired):
+ * WebView.h:
+
2007-07-18 Timothy Hatcher <timothy@apple.com>
Reviewed by Adam.
m_webView->setGroupName(0);
m_webView->stopLoading(0);
- m_webView->closeWindow();
+ m_webView->closeWindowSoon();
}
void WebChromeClient::runJavaScriptAlert(Frame*, const String& message)
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4127"
+ DisableSpecificWarnings="4127;4355"
ForcedIncludeFiles="CodeAnalysisConfig.h"
EnablePREfast="$(EnablePREfast)"
/>
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4127"
+ DisableSpecificWarnings="4127;4355"
ForcedIncludeFiles="CodeAnalysisConfig.h"
EnablePREfast="$(EnablePREfast)"
/>
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
- DisableSpecificWarnings="4127"
+ DisableSpecificWarnings="4127;4355"
ForcedIncludeFiles="CodeAnalysisConfig.h"
EnablePREfast="$(EnablePREfast)"
/>
, m_didClose(false)
, m_inIMEComposition(0)
, m_toolTipHwnd(0)
+, m_closeWindowTimer(this, &WebView::closeWindowTimerFired)
{
KJS::Collector::registerAsMainThread();
::GetWindowRect(m_viewWindow, rect);
}
+void WebView::closeWindowSoon()
+{
+ m_closeWindowTimer.startOneShot(0);
+ AddRef();
+}
+
+void WebView::closeWindowTimerFired(WebCore::Timer<WebView>*)
+{
+ closeWindow();
+ Release();
+}
+
void WebView::closeWindow()
{
if (m_hasSpellCheckerDocumentTag) {
#include "WebFrame.h"
#include <WebCore/IntRect.h>
+#include <WebCore/Timer.h>
#include <wtf/OwnPtr.h>
class WebFrame;
void deleteBackingStore();
void frameRect(RECT* rect);
void closeWindow();
+ void closeWindowSoon();
void close();
bool didClose() const { return m_didClose; }
void setProhibitsMainFrameScrolling(bool = true);
bool continuousCheckingAllowed();
void initializeCacheSizesIfNecessary();
void initializeToolTipWindow();
+ void closeWindowTimerFired(WebCore::Timer<WebView>*);
void prepareCandidateWindow(WebCore::Frame*, HIMC);
void updateSelectionForIME();
bool onIMERequestCharPosition(WebCore::Frame*, IMECHARPOSITION*, LRESULT*);
bool onIMERequestReconvertString(WebCore::Frame*, RECONVERTSTRING*, LRESULT*);
+
ULONG m_refCount;
WebCore::String m_groupName;
HWND m_hostWindow;
WebCore::String m_toolTip;
static bool s_allowSiteSpecificHacks;
+
+ WebCore::Timer<WebView> m_closeWindowTimer;
};
#endif