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 Review URL: https://codereview.chromium.org/310333003 git-svn-id: svn://svn.chromium.org/blink/trunk@175465 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment