Closed Bug 869800 Opened 7 years ago Closed 7 years ago

Remove JS_GetGlobalObject from workers

Categories

(Core :: DOM: Workers, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(2 files)

All of this stuff appears to be happening on the worker cx. I can't quite tell whether there are ever multiple globals/compartments involved for a given cx - it seems like there might be with sub-workers, but I can't quite tell.

Either way though, it seems like all of these would be better off just pulling the global off the current compartment rather than grabbing the default one stashed on the context, especially the aforementioned API is going away.
There are no shared globals/compartments/contexts at all. If we are running with a worker cx then its global object can only be the worker associated with that cx.
(In reply to ben turner [:bent] from comment #2)
> There are no shared globals/compartments/contexts at all. If we are running
> with a worker cx then its global object can only be the worker associated
> with that cx.

In that case, these patches should be totally fine (they pass mochitests, anyway). I'll upload now.
This makes workers the first consumer to be weaned off this API. \o/
Attachment #746781 - Flags: review?(bent.mozilla)
This is green.
Attachment #746780 - Flags: review?(bent.mozilla) → review+
Attachment #746781 - Flags: review?(bent.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/cbebcd9f2531
https://hg.mozilla.org/mozilla-central/rev/469e647ccbf5
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Depends on: 871297
Depends on: 871299
You need to log in before you can comment on or make changes to this bug.