Closed Bug 1425077 Opened 6 years ago Closed 6 years ago

ModuleScript can have an error to rethrow but no module object

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(1 file)

ModuleScript::SetErrorToRethrow() should call HoldJSObjects but it doesn't.
Priority: -- → P3
I realised that the code is fine as it is, because for SetErrorToRethrow() to be called we must have either called SetModuleRecord() or SetParseError() first.

This patch adds an assertion and a comment.
Attachment #8936911 - Flags: review?(amarchesini)
Attachment #8936911 - Flags: review?(amarchesini) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/83a66733b7e5
Make ModuleScript::SetErrorToRethrow call HoldJSObjects in case there is no module record r=baku
https://hg.mozilla.org/mozilla-central/rev/83a66733b7e5
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: