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

Issue 1190293002: Have ScreenOrientationController use a timer for async event dispatch again (Closed)

Created:
5 years, 6 months ago by sof
Modified:
5 years, 6 months ago
CC:
blink-reviews, mlamouri+watch-blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Have ScreenOrientationController use a timer for async event dispatch again Essentially revert r193927's switch to using a task to queue handling of change event dispatch for ScreenOrientationController. Queuing a task via the execution context / Document is unsafe for this controller object as its lifetime is that of its frame. Should the frame be detached and finalized while the Document remains alive, the queued task risks accessing a freed ScreenOrientationController upon running. Go back to using a one-shot timer; as these are now task based, the original motivation for r193927 has additionally fallen away (wean Blink off from using one-shot shared timers.) R=mlamouri BUG=501888 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197466

Patch Set 1 #

Total comments: 3

Patch Set 2 : add clarifying comment to test #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -13 lines) Patch
A LayoutTests/screen_orientation/resources/iframe-listen-orientation-change-detach.html View 1 chunk +5 lines, -0 lines 0 comments Download
A LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html View 1 1 chunk +30 lines, -0 lines 0 comments Download
M Source/modules/screen_orientation/ScreenOrientationController.h View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/modules/screen_orientation/ScreenOrientationController.cpp View 4 chunks +4 lines, -11 lines 3 comments Download

Messages

Total messages: 13 (3 generated)
sof
please take a look. Unsafe lifetime assumption made in r193927 between Document and LocalFrame. I ...
5 years, 6 months ago (2015-06-19 07:18:58 UTC) #2
mlamouri (slow - plz ping)
lgtm with the comment applied https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html File LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html (right): https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html#newcode23 LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html:23: var currentType = window.screen.orientation.type; ...
5 years, 6 months ago (2015-06-19 09:54:27 UTC) #3
sof
https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html File LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html (right): https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html#newcode23 LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html:23: var currentType = window.screen.orientation.type; On 2015/06/19 09:54:26, Mounir Lamouri ...
5 years, 6 months ago (2015-06-19 10:57:17 UTC) #4
sof
https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html File LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html (right): https://codereview.chromium.org/1190293002/diff/1/LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html#newcode23 LayoutTests/screen_orientation/screenorientation-detached-notify-no-crash.html:23: var currentType = window.screen.orientation.type; On 2015/06/19 10:57:17, sof wrote: ...
5 years, 6 months ago (2015-06-19 10:59:58 UTC) #5
sof
Thanks for the review; I'll get this merged back to M44.
5 years, 6 months ago (2015-06-19 11:01:37 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1190293002/20001
5 years, 6 months ago (2015-06-19 11:02:12 UTC) #9
haraken
https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp File Source/modules/screen_orientation/ScreenOrientationController.cpp (right): https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp#newcode142 Source/modules/screen_orientation/ScreenOrientationController.cpp:142: m_dispatchEventTimer.startOneShot(0, FROM_HERE); Would you help me understand why the ...
5 years, 6 months ago (2015-06-19 11:04:15 UTC) #10
sof
https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp File Source/modules/screen_orientation/ScreenOrientationController.cpp (right): https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp#newcode142 Source/modules/screen_orientation/ScreenOrientationController.cpp:142: m_dispatchEventTimer.startOneShot(0, FROM_HERE); On 2015/06/19 11:04:15, haraken wrote: > > ...
5 years, 6 months ago (2015-06-19 11:08:27 UTC) #11
haraken
https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp File Source/modules/screen_orientation/ScreenOrientationController.cpp (right): https://codereview.chromium.org/1190293002/diff/20001/Source/modules/screen_orientation/ScreenOrientationController.cpp#newcode142 Source/modules/screen_orientation/ScreenOrientationController.cpp:142: m_dispatchEventTimer.startOneShot(0, FROM_HERE); On 2015/06/19 11:08:27, sof wrote: > On ...
5 years, 6 months ago (2015-06-19 11:11:40 UTC) #12
commit-bot: I haz the power
5 years, 6 months ago (2015-06-19 12:19:15 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197466

Powered by Google App Engine
This is Rietveld 408576698