<?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>22420</bug_id>
          
          <creation_ts>2013-06-20 20:30:21 +0000</creation_ts>
          <short_desc>PopStateEvent.state should be a copy (via structured clone) of the value it was initialized to</short_desc>
          <delta_ts>2013-07-02 22:33:09 +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>WONTFIX</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#dom-popstateevent-state</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>adamk</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>89660</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2013-06-20 20:30:21 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html
Multipage: http://www.whatwg.org/C#dom-popstateevent-state
Complete: http://www.whatwg.org/c#dom-popstateevent-state
Referrer: 

Comment:
PopStateEvent.state should be a copy (via structured clone) of the value it
was initialized to, not the value itself. This would make events generated by
the user agent and those generated by code calling new PopStateEvent() behave
the same way.

Posted from: 216.239.45.83
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1543.2 Safari/537.36</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89661</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2013-06-20 20:37:58 +0000</bug_when>
    <thetext>This concern looks like it should also apply to MessageEvent, which uses the same wording and has the same difference between events created via new MessageEvent and those created via, e.g., postMessage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89663</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-06-20 21:00:33 +0000</bug_when>
    <thetext>I don&apos;t understand. Why would we want to prevent an author from creating an event with the specific data they set?

That would be quite a radical departure from the behaviour of other event objects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89664</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Klein">adamk</who>
    <bug_when>2013-06-20 21:08:28 +0000</bug_when>
    <thetext>I guess my argument is for consistency of behavior. Why should it be possible to create a MessageEvent with an HTMLDocument as its data when using the constructor form but not when using postMessage? I take it your response is that, in the constructor case, there&apos;s no need for restricting authors to those things which are structured-cloneable.

My motivation in filing this bug happens to involve implementation details of these events in Blink, where storing the passed-in object itself creates an opportunity for memory leaks and security bugs. But there are alternative fixes for those problems if it turns out that this inconsistency between organic and synthetic events is intentional.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90165</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-07-02 22:33:09 +0000</bug_when>
    <thetext>Closing per IRC discussion last week; reopen if I misremember our conclusion.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>