Closed Bug 884738 Opened 11 years ago Closed 11 years ago

leaks in JSM + Workers

Categories

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

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: baku, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch mochitest (obsolete) — Splinter Review
This mochitest reproduces the leak.
Attachment #764664 - Flags: review?(bent.mozilla)
Blocks: 883784
Comment on attachment 764664 [details] [diff] [review]
mochitest

This is missing test_bug884738.js
Attached patch mochiSplinter Review
Attachment #764664 - Attachment is obsolete: true
Attachment #764664 - Flags: review?(bent.mozilla)
Attachment #765026 - Flags: review?(bent.mozilla)
Comment on attachment 765026 [details] [diff] [review]
mochi

This will definitely leak until shutdown but there's no gecko bug here really.

You're stashing functions that reference the window (e.g. "ok") inside event handlers on the worker. The worker is never going to go away (well, until shutdown) since it lives in a JSM.
Attachment #765026 - Flags: review?(bent.mozilla)
> This will definitely leak until shutdown but there's no gecko bug here
> really.

Ok. But this is not green on try because of this leak. We have the same problem in bug 883784.
Any idea how to fix it? or how to make it green on try? :)
Flags: needinfo?(bent.mozilla)
(In reply to Andrea Marchesini (:baku) from comment #5)

In the JSM instead of doing 'this.worker' you could use 'let worker' in the start function. Then the worker can go away when it's done.

That's probably all you need. If it still gives you problems then you could try changing the import function in the xul file to import into a temporary local variable instead of the global scope.
Flags: needinfo?(bent.mozilla)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
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: