Closed Bug 1570350 Opened 6 years ago Closed 6 years ago

Make the consumers of ConstructJSImplementation a bit simpler

Categories

(Core :: DOM: Bindings (WebIDL), task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

We can factor all that copy/pasted logic into a template method.

Blocks: 921496

We could get rid of the need to specify the impl class at the callsite by
taking a T** instead of returning an already_AddRefed<T>, but I'm not sure
which is uglier...

The change from globalHolder->GetGlobalJSObject() to global.Get() is OK,
because globalHolder was coming from the nsISupports attached to
global.Get() anyway, so those are the same global JS object.

Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/32b27bbe561c Refactor ConstructJSImplementation to make consumers a bit simpler. r=mccr8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: