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

Issue 2622943002: Fix WebVR requestAnimationFrame leaking (Closed)

Created:
3 years, 11 months ago by bsheedy
Modified:
3 years, 11 months ago
Reviewers:
haraken, bokan, mthiesse, sof, bajones
CC:
chromium-reviews, shans, rjwright, blink-reviews-animation_chromium.org, feature-vr-reviews_chromium.org, darktears, blink-reviews, Eric Willigers
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix WebVR requestAnimationFrame leaking Manually clear the Member<ScriptedAnimationController> handle in VRDisplay like Document does in order to prevent leaks when the Document is destroyed and there are still outstanding requestAnimationFrame callbacks. Re-add the two layout tests that were failing due to detecting the leaks. BUG=679401 Review-Url: https://codereview.chromium.org/2622943002 Cr-Commit-Position: refs/heads/master@{#443711} Committed: https://chromium.googlesource.com/chromium/src/+/d8028087727891a6575e8209daecf58035a95723

Patch Set 1 #

Patch Set 2 : Rename pending callbacks vector #

Patch Set 3 : Properly fix leak #

Total comments: 5

Patch Set 4 : Added comments to tests explaining why they end with outstanding callbacks #

Patch Set 5 : Rebase to see if CQ failure fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -0 lines) Patch
A third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html View 1 2 3 1 chunk +51 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/vr/requestAnimationFrame_unregister.html View 1 2 3 1 chunk +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/vr/VRDisplay.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (13 generated)
bsheedy
PTAL
3 years, 11 months ago (2017-01-10 17:57:33 UTC) #2
mthiesse
I'm not sure this is the right approach, shouldn't ScriptedAnimationController take care of cleaning up ...
3 years, 11 months ago (2017-01-10 18:04:28 UTC) #4
bsheedy
On 2017/01/10 18:04:28, mthiesse wrote: > I'm not sure this is the right approach, shouldn't ...
3 years, 11 months ago (2017-01-10 18:13:31 UTC) #5
bajones
On 2017/01/10 18:13:31, bsheedy wrote: > On 2017/01/10 18:04:28, mthiesse wrote: > > I'm not ...
3 years, 11 months ago (2017-01-10 20:11:23 UTC) #6
bsheedy
On 2017/01/10 20:11:23, bajones wrote: > On 2017/01/10 18:13:31, bsheedy wrote: > > On 2017/01/10 ...
3 years, 11 months ago (2017-01-10 20:57:19 UTC) #7
bsheedy
Took at look at window.rAF, and it seems to just call document.rAF, which in turn ...
3 years, 11 months ago (2017-01-10 22:23:11 UTC) #8
bsheedy
Talked to some people on the Oilpan team and got the leak properly fixed with ...
3 years, 11 months ago (2017-01-12 18:09:08 UTC) #11
bajones
On 2017/01/12 18:09:08, bsheedy wrote: > Talked to some people on the Oilpan team and ...
3 years, 11 months ago (2017-01-13 00:29:51 UTC) #12
bokan
On 2017/01/10 22:23:11, bsheedy wrote: > Took at look at window.rAF, and it seems to ...
3 years, 11 months ago (2017-01-13 00:32:49 UTC) #13
mthiesse
https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode753 third_party/WebKit/Source/modules/vr/VRDisplay.cpp:753: void VRDisplay::contextDestroyed() { Why ::contextDestroyed() rather than ::dispose()?
3 years, 11 months ago (2017-01-13 00:34:19 UTC) #14
haraken
On 2017/01/13 00:34:19, mthiesse wrote: > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp > File third_party/WebKit/Source/modules/vr/VRDisplay.cpp (right): > > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp#newcode753 > ...
3 years, 11 months ago (2017-01-13 00:44:23 UTC) #16
bsheedy
On 2017/01/13 00:44:23, haraken wrote: > On 2017/01/13 00:34:19, mthiesse wrote: > > > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/Source/modules/vr/VRDisplay.cpp ...
3 years, 11 months ago (2017-01-13 01:47:04 UTC) #17
haraken
On 2017/01/13 01:47:04, bsheedy wrote: > On 2017/01/13 00:44:23, haraken wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 02:00:00 UTC) #18
mthiesse
On 2017/01/13 02:00:00, haraken wrote: > On 2017/01/13 01:47:04, bsheedy wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 02:14:16 UTC) #19
haraken
On 2017/01/13 02:14:16, mthiesse wrote: > On 2017/01/13 02:00:00, haraken wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 02:18:55 UTC) #20
sof
On 2017/01/13 02:00:00, haraken wrote: > On 2017/01/13 01:47:04, bsheedy wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 06:38:11 UTC) #21
haraken
On 2017/01/13 06:38:11, sof wrote: > On 2017/01/13 02:00:00, haraken wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 06:54:47 UTC) #22
sof
On 2017/01/13 06:38:11, sof wrote: > On 2017/01/13 02:00:00, haraken wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 06:56:17 UTC) #23
sof
On 2017/01/13 06:56:17, sof wrote: > On 2017/01/13 06:38:11, sof wrote: > > On 2017/01/13 ...
3 years, 11 months ago (2017-01-13 08:38:24 UTC) #24
sof
https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html File third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html (right): https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html#newcode19 third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html:19: t.done(); this looks like it is pumping onAnimationFrame() calls ...
3 years, 11 months ago (2017-01-13 08:41:24 UTC) #25
sof
non-owner lgtm. Unless rAF can be extended to throw on detached document use, it has ...
3 years, 11 months ago (2017-01-13 08:52:01 UTC) #26
sof
Looking at the VRDisplay's implementation of rAF, it will return 0 when detached - is ...
3 years, 11 months ago (2017-01-13 08:58:08 UTC) #27
bsheedy
On 2017/01/13 08:41:24, sof wrote: > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html > File third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html > (right): > > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html#newcode19 ...
3 years, 11 months ago (2017-01-13 17:40:30 UTC) #28
bsheedy
Added comments to tests as suggested by sof@. It seems like people agree this is ...
3 years, 11 months ago (2017-01-13 18:02:02 UTC) #30
sof
On 2017/01/13 17:40:30, bsheedy wrote: > On 2017/01/13 08:41:24, sof wrote: > > > https://codereview.chromium.org/2622943002/diff/40001/third_party/WebKit/LayoutTests/vr/requestAnimationFrame_invalidhandle.html ...
3 years, 11 months ago (2017-01-13 18:34:25 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622943002/60001
3 years, 11 months ago (2017-01-13 19:14:20 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/292953)
3 years, 11 months ago (2017-01-13 20:33:51 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2622943002/80001
3 years, 11 months ago (2017-01-13 21:33:08 UTC) #39
commit-bot: I haz the power
3 years, 11 months ago (2017-01-13 23:04:29 UTC) #42
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/d8028087727891a6575e8209daec...

Powered by Google App Engine
This is Rietveld 408576698