On 11/19/15 5:39 PM, Jonas Sicking wrote:
This API doesn't seem to work for nested workers (which Blink doesn't
implement), does it? Since there's no way in the window to get hold of
a reference of a sub-sub-worker.

While true, there is also no way to directly get a message from a sub-sub-worker, right? The only way to get one is via the intermediate worker.

So you have a window create worker W1, W1 creates W2. W2 does something, posts a message back to W1 with some timestamps. W1 translates those into its timeline and posts message back to the window, which translates into its timeline.

It also doesn't seem possible for a worker to convert to the timeline
of a parent window, since there's no object representing the parent of
a worker.

That's true. If you want to ship timestamps from a window to a worker, there's no convenient way to do that, though you can hack it together like so:


  w.postMessage(myTimeStamp - Performance.translateTime(0, w))

It seemed to me when this was being discussed that typically your timestamps would flow the other way, but maybe that's a bad assumption?

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to