Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1686 from zombie/1089237-test-worker-history
Browse files Browse the repository at this point in the history
bug 1089237 - keep strong reference to bound observer method, r=@Mossop
  • Loading branch information
zombie committed Oct 28, 2014
2 parents 77522d4 + 2fb6075 commit 0b88728
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/sdk/content/worker-child.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ const WorkerChild = Class({
this.port.on('*', this.send.bind(this, 'event'));
this.on('*', this.send.bind(this));

this.observe = this.observe.bind(this);

for (let topic in EVENTS)
observe(topic, this.observe.bind(this));
observe(topic, this.observe);

this.receive = this.receive.bind(this);
this.manager.addMessageListener('sdk/worker/message', this.receive);
Expand Down

0 comments on commit 0b88728

Please sign in to comment.