Closed Bug 1615035 Opened 1 year ago Closed 1 year ago

Stop using NS_ERROR_DOM_TYPE_ERR in CDM code

Categories

(Core :: Audio/Video: GMP, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

We should use ErrorResults instead.

Please review this very carefully! This exposes a bunch of error messages that
used to only be visible on DetailedPromise to web content. Are there any
privacy/security issues with exposing those? If needed, we could use more
generic messages instead, but exposing this information if we can seemed like
the right way to go.

I did look over the error messages coming from GeckoMediaDrmBridgeV21.java and
none of them look like they expose any interesting state. The messages from
ChromiumCDMProxy expose mKeySystem, but that came from the web page to start
with, I think.

Also, are these messages even meaningful for web content? Some of the error
messages (like the one from MediaDrmCDMProxy::md_SetServerCertificate) seem
like they include internal function names, so are not great for web content...
I'm not quite sure what the best thing to do there is.

Note: There is a behavior change to ChromiumCDMParent::GetStatusForPolicy because
NS_ERROR_INVALID_ARG is not a valid thing to throw to web content. I've used
TypeError, since that's what normally gets used for invalid args.

P1 as it looks like we'll get this done in this cycle.

Priority: -- → P1
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28cf163158a6
Use ErrorResults, not nsresults, to propagate errors in CDM code. r=bryce
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Regressions: 1617951
Duplicate of this bug: 1612216
Regressions: 1691716
You need to log in before you can comment on or make changes to this bug.