This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18033 - each MessageChannel acts as its own task source. This means that messages sent using this function are not guaranteed to execute in order, since the order task sources are processed isn't specified.
Summary: each MessageChannel acts as its own task source. This means that messages se...
Status: RESOLVED DUPLICATE of bug 15063
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Web Messaging (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: public-webapps-bugzilla
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 16:01 UTC by contributor
Modified: 2012-10-19 22:27 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2012-07-18 16:01:35 UTC
This was was cloned from bug 15063 as part of operation convergence.
Originally filed: 2011-12-05 16:42:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2011-12-05 16:42:09 +0000 
--------------------------------------------------------------------------------
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html
Multipage: http://www.whatwg.org/C#message-ports
Complete: http://www.whatwg.org/c#message-ports

Comment:
each MessageChannel acts as its own task source.  This means that messages
sent using this function are not guaranteed to execute in order, since the
order task sources are processed isn't specified.

Posted from: 85.227.157.105 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/17.0.942.0 Safari/535.8
================================================================================
 #1   Simon Pieters                                   2011-12-05 16:43:40 +0000 
--------------------------------------------------------------------------------
The above is quoted from https://www.w3.org/Bugs/Public/show_bug.cgi?id=15007#c18

I think it's a problem. We shouldn't let the order be unspecified for ports within a single window (or worker).
================================================================================
 #2   Ian 'Hixie' Hickson                             2011-12-07 23:38:56 +0000 
--------------------------------------------------------------------------------
Why is this a problem? Seems pretty reasonable to me. Implementations should be allowed to implement all message channels by routing messages through a central dispatch process, and if we do that there's no way to really make channels that happen to have both ports in one process magically be ordered relative to each other.
================================================================================
 #3   Simon Pieters                                   2011-12-08 09:34:39 +0000 
--------------------------------------------------------------------------------
Because people have used multiple MessageChannels as a way to implement "queue a task" polyfill (which they want to execute in order), and they do execute in order in Opera and Chrome today. If we change it to not execute in order, sites using such polyfills would break sometimes in hard-to-debug ways.
================================================================================
 #4   Ian 'Hixie' Hickson                             2011-12-09 00:29:12 +0000 
--------------------------------------------------------------------------------
I am highly skeptical that the order is actually guaranteed in Chrome today, especially around the time if and while one were to send the port across processes and back.
================================================================================
 #5   Simon Pieters                                   2011-12-09 12:19:54 +0000 
--------------------------------------------------------------------------------
The polyfills don't send the ports to other processes, though. When a port is sent to somewhere else (and possibly back again), I'm fine with order being arbitrary.
================================================================================
 #6   Ian 'Hixie' Hickson                             2011-12-09 23:06:38 +0000 
--------------------------------------------------------------------------------
Hmmm... So you're saying the order should be defined only amongst ports that have been created by a MessageChannel and not yet ever been sent over another channel...

I guess we can do that, though it'll be really convoluted to spec...
================================================================================
Comment 1 Ian 'Hixie' Hickson 2012-10-19 22:27:20 UTC

*** This bug has been marked as a duplicate of bug 15063 ***