Closed Bug 1761278 Opened 3 years ago Closed 1 year ago

Add Init to AutoEntryScript

Categories

(Core :: XPConnect, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1027553

People

(Reporter: smaug, Assigned: smaug)

Details

AutoJSAPI requires one to use Init() (usually [1]) in order to know that using the relevant global is ok. AutoEntryScript doesn't [2], and it has caused some issues every now and then and webidl code even explicitly has checks before calling the constructor.
https://searchfox.org/mozilla-central/rev/be4604e4be8c71b3c1dbff2398a5b05f15411673/dom/bindings/CallbackObject.cpp#255,264,271

[1] https://searchfox.org/mozilla-central/rev/be4604e4be8c71b3c1dbff2398a5b05f15411673/dom/script/ScriptSettings.h#215
[2] https://searchfox.org/mozilla-central/rev/be4604e4be8c71b3c1dbff2398a5b05f15411673/dom/script/AutoEntryScript.h#47,51

Severity: -- → N/A
Priority: -- → P3

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → smaug

Duping this to bug 1027553 in Core :: DOM: Core & HTML which is where https://searchfox.org/mozilla-central/source/dom/script/AutoEntryScript.h is categorized to belong per searchfox per moz.build.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1027553
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.