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

Issue 914993006: Upstream web_controller_provider and dependencies (Closed)

Created:
5 years, 10 months ago by sdefresne
Modified:
5 years, 10 months ago
CC:
chromium-reviews, stuartmorgan, Eugene But (OOO till 7-30)
Base URL:
https://chromium.googlesource.com/chromium/src.git@libusb
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Upstream web_controller_provider.{h,mm} and block_types.h WebControllerProvider provides URL-loading and JavaScript injection with optional dialog suppression. BUG=459678, 429756 Committed: https://crrev.com/9a5cfc9389557f2e27dcd307f25690cb1c407d7d Cr-Commit-Position: refs/heads/master@{#317041}

Patch Set 1 #

Patch Set 2 : Fix dependencies #

Patch Set 3 : git cl upload --no-find-copies #

Total comments: 14

Patch Set 4 : Address comments #

Patch Set 5 : Remove weak dependency on WebKit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -0 lines) Patch
M ios/ios.gyp View 1 chunk +1 line, -0 lines 0 comments Download
A ios/provider/ios_provider_web.gyp View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
A ios/public/provider/web/OWNERS View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A ios/public/provider/web/web_controller_provider.h View 1 2 3 1 chunk +67 lines, -0 lines 0 comments Download
A ios/public/provider/web/web_controller_provider.mm View 1 chunk +53 lines, -0 lines 0 comments Download
M ios/web/ios_web.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A ios/web/public/block_types.h View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
sdefresne
Please take a look.
5 years, 10 months ago (2015-02-18 18:54:54 UTC) #2
sdefresne
-stuartmorgan, +droger: using a local reviewer for quicker review cycle
5 years, 10 months ago (2015-02-19 09:33:27 UTC) #4
droger
CC stuartmorgan: Can you look at the comment about web_view_completion_handler below? https://codereview.chromium.org/914993006/diff/40001/ios/public/provider/web/web_controller_provider.h File ios/public/provider/web/web_controller_provider.h (right): ...
5 years, 10 months ago (2015-02-19 10:51:04 UTC) #5
sdefresne
PTAL https://codereview.chromium.org/914993006/diff/40001/ios/public/provider/web/web_controller_provider.h File ios/public/provider/web/web_controller_provider.h (right): https://codereview.chromium.org/914993006/diff/40001/ios/public/provider/web/web_controller_provider.h#newcode9 ios/public/provider/web/web_controller_provider.h:9: #include "ios/web/public/web_state/web_state_observer.h" On 2015/02/19 10:51:04, droger wrote: > ...
5 years, 10 months ago (2015-02-19 13:39:08 UTC) #6
droger
lgtm
5 years, 10 months ago (2015-02-19 13:49:35 UTC) #7
sdefresne
lgtm
5 years, 10 months ago (2015-02-19 13:52:01 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/914993006/80001
5 years, 10 months ago (2015-02-19 13:52:18 UTC) #10
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 10 months ago (2015-02-19 14:10:33 UTC) #11
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/9a5cfc9389557f2e27dcd307f25690cb1c407d7d Cr-Commit-Position: refs/heads/master@{#317041}
5 years, 10 months ago (2015-02-19 14:10:57 UTC) #12
stuartmorgan
CCing Eugene for the block autorelease comment. https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web_view_js_utils.mm File ios/web/web_state/ui/web_view_js_utils.mm (right): https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web_view_js_utils.mm#newcode68 ios/web/web_state/ui/web_view_js_utils.mm:68: [web_view_completion_handler autorelease]; ...
5 years, 10 months ago (2015-02-19 14:23:54 UTC) #13
Eugene But (OOO till 7-30)
https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web_view_js_utils.mm File ios/web/web_state/ui/web_view_js_utils.mm (right): https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web_view_js_utils.mm#newcode68 ios/web/web_state/ui/web_view_js_utils.mm:68: [web_view_completion_handler autorelease]; On 2015/02/19 14:23:54, stuartmorgan wrote: > On ...
5 years, 10 months ago (2015-02-23 03:20:12 UTC) #15
sdefresne
5 years, 10 months ago (2015-02-23 08:57:41 UTC) #16
Message was sent while issue was closed.
On 2015/02/23 at 03:20:12, eugenebut wrote:
>
https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web...
> File ios/web/web_state/ui/web_view_js_utils.mm (right):
> 
>
https://codereview.chromium.org/914993006/diff/40001/ios/web/web_state/ui/web...
> ios/web/web_state/ui/web_view_js_utils.mm:68: [web_view_completion_handler
autorelease];
> On 2015/02/19 14:23:54, stuartmorgan wrote:
> > On 2015/02/19 10:51:04, droger wrote:
> > > This looks like a bug.
> > > I think that the block captures web_view_completion_handler by value
(since
> > the
> > > variable is not __block), and thus it is nil (as defined on line 56
above).
> > > 
> > > I am not sure what the intent was, but maybe the variable should be
declared
> > as
> > > __block.
> > > 
> > > stuartmorgan: can you comment on this?
> > 
> > Yep, this does look worrying. I'll investigate.
> What exactly looks wrong to you? Functionality or memory management? AFAIK
__block keyword is required only if variable is changed inside the block.

Without __block, the variable is captured by copy in the block. Since the block
is defined before the variable is assigned, the block capture a value of nil.
The current code looks equivalent to:

id web_completion_handler = nil;
id another_block_variable = ^(NSString*, NSError*) {
  [web_completion_handler release];
};
web_completion_handler = [another_block_variable copy];

Powered by Google App Engine
This is Rietveld 408576698