Allow FrameWorkers to create real Workers

RESOLVED FIXED in Firefox 25

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: markh, Assigned: markh)

Tracking

Trunk
Firefox 25
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
Gavin suggested we should expose the ability for FrameWorkers to create (real) subworkers.  In effect, this mean that a FrameWorker should be able to do "new Worker()".
(Assignee)

Comment 1

5 years ago
FYI, given there was some offline discussion about this possibly enabling a web-only solution for talkilla, it should be noted that Chrome does *not* support subworkers - http://crbug.com/31666 (but obviously it doesn't support FrameWorkers either ;)
(Assignee)

Comment 2

5 years ago
Created attachment 779616 [details] [diff] [review]
896860-worker.patch

While waiting for try and local build, I knocked this up and it all seems to work fine.  It's on top of bug 891218 - but if at all possible during development, keeping it that way is probably good for everyone :)
(In reply to Mark Hammond (:markh) from comment #1)
> FYI, given there was some offline discussion about this possibly enabling a
> web-only solution for talkilla, it should be noted that Chrome does *not*
> support subworkers - http://crbug.com/31666

The architecture we are currently considering for talkilla uses sub workers only in the SocialAPI context (ie a context where we aren't guaranteed to always be showing web content). For the web-only solution, we will likely use a hidden iframe instead of the frame worker, so the subworkers we need in SocialAPI won't be subworkers in the web context.
Blocks: 889427
(Assignee)

Comment 4

5 years ago
Created attachment 784681 [details] [diff] [review]
896860-worker.patch

Changed to no longer depend on bug 891218, but otherwise almost identical.  Flagging Gavin for review as the patch is very simple and I'd like explicit approval for landing this in 25 (and Shane has explicitly requested we land it there.)
Assignee: nobody → mhammond
Attachment #779616 - Attachment is obsolete: true
Attachment #784681 - Flags: review?(gavin.sharp)
Comment on attachment 784681 [details] [diff] [review]
896860-worker.patch

r=me, assuming this really is super-needed and Talkilla people will be upset if we don't add it. It would be great if the rationale for adding it was elaborated on in this bug - I feel like comment 0 is a misrepresentation of the real motivation behind this change :)
Attachment #784681 - Flags: review?(gavin.sharp) → review+
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #5)
> Comment on attachment 784681 [details] [diff] [review]
> 896860-worker.patch
> 
> r=me, assuming this really is super-needed and Talkilla people will be upset
> if we don't add it. It would be great if the rationale for adding it was
> elaborated on in this bug - I feel like comment 0 is a misrepresentation of
> the real motivation behind this change :)

It would cause significant delay (beyond a 6 week gap) in working with partners on the Talkilla side if the subworker is not available.
At a higher level, what is the subworker used for, and why is that use case not addressed by other mechanisms already available to frameworkers?
(Assignee)

Comment 8

5 years ago
oops - I didn't notice the conversation was ongoing, so landed it.

https://hg.mozilla.org/integration/fx-team/rev/526505030062
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #7)
> At a higher level, what is the subworker used for, and why is that use case
> not addressed by other mechanisms already available to frameworkers?

Talkilla needs to support more than one backend.  Using a sub-worker keeps those isolated from each other and from the talkilla frameworker.  Having them be a worker with communication over a port provides a roadmap that can, in the future, be supported in web-only solutions as well as potentially migrating those backends into socialapi providers.
https://hg.mozilla.org/mozilla-central/rev/526505030062
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.