Closed Bug 1719795 Opened 3 years ago Closed 3 years ago

Change JSCLASS_PRIVATE_IS_NSISUPPORTS uses to use a reserved slot

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(6 files)

We can change JSCLASS_PRIVATE_IS_NSISUPPORTS to JSCLASS_SLOT0_IS_NSISUPPORTS and use a reserved slot for these classes instead.

It's easier to reason about the JSClass flags without the extra level of indirection.

Depends on D119499

This is a step towards removing object private slots.

Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.

Global objects (SimpleGlobalObject and the XPConnect BackstagePass global) however
can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots are only
used for DOM globals.

Depends on D119501

Every JSObject has a non-null JSClass and a lot of code depends on this.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/202535112cbd
part 1 - Add a helper function for getting a SimpleGlobalObject's native global. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/cebc11755de6
part 2 - Use SandboxPrivate::GetPrivate more. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/bd12f699ea33
part 3 - Inline XPC_WRAPPER_FLAGS. r=jonco,peterv
https://hg.mozilla.org/integration/autoland/rev/69fbadc353c3
part 4 - Remove unused AutoClonePrivateGuard. r=mccr8
https://hg.mozilla.org/integration/autoland/rev/991fd9b37ce8
part 5 - Change JSCLASS_PRIVATE_IS_NSISUPPORTS JSClasses to use a reserved slot instead. r=mccr8,jonco
https://hg.mozilla.org/integration/autoland/rev/fe76633b0f3b
part 6 - Remove null check for JS::GetClass return value. r=mccr8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: