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

Issue 943633003: [WebView] Remove onFailure from VisualStateCallback. (Closed)

Created:
5 years, 10 months ago by Ignacio Solla
Modified:
5 years ago
Reviewers:
jam, boliu, piman
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, android-webview-reviews_chromium.org, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WebView] Remove onFailure from VisualStateCallback. onFailure is only invoked when the render frame has been destroyed, but it is not really useful to distinguish onComplete from onFailure in that case. This also addresses the feedback that we received from API Council. BUG=459539, 457184 COLLABORATOR=tobiasjs@chromium.org

Patch Set 1 #

Total comments: 6

Patch Set 2 : Closure #

Patch Set 3 : Keep callback invocation from ~RenderFrameHostImpl #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -37 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 2 chunks +6 lines, -9 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/VisualStateTest.java View 4 chunks +0 lines, -20 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 2 chunks +2 lines, -2 lines 1 comment Download
M content/public/browser/render_frame_host.h View 1 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 13 (2 generated)
Ignacio Solla
5 years, 10 months ago (2015-02-19 18:28:10 UTC) #2
boliu
https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (left): https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#oldcode207 content/browser/frame_host/render_frame_host_impl.cc:207: } There's a bit inconsistent between renderer and browser ...
5 years, 10 months ago (2015-02-19 18:43:42 UTC) #3
Ignacio Solla
https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (left): https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#oldcode207 content/browser/frame_host/render_frame_host_impl.cc:207: } On 2015/02/19 18:43:41, boliu wrote: > There's a ...
5 years, 10 months ago (2015-02-20 11:10:41 UTC) #4
boliu
+piman https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (left): https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#oldcode207 content/browser/frame_host/render_frame_host_impl.cc:207: } On 2015/02/20 11:10:41, Ignacio Solla wrote: > ...
5 years, 10 months ago (2015-02-20 16:50:55 UTC) #6
Ignacio Solla
On 2015/02/20 16:50:55, boliu wrote: > +piman > > https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc > File content/browser/frame_host/render_frame_host_impl.cc (left): > ...
5 years, 10 months ago (2015-02-20 16:56:54 UTC) #7
piman
On 2015/02/20 16:50:55, boliu wrote: > +piman > > https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc > File content/browser/frame_host/render_frame_host_impl.cc (left): > ...
5 years, 10 months ago (2015-02-20 18:37:31 UTC) #8
Ignacio Solla
https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (left): https://codereview.chromium.org/943633003/diff/1/content/browser/frame_host/render_frame_host_impl.cc#oldcode207 content/browser/frame_host/render_frame_host_impl.cc:207: } On 2015/02/19 18:43:41, boliu wrote: > There's a ...
5 years, 10 months ago (2015-02-24 12:49:35 UTC) #9
boliu
aw lgtm
5 years, 10 months ago (2015-02-24 17:55:37 UTC) #10
piman
https://codereview.chromium.org/943633003/diff/40001/content/browser/frame_host/render_frame_host_impl.cc File content/browser/frame_host/render_frame_host_impl.cc (right): https://codereview.chromium.org/943633003/diff/40001/content/browser/frame_host/render_frame_host_impl.cc#newcode206 content/browser/frame_host/render_frame_host_impl.cc:206: iter.second.Run(); I think we want to keep the bool ...
5 years, 10 months ago (2015-02-24 21:51:23 UTC) #11
Tobias Sargeant
On 2015/02/24 21:51:23, piman (Very slow to review) wrote: > https://codereview.chromium.org/943633003/diff/40001/content/browser/frame_host/render_frame_host_impl.cc#newcode206 > content/browser/frame_host/render_frame_host_impl.cc:206: iter.second.Run(); > ...
5 years, 10 months ago (2015-02-26 17:09:28 UTC) #12
piman
5 years, 9 months ago (2015-02-27 22:16:26 UTC) #13
On Thu, Feb 26, 2015 at 9:09 AM, <tobiasjs@chromium.org> wrote:

> On 2015/02/24 21:51:23, piman (Very slow to review) wrote:
>
>
> https://codereview.chromium.org/943633003/diff/40001/
> content/browser/frame_host/render_frame_host_impl.cc#newcode206
>
>> content/browser/frame_host/render_frame_host_impl.cc:206:
>> iter.second.Run();
>> I think we want to keep the bool here. We would want to differentiate
>> success
>>
> vs
>
>> failure.
>>
>
> I started looking at what would be required to report the bool correctly
> in the
> case where a swap failed (as discussed in crbug/459539) and pretty quickly
> hit a
> problem. The response object is constructed as soon as the request is
> received,
> and at that point it's not known whether the swap will fail. By the time
> that
> the messages are requeued for delivery in FrameSwapMessageQueue::Did(
> Not)Swap,
> we are dealing with IPC::Message pointers, so it seems like it's not
> possible to
> insert the value of the boolean at the point where we finally know.
>
> I can think of a couple of ways around this, but none of them feel
> particularly
> clean.
>
> In light of this, would you prefer to drop the bool, or find a way to
> deliver it
> accurately?
>

It seems from the bug that the only case we want to return false is on tear
down (via COMMIT_FAILS). When that happens, we'll eventually tear down the
frame on the host side and send the callback here (with false).
So all we need to do is to not send the IPC if COMMIT_FAILS (i.e. it would
be equivalent to the renderer crashing). You can probably do that by
changing FrameSwapMessageQueue::DidNotSwap, so that instead of returning
the  visual_state_queue_ messages on COMMIT_FAILS, they'd get deleted.


>
> https://codereview.chromium.org/943633003/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698