|
|
Created:
6 years, 4 months ago by jdduke (slow) Modified:
6 years, 3 months ago CC:
chromium-reviews, darin-cc_chromium.org, jam, nona+watch_chromium.org, penghuang+watch_chromium.org, James Su, yukishiino+watch_chromium.org, yusukes+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
Description[Android] Speculative fix for crash during overscroll effect creation
Crash reports indicate that the WindowAndroid's Compositor may be NULL
during |RenderWidgetHostViewAndroid::SetContentViewCore()|. While this
is a somewhat surprising result, it is in theory possible and should
probably not be fatal. Avoid creating the overscroll effect in this
case, instead creating it after the compositor is (re-)attached.
BUG=407208
Committed: https://crrev.com/7936233f8fb1bc6a969b24474d0f32d03dd832af
Cr-Commit-Position: refs/heads/master@{#291835}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Cleanup #
Total comments: 1
Patch Set 3 : Final check #
Messages
Total messages: 21 (0 generated)
aelias@: I can't repro this issue, and I'm not sure what else to do short of performing the NULL checks and returning. We have other DCHECKs for GetWindowAndroid()/GetCompositor() at other, critical parts of the pipeline, so I'm inclined to move forward with this for M38 (looks like the #2 crash).
Hmm, strictly speaking we should also create the overscroll effect when the Compositor is attached to the ContentViewCore, if it wasn't created here. Less harmful than the crash, but... in general with this kind of issue it's better to get to the bottom of it. Daniel, do you understand what scenario this might happen in?
On 2014/08/25 20:06:49, aelias wrote: > Hmm, strictly speaking we should also create the overscroll effect when the > Compositor is attached to the ContentViewCore, if it wasn't created here. Less > harmful than the crash, but... in general with this kind of issue it's better to > get to the bottom of it. Daniel, do you understand what scenario this might > happen in? Hmm, I guess I could listen to |On{Attach|Detach}Compositor()|, sievers@ do you have any thoughts here?
https://codereview.chromium.org/503813003/diff/1/content/browser/renderer_hos... File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/503813003/diff/1/content/browser/renderer_hos... content/browser/renderer_host/render_widget_host_view_android.cc:1637: content_view_core_->GetWindowAndroid() && content_view_core_->GetWindowAndroid() == NULL seems like an unexpected bug, see content_view_core_impl.cc: ContentViewCoreImpl::ContentViewCoreImpl() ... DCHECK(window_android_); and it cannot change.
https://codereview.chromium.org/503813003/diff/1/content/browser/renderer_hos... File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/503813003/diff/1/content/browser/renderer_hos... content/browser/renderer_host/render_widget_host_view_android.cc:1637: content_view_core_->GetWindowAndroid() && On 2014/08/25 20:37:36, sievers wrote: > content_view_core_->GetWindowAndroid() == NULL seems like an unexpected bug, > see content_view_core_impl.cc: > > ContentViewCoreImpl::ContentViewCoreImpl() > ... > DCHECK(window_android_); > > and it cannot change. I figured, so I'll check for a null compositor here, then in |OnAttachCompositor()| recreate the effect if necessary?
OK, per offline discussion with sievers@, we think this may be a case of racy shutdown access to the compositor. I've made it so we check for a NULL compositor (still assuming validity of WindowAndroid), but we also listen to OnCompositorAttached for completeness.
On 2014/08/25 21:23:55, jdduke wrote: > OK, per offline discussion with sievers@, we think this may be a case of racy > shutdown access to the compositor. I've made it so we check for a NULL > compositor (still assuming validity of WindowAndroid), but we also listen to > OnCompositorAttached for completeness. OK. I think the !overscroll_effect_ branch should either be in both places or neither.
lgtm https://codereview.chromium.org/503813003/diff/20001/content/browser/renderer... File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/503813003/diff/20001/content/browser/renderer... content/browser/renderer_host/render_widget_host_view_android.cc:1660: void RenderWidgetHostViewAndroid::OnAttachCompositor() { I just realized that these callbacks are a bit flaky anyways, since we call RemoveObserver() when the view is hidden.
On 2014/08/25 21:45:52, aelias wrote: > On 2014/08/25 21:23:55, jdduke wrote: > > OK, per offline discussion with sievers@, we think this may be a case of racy > > shutdown access to the compositor. I've made it so we check for a NULL > > compositor (still assuming validity of WindowAndroid), but we also listen to > > OnCompositorAttached for completeness. > > OK. I think the !overscroll_effect_ branch should either be in both places or > neither. Done (the former).
The CQ bit was checked by jdduke@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/503813003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to commit the patch.
The CQ bit was checked by jdduke@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/503813003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to commit the patch.
The CQ bit was checked by jdduke@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jdduke@chromium.org/503813003/40001
Message was sent while issue was closed.
Committed patchset #3 (40001) as 3965c72849fd5d92f22df447bd2688aff9162e00
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/7936233f8fb1bc6a969b24474d0f32d03dd832af Cr-Commit-Position: refs/heads/master@{#291835} |