Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 219163005: Move dispatchUnloadEvent to WebFrame, part 1/3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index d8dba48c527ac8ec15612711b359f1ccbd023485..11df1f3f62de0004d6636c61b418a41a7b9ad9e9 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2403,8 +2403,12 @@ void WebViewImpl::setPageEncoding(const WebString& encodingName)
void WebViewImpl::dispatchUnloadEvent()
{
+ WebFrame* frame = mainFrame();
+ if (!frame)
+ return;
+
// Run unload handlers.
- m_page->mainFrame()->loader().closeURL();
+ frame->dispatchUnloadEvent();
}
WebFrame* WebViewImpl::mainFrame()
« no previous file with comments | « Source/web/WebFrameImpl.cpp ('k') | Source/web/tests/WebViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698