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

Issue 657063004: Only call UpdateScrollOffsetDelegate once on setting delegate. (Closed)

Created:
6 years, 2 months ago by bokan
Modified:
6 years, 2 months ago
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Only call UpdateScrollOffsetDelegate once on setting delegate. This fixes a crash in virtual viewport mode caused by UpdateScrollOffsetDelegate being called before the outer viewport's scroll delegate was set. This would happen when SetRootLayerScrollOffsetDelegate is called, the call to the inner scroll layer's SetScrollOffsetDelegate would call UpdateScrollOffsetDelegate when setting the total scroll offset. This call would try to read the outer viewport's scroll delegate causing the crash. This CL moves the UpdateScrollOffsetDelegate from SetTotalScrollOffset to the call sites. This allows SetRootLayerScrollOffsetDelegate to set the delegate on both layers before updating it. BUG= Committed: https://crrev.com/6747f55261727d3061af4cdc4fbd9d3201ac187e Cr-Commit-Position: refs/heads/master@{#301172}

Patch Set 1 #

Patch Set 2 : Moved UpdateScrollOffsetDelegate out of SetTotalScrollOffset #

Patch Set 3 : Fixed crash in cc_unittests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -1 line) Patch
M cc/layers/layer_impl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/layer_impl.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cc/layers/layer_impl_unittest.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_impl.cc View 1 2 4 chunks +8 lines, -1 line 0 comments Download

Messages

Total messages: 12 (3 generated)
bokan
PTAL, this was causing crashes when running the android_webview tests with virtual viewport on.
6 years, 2 months ago (2014-10-23 14:51:07 UTC) #2
aelias_OOO_until_Jul13
This points to a problem that UpdateRootLayerState will be called once with a bogus partial ...
6 years, 2 months ago (2014-10-23 19:18:02 UTC) #4
bokan
Ok, since it's only called on setting the delegate and scrolling a layer, I removed ...
6 years, 2 months ago (2014-10-24 14:19:37 UTC) #5
mkosiba (inactive)
FWIW this also crashes when I try and run the WebView with virtual viewport enabled. ...
6 years, 2 months ago (2014-10-24 15:54:40 UTC) #6
mkosiba (inactive)
On 2014/10/24 15:54:40, mkosiba wrote: > FWIW this also crashes when I try and run ...
6 years, 2 months ago (2014-10-24 16:12:51 UTC) #7
aelias_OOO_until_Jul13
lgtm
6 years, 2 months ago (2014-10-24 18:35:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/657063004/40001
6 years, 2 months ago (2014-10-24 18:38:39 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 2 months ago (2014-10-24 19:29:03 UTC) #11
commit-bot: I haz the power
6 years, 2 months ago (2014-10-24 19:29:46 UTC) #12
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/6747f55261727d3061af4cdc4fbd9d3201ac187e
Cr-Commit-Position: refs/heads/master@{#301172}

Powered by Google App Engine
This is Rietveld 408576698