gecko-dev/testing/specialpowers
Kris Maglione 14dea7d7a6 Bug 1651436: Wrap exceptions thrown by WrapPrivileged getters. r=mccr8
When a privileged exception object is thrown by a function exported via
`exportFunction`, it is reported to the console, and a generic unprivileged
exception is re-thrown in its place. This is a problem for test harness code
which tests for getters throwing exceptions by catching them and then setting
a flag. The re-thrown exception is hidden, but the original is still reported,
and becomes a red herring for people debugging tests.

This patch catches exceptions thrown by getters (and setters, and other proxy
hooks previously overlooked), checks if they're readable by the global the
privileged object is wrapped for, wraps them if they are not, and then
re-throws them.

Differential Revision: https://phabricator.services.mozilla.com/D82782
2020-07-08 22:55:11 +00:00
..
content Bug 1651436: Wrap exceptions thrown by WrapPrivileged getters. r=mccr8 2020-07-08 22:55:11 +00:00
Makefile.in
api.js
manifest.json
moz.build Bug 1614462: Part 2d - Fix tests that don't need to use mozbrowser. r=mccr8 2020-04-20 22:31:29 +00:00
schema.json