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

Issue 2773003002: Make the WebWidgetClient parameter a ref so it's not legal to pass a nullptr. (Closed)

Created:
3 years, 9 months ago by slangley
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dcheng, dglazkov+blink, jam, jochen+watch_chromium.org, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, Peter Beverloo
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that the WebWidgetClient cannot be a nullptr by adding DCHECK()s. There was only one call site in print_web_view_helper where a nullptr was being passed instead of a valid WebWidgetClient, to fix this the following changes were also made: * Make WebWidgetClient dtor public so the class can be instantiated. * Pass a valid WebWidgetClient in the print_web_view_helper A subsequent CL will analyze and remove m_client null checks in WebFrameWidgetImpl. I left WebFrameViewClient as a ref as this appears to be internal to blink and will adhere to blink standards. BUG=696895 Review-Url: https://codereview.chromium.org/2773003002 Cr-Commit-Position: refs/heads/master@{#460235} Committed: https://chromium.googlesource.com/chromium/src/+/9df2c54436a76ebaf6bfcc317815e776e4a0a7f5

Patch Set 1 #

Patch Set 2 : Make WebWidgetClient parameter a pointer again, and dcheck it's valid. #

Patch Set 3 : Break dependancy on upstream branch. #

Patch Set 4 : WebViewTestClient now overrides the virtual dtor in WebWidgetClient. #

Patch Set 5 : WebViewClient dtor now overrides the virtual dtor in WebWidgetClient. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -11 lines) Patch
M components/printing/renderer/print_web_view_helper.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/shell/test_runner/web_view_test_client.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/shell/test_runner/web_widget_test_client.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/WebViewClient.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/web/WebWidgetClient.h View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 33 (17 generated)
slangley
3 years, 9 months ago (2017-03-24 02:40:11 UTC) #3
dcheng
So I know I said that we use non-mutable references in Blink for things that ...
3 years, 9 months ago (2017-03-24 04:32:59 UTC) #5
haraken
On 2017/03/24 04:32:59, dcheng wrote: > So I know I said that we use non-mutable ...
3 years, 9 months ago (2017-03-24 04:39:26 UTC) #6
slangley
TBH I'm strongly opposed to using non const ref arguments (I need to respond to ...
3 years, 9 months ago (2017-03-24 04:55:58 UTC) #7
slangley
TBH I'm strongly opposed to using non const ref arguments (I need to respond to ...
3 years, 9 months ago (2017-03-24 04:55:58 UTC) #8
slangley
ptal
3 years, 9 months ago (2017-03-24 05:33:24 UTC) #10
dcheng
LGTM
3 years, 9 months ago (2017-03-24 05:35:47 UTC) #11
haraken
LGTM
3 years, 9 months ago (2017-03-24 05:36:04 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2773003002/40001
3 years, 9 months ago (2017-03-28 00:07:47 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/395848)
3 years, 9 months ago (2017-03-28 00:16:08 UTC) #17
slangley
+mkwst@ for content/shell OWNERS +dpapad@ for components/printing/renderer OWNERS
3 years, 9 months ago (2017-03-28 00:23:07 UTC) #19
dpapad
On 2017/03/28 at 00:23:07, slangley wrote: > +mkwst@ for content/shell OWNERS > +dpapad@ for components/printing/renderer ...
3 years, 9 months ago (2017-03-28 01:20:08 UTC) #21
Mike West
//content/shell LGTM.
3 years, 8 months ago (2017-03-28 10:11:37 UTC) #26
Lei Zhang
lgtm assuming this doesn't change the blink::WebFrameWidget::create() behavior w.r.t. printing.
3 years, 8 months ago (2017-03-28 17:41:54 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2773003002/80001
3 years, 8 months ago (2017-03-28 22:58:41 UTC) #30
commit-bot: I haz the power
3 years, 8 months ago (2017-03-28 23:21:53 UTC) #33
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9df2c54436a76ebaf6bfcc317815...

Powered by Google App Engine
This is Rietveld 408576698