Closed
Bug 1413480
Opened 8 years ago
Closed 8 years ago
[EME] Should check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it.
Categories
(Core :: Audio/Video: GMP, enhancement, P2)
Core
Audio/Video: GMP
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: JamesCheng, Assigned: JamesCheng)
Details
Attachments
(1 file)
As Bug 1404230 comment 31, we should reject the promise for avoiding the permanent waiting promise.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jacheng
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Attachment #8924863 -
Flags: review?(kikuo)
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to James Cheng[:JamesCheng] from comment #0)
> As Bug 1404230 comment 31, we should reject the promise for avoiding the
> permanent waiting promise.
http://searchfox.org/mozilla-central/rev/af86a58b157fbed26b0e86fcd81f1b421e80e60a/dom/media/gmp/ChromiumCDMChild.cpp#912
I'm not sure that we will receive any ipc RecvXXX after we called Send__delete__(this);.
If it really did call the RecvXXX after that, we should reject the promise as this patch did.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•8 years ago
|
||
Bug 1404230 is postponed so I removed the related code.
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8924863 [details]
Bug 1413480 - Check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it.
https://reviewboard.mozilla.org/r/196116/#review201786
ChromiumCDMChild sets mCDM to nullptr only when ChromiumCDMChild::RecvDestroy is called.
And, correct me if I'm wrong, that would be triggered only after ChromiumCDMParent::Shutdown is called.
For me, I think adding MOZ_ASSERT(mCDM) in every ChromiumCDMChild::RecvXXX and rejecting those promises in ChromiumCDMParent::Shutdown would be a better solution as I could think of a case that there are still in-processing requests after mCDM is set to null.
Attachment #8924863 -
Flags: review?(kikuo) → review+
Assignee | ||
Updated•8 years ago
|
Attachment #8924863 -
Flags: review?(cpearce)
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8924863 [details]
Bug 1413480 - Check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it.
https://reviewboard.mozilla.org/r/196116/#review202486
::: dom/media/gmp/ChromiumCDMChild.cpp:626
(Diff revision 3)
> ChromiumCDMChild::RecvCloseSession(const uint32_t& aPromiseId,
> const nsCString& aSessionId)
> {
> MOZ_ASSERT(IsOnMessageLoopThread());
> + if (!mCDM) {
> + SendOnRejectPromise(aPromiseId,
Rejecting the promises here shouldn't be necessary; when the MediaKeys shuts down, it rejects any pending promises:
https://searchfox.org/mozilla-central/rev/7e090b227f7a0ec44d4ded604823d48823158c51/dom/media/eme/MediaKeys.cpp#105
Please just ensure we null check mCDM before dereferencing it.
Attachment #8924863 -
Flags: review?(cpearce) → review-
Assignee | ||
Updated•8 years ago
|
Summary: [EME] Should reject the promise when mCDM is null in ChromiumCDMChild::RecvXXX → [EME] Should check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8924863 [details]
Bug 1413480 - Check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it.
https://reviewboard.mozilla.org/r/196116/#review202980
Thanks.
Attachment #8924863 -
Flags: review?(cpearce) → review+
Comment hidden (mozreview-request) |
Comment 13•8 years ago
|
||
Pushed by jacheng@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4b0b68c54b54
Check mCDM in ChromiumCDMChild::RecvXXX before dereferencing it. r=cpearce,kikuo
Comment 14•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•