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

Issue 310333003: Oilpan: Remove ~HTMLMediaElement document access when the document is destructed. (Closed)

Created:
6 years, 6 months ago by Mads Ager (chromium)
Modified:
6 years, 6 months ago
Reviewers:
haraken, oilpan-reviews, sigbjornf, sof, zerny-chromium
CC:
blink-reviews, blink-reviews-html_chromium.org, philipj_slow, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, nessy, vcarbune.chromium
Visibility:
Public.

Description

Oilpan: Remove ~HTMLMediaElement document access when the document is destructed. The document() accessor on all Nodes end up touching the document. The reason is that the document accessor gets the document from the TreeScope which is often the document itself. Therefore, we cannot use the document() accessor in Node destructors. Fortunately, there is a more direct way of checking if the Document has been destructed. HTMLMediaElement is an ActiveDOMObject which is a ContextLifecycleObserver. Therefore, ActiveDOMObject::executionContext will tell us if the Document is still alive so that we can access it. R=haraken@chromium.org, oilpan-reviews@chromium.org, sigbjornf@chromium.org, zerny@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175465

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove braces. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -10 lines) Patch
M Source/core/html/HTMLMediaElement.cpp View 1 2 chunks +5 lines, -10 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Mads Ager (chromium)
6 years, 6 months ago (2014-06-04 08:32:30 UTC) #1
sof
lgtm https://codereview.chromium.org/310333003/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/310333003/diff/1/Source/core/html/HTMLMediaElement.cpp#newcode319 Source/core/html/HTMLMediaElement.cpp:319: if (ActiveDOMObject::executionContext()) { nit: braces seem superfluous.
6 years, 6 months ago (2014-06-04 08:37:21 UTC) #2
zerny-chromium
lgtm
6 years, 6 months ago (2014-06-04 08:39:59 UTC) #3
Mads Ager (chromium)
https://codereview.chromium.org/310333003/diff/1/Source/core/html/HTMLMediaElement.cpp File Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/310333003/diff/1/Source/core/html/HTMLMediaElement.cpp#newcode319 Source/core/html/HTMLMediaElement.cpp:319: if (ActiveDOMObject::executionContext()) { On 2014/06/04 08:37:21, sof wrote: > ...
6 years, 6 months ago (2014-06-04 08:41:54 UTC) #4
Mads Ager (chromium)
The CQ bit was checked by ager@chromium.org
6 years, 6 months ago (2014-06-04 08:42:28 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ager@chromium.org/310333003/20001
6 years, 6 months ago (2014-06-04 08:42:56 UTC) #6
haraken
LGTM
6 years, 6 months ago (2014-06-04 08:46:12 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-06-04 09:54:30 UTC) #8
Message was sent while issue was closed.
Change committed as 175465

Powered by Google App Engine
This is Rietveld 408576698