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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2773003002: Make the WebWidgetClient parameter a ref so it's not legal to pass a nullptr. (Closed)
Patch Set: WebViewClient dtor now overrides the virtual dtor in WebWidgetClient. Created 3 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
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 1520ff5c1370becdc77471eba821be9dd72a6fe3..5f235c711f502c0e4f278d903c1435bb9988525c 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -82,6 +82,7 @@ namespace blink {
WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client,
WebLocalFrame* localRoot) {
+ DCHECK(client) << "A valid WebWidgetClient must be supplied.";
// Pass the WebFrameWidget's self-reference to the caller.
return WebFrameWidgetImpl::create(client, localRoot);
}
@@ -89,12 +90,14 @@ WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client,
WebFrameWidget* WebFrameWidget::create(WebWidgetClient* client,
WebView* webView,
WebLocalFrame* mainFrame) {
- return new WebViewFrameWidget(client, toWebViewImpl(*webView),
+ DCHECK(client) << "A valid WebWidgetClient must be supplied.";
+ return new WebViewFrameWidget(*client, toWebViewImpl(*webView),
toWebLocalFrameImpl(*mainFrame));
}
WebFrameWidgetImpl* WebFrameWidgetImpl::create(WebWidgetClient* client,
WebLocalFrame* localRoot) {
+ DCHECK(client) << "A valid WebWidgetClient must be supplied.";
// Pass the WebFrameWidgetImpl's self-reference to the caller.
return new WebFrameWidgetImpl(
client, localRoot); // SelfKeepAlive is set in constructor.
« no previous file with comments | « content/shell/test_runner/web_widget_test_client.h ('k') | third_party/WebKit/Source/web/WebViewFrameWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698