Bug 137552 - MediaPlayer should use a reference for the MediaPlayerClient
Summary: MediaPlayer should use a reference for the MediaPlayerClient
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 21562
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-09 01:17 PDT by Carlos Garcia Campos
Modified: 2014-10-09 23:56 PDT (History)
3 users (show)

See Also:


Attachments
Patch (31.94 KB, patch)
2014-10-09 01:23 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff
Patch for landing (32.00 KB, patch)
2014-10-09 09:20 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-10-09 01:17:32 PDT
It's currently a pointer that is checked almost everywhere before being used, and assumed to be non-null in a few places too. The client is set on constructor by HTMLMediaElement and cleared on HTMLMediaElement destructor that also frees the media player object. So, the client will never be null while the MediaPlayer player is alive.
Comment 1 Carlos Garcia Campos 2014-10-09 01:23:43 PDT
Created attachment 239524 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-10-09 09:20:34 PDT
Created attachment 239543 [details]
Patch for landing
Comment 3 Carlos Garcia Campos 2014-10-09 23:56:44 PDT
Committed r174563: <http://trac.webkit.org/changeset/174563>