Chromium Code Reviews
DescriptionRemove WebMediaPlayerDelegate null checks
As per the bug description and xhwang@, we are currently storing the
|delegate_| in WMPI as a weak pointer and null-checking it everywhere.
From the bug (and verified with dcheng@ as still being true):
HTMLMediaElement is a Blink::SuspendableObject, which will have its
contextDestroyed() called when Blink::Document::shutdown() is called,
which then destroys WMPI. Document::shutdown() is called before a frame
is detached, and the RenderFrameImpl will outlive HTMLMediaElement.
Since |delegate_| is owned by the RFI, it is safe to pass |delegate_|
as a raw pointer an not null check it.
This CL removes the null-checks and stores |delegate_| as a raw pointer
instead.
BUG=593932
TEST= Ran media UTs on Android and desktop. Ran content UTs on desktop.
Review-Url: https://codereview.chromium.org/2640573002
Cr-Commit-Position: refs/heads/master@{#445487}
Committed: https://chromium.googlesource.com/chromium/src/+/1bb1c78bef7565222274dd05ba49cfbbed1978ec
Patch Set 1 #Patch Set 2 : Fixed WMPMS and WMPA #
Total comments: 2
Patch Set 3 : Added lifetime guarantee comment #Patch Set 4 : Undo accidental delete of WMPI::delegate_ #Messages
Total messages: 35 (22 generated)
|