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

Issue 585903002: Fix the "inactive document" condition for HTMLMediaElement GC (Closed)

Created:
6 years, 3 months ago by philipj_slow
Modified:
6 years, 3 months ago
Reviewers:
fs
CC:
blink-reviews, blink-reviews-html_chromium.org, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, nessy, vcarbune.chromium
Project:
blink
Visibility:
Public.

Description

Fix the "inactive document" condition for HTMLMediaElement GC document().isActive() is the wrong condition, and triggered an assert: https://codereview.chromium.org/584633004 The assert was added in https://codereview.chromium.org/552303006 The original assumption was that !document().isActive() implies that ActiveDOMObject::stop() has been called, but since a document is inactive also in the beginning of its lifecycle, that is not true. Instead use the internal m_active state to determine if stop(), which calls m_asyncEventQueue->close(), has been called. TEST=LayoutTests/media/gc-pending-event-inactive-document.html This test hits the assert if the condition is !document().isActive(). BUG=400659

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -2 lines) Patch
A LayoutTests/media/gc-pending-event-inactive-document.html View 1 chunk +19 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 1 chunk +4 lines, -2 lines 3 comments Download

Messages

Total messages: 7 (1 generated)
philipj_slow
PTAL
6 years, 3 months ago (2014-09-19 12:35:25 UTC) #2
fs
https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp#newcode3533 Source/core/html/HTMLMediaElement.cpp:3533: if (!m_active) { Isn't the element also inactive after ...
6 years, 3 months ago (2014-09-19 12:40:50 UTC) #3
philipj_slow
https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp#newcode3533 Source/core/html/HTMLMediaElement.cpp:3533: if (!m_active) { On 2014/09/19 12:40:50, fs wrote: > ...
6 years, 3 months ago (2014-09-19 12:48:47 UTC) #4
philipj_slow
Bah, still failing on http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html: http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/25594
6 years, 3 months ago (2014-09-19 12:52:34 UTC) #5
philipj_slow
https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/585903002/diff/1/Source/core/html/HTMLMediaElement.cpp#newcode3533 Source/core/html/HTMLMediaElement.cpp:3533: if (!m_active) { On 2014/09/19 12:48:47, philipj wrote: > ...
6 years, 3 months ago (2014-09-19 12:56:33 UTC) #6
philipj_slow
6 years, 3 months ago (2014-09-19 13:53:59 UTC) #7

Powered by Google App Engine
This is Rietveld 408576698