Closed Bug 646598 Opened 14 years ago Closed 14 years ago

adding too many message event listeners

Categories

(Cloud Services :: Share: Firefox Client, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

Attachments

(1 file, 1 obsolete file)

Instead of adding only one message event listener for the panel browser, we're adding one per tab opened plus one. This is a leftover from when we switched to using the panel rather than a share browser embedded into each tab. Further, these listeners are never removed, so the more browser tabs opened, the more message event handlers being called to do things like generate thumbnails. This is likely the cause of bug 642629.
Assignee: nobody → mixedpuppy
This patch enforces that we only add the message event listener when the browser in the share panel loads content. We still do not remove the listener on unload, since that is handled for us when the content window in the browser dies. We need to continue listening on content-document-global-created since there are situations where a different url is loaded into the share panel browser (e.g. server down)
Attachment #523089 - Flags: review?(philipp)
using onload per discussion with philikon
Attachment #523089 - Attachment is obsolete: true
Attachment #523089 - Flags: review?(philipp)
Attachment #523093 - Flags: review?(philipp)
Comment on attachment 523093 [details] [diff] [review] use onload to attach message listener Looks good, I'll land it in fx-share.
Attachment #523093 - Flags: review?(philipp) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: