Closed Bug 1244931 Opened 9 years ago Closed 11 months ago

Create a RAII class for side stepping error reporting.

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mrrrgn, Unassigned)

Details

JS_SetErrorReporter returns a copy of the old error reporter which encourages the following pattern: JSErrorReporter older = JS_SetErrorReporter(cx->runtime(), nullptr); // ... some sneaky things with no error reporting JS_SetErrorReporter(cx->runtime(), older); What happens when we forget to reset the old error reporter? This is a foot gun. Let's survey where this happens and fix them up with an RAII style class.
Assignee: nobody → winter2718
Assignee: winter2718 → nobody
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.