Closed Bug 1229031 Opened 9 years ago Closed 9 years ago

Don't try to set up pref caches in binding code on worker threads

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

Consider this IDL:

  [Exposed=(Window,Worker)]
  interface Foo {
    [Exposed=Window, Pref="whatever"]
    void something();
  };

This is allowed by our IDL parser, because the thing with the Pref annotation is only exposed in Window.  But the code generated for this puts the AddBoolVarCache() call in CreateInterfaceObjects(), which will be called on worker threads too.
Oh, and note that this is hit in practice for Performance.mozMemory.  So if we manage to create a Worker and touch "performance" in it before ever touching "performance" on the main thread, we'll end up adding a pref observer on the worker thread...
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8693596 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/f2c8da919fa1
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: