Closed
Bug 1128379
Opened 9 years ago
Closed 9 years ago
[EME] improve error handling in MediaKeys::CreateSession
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: jwwang, Assigned: jwwang)
References
Details
Attachments
(2 files)
7.72 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
7.83 KB,
patch
|
lmandel
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Per bug 1121332 comment 63, we would like to throw an error in MediaKeys::CreateSession() if any error occurs during new MediaKeySession(...).
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8557711 [details] [diff] [review] 1128379_improve_error_handling_in_MediaKeys.createSession-v1.patch Review of attachment 8557711 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/eme/MediaKeyStatusMap.cpp @@ +47,2 @@ > if (NS_WARN_IF(!mMap)) { > + aRv.Throw(NS_ERROR_OUT_OF_MEMORY); Throw an error if any failures during construction. @@ +203,5 @@ > nsresult > MediaKeyStatusMap::UpdateInternal(const nsTArray<CDMCaps::KeyStatus>& keys) > { > AutoJSAPI jsapi; > + if (NS_WARN_IF(!jsapi.Init(mParent))) { Now we don't need to handle failures in JS::NewMapObject by checking |mMap| is not null. ::: dom/media/eme/MediaKeys.cpp @@ +358,5 @@ > } > } > > already_AddRefed<MediaKeySession> > +MediaKeys::CreateSession(JSContext* aCx, |aCx| will be passed all the way to the constructor of MediaKeyStatusMap so that we don't need an AutoJSAPI.
Attachment #8557711 -
Flags: review?(cpearce)
Comment 3•9 years ago
|
||
Comment on attachment 8557711 [details] [diff] [review] 1128379_improve_error_handling_in_MediaKeys.createSession-v1.patch Review of attachment 8557711 [details] [diff] [review]: ----------------------------------------------------------------- Probably best to get bz to look over this; I don't know much about JSContexts.
Attachment #8557711 -
Flags: review?(cpearce) → review?(bzbarsky)
Assignee | ||
Comment 4•9 years ago
|
||
try: https://tbpl.mozilla.org/?tree=Try&rev=29153744b0a3
Comment 5•9 years ago
|
||
Comment on attachment 8557711 [details] [diff] [review] 1128379_improve_error_handling_in_MediaKeys.createSession-v1.patch Looks good, thanks!
Attachment #8557711 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•9 years ago
|
||
Try is green: https://tbpl.mozilla.org/?tree=Try&rev=29153744b0a3
Keywords: checkin-needed
Comment 7•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7412d0c1968f
Keywords: checkin-needed
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7412d0c1968f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•9 years ago
|
Blocks: eme-platform-uplift
Comment 9•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/88ab5bafc85a
status-firefox37:
--- → fixed
Comment 10•9 years ago
|
||
Patch for beta branch as part of EME platform uplift.
Comment 11•9 years ago
|
||
Comment on attachment 8572342 [details] [diff] [review] Beta patch Requesting retroactive approval for Beta landing as part of EME platform uplift.
Attachment #8572342 -
Flags: approval-mozilla-beta?
Updated•9 years ago
|
status-firefox38:
--- → fixed
Comment 12•9 years ago
|
||
Comment on attachment 8572342 [details] [diff] [review] Beta patch Approved for Beta as part of EME platform uplift.
Attachment #8572342 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in
before you can comment on or make changes to this bug.
Description
•