MediaDrmBridge: Check mMediaBridge beforeing calling release() in destroy().
commit51743c8575422a0400c49b2b90fc912e53dd052d
authorxhwang <xhwang@chromium.org>
Mon, 6 Jul 2015 22:16:34 +0000 (6 15:16 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 6 Jul 2015 22:17:20 +0000 (6 22:17 +0000)
treeb72e924ec5463f0daa27c6a41ddd22169dd5759e
parenta942b49af49181ff218d4a2c345be96464c23176
MediaDrmBridge: Check mMediaBridge beforeing calling release() in destroy().

The class level documentation says that: "All public APIs and callbacks should
check mMediaBridge to make sure release() hasn't been called". Since destroy()
is a public API, enforce this rule in this CL. Otherwise, we could call
release() on an already released object, causing NullPointerException.

BUG=506481

Review URL: https://codereview.chromium.org/1220383002

Cr-Commit-Position: refs/heads/master@{#337493}
media/base/android/java/src/org/chromium/media/MediaDrmBridge.java