<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27377</bug_id>
          
          <creation_ts>2014-11-20 09:53:31 +0000</creation_ts>
          <short_desc>MessageEvents in and out of workers should have origin set so we can have cross-origin workers at some point (and then you no longer need to special case same-origin workers)</short_desc>
          <delta_ts>2014-11-25 00:33:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>https://html.spec.whatwg.org/#workers</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>hillbrad</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>115193</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-11-20 09:53:31 +0000</bug_when>
    <thetext>Specification: https://html.spec.whatwg.org/multipage/workers.html
Multipage: https://html.spec.whatwg.org/multipage/#workers
Complete: https://html.spec.whatwg.org/#workers
Referrer: https://html.spec.whatwg.org/multipage/

Comment:
MessageEvents in and out of workers should have origin set so we can have
cross-origin workers at some point (and then you no longer need to special
case same-origin workers)

Posted from: 80.218.216.100 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:36.0) Gecko/20100101 Firefox/36.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115194</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-20 09:53:57 +0000</bug_when>
    <thetext>http://lists.w3.org/Archives/Public/public-webappsec/2014Nov/0309.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115257</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-20 20:42:15 +0000</bug_when>
    <thetext>That seems contrary to the capabilities model that Workers are intended to provide. Can you elaborate on how you would use this origin? Suppose someone creates a channel in one worker and sends the port back to the page, then later decides it should actually implement its side of the contract by offloading the work to another work. Should the origin change if the other worker in question is in another origin? (This can happen today using iframes, e.g.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115267</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-21 07:00:33 +0000</bug_when>
    <thetext>Interesting. I had forgotten about it being capability-based.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115338</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-21 23:59:59 +0000</bug_when>
    <thetext>So does that mean this is WONTFIX?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115340</commentid>
    <comment_count>5</comment_count>
    <who name="Brad Hill">hillbrad</who>
    <bug_when>2014-11-22 00:08:34 +0000</bug_when>
    <thetext>Why shouldn&apos;t the behavior be the same for workers as for iframes?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115413</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-24 18:44:41 +0000</bug_when>
    <thetext>The behaviour _is_ the same, no? MessagePort doesn&apos;t care where the message comes from. Am I missing something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115435</commentid>
    <comment_count>7</comment_count>
    <who name="Brad Hill">hillbrad</who>
    <bug_when>2014-11-25 00:33:06 +0000</bug_when>
    <thetext>I think I understand now - the default channel associated with a worker, accessible via postMessage(), is a MessageChannel.  It does not set the origin of messages because it is not being invoked on a Window object.  I see this behavior is consistent with iframes.

Thanks for the patience.  Anne is quicker at opening bugs than I am at building out my test matrix and understanding all the nuances of what they&apos;re telling me.  :)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>