-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
-
21
-
None
-
None
-
None
-
None
-
None
-
None
-
None
There seems to be a bug around the mozjs/exception.cpp code, specifically in the path starting at throwCurrentJSException() where it can fail to pull an error code/message from the JSContext. One example of this bug (and details for how to repro) is in the linked BF ticket.
One potential fix is in JSErrorReportToStatus(). The given JSErrorReport has a message field that can take the form "error: {stringified BSONObj describing the error}". If the BSONObj part of this message field was parsed in this function, then a status could easily be created from this BSONObj with the original error code and message.
We're not sure of the effect this would have on other JS tests or whether there are other cases where this behavior is not desirable.