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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>50106</bug_id>
          
          <creation_ts>2010-11-26 04:12:33 -0800</creation_ts>
          <short_desc>WebKit2 asynchronous policy check for window.open() clashes with synchronous operations on the opened window&apos;s DOM</short_desc>
          <delta_ts>2010-11-29 01:30:19 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="alan">zalan</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>ap</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>313950</commentid>
    <comment_count>0</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2010-11-26 04:12:33 -0800</bug_when>
    <thetext>with the following code

var newWin = window.open(&quot;&quot;, &quot;awin&quot;);
newWin.document.open();
newWin.document.close();

in WebKit2, the document.open() cancels the outstanding policy check, issued by window.open(), while with WebKit, since the policy check happens in a sync manner, document.open() does not cancel it. When the execution hits document.open() (Document::open(Document* ownerDocument)), with WebKit2 the frame is in FrameStateProvisional state, while with WebKit, it is in FrameStateComplete state.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>313951</commentid>
    <comment_count>1</comment_count>
      <attachid>74916</attachid>
    <who name="alan">zalan</who>
    <bug_when>2010-11-26 04:20:30 -0800</bug_when>
    <thetext>Created attachment 74916
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>314304</commentid>
    <comment_count>2</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2010-11-29 01:30:19 -0800</bug_when>
    <thetext>got fixed with https://bugs.webkit.org/show_bug.cgi?id=49605

Committed r72122: http://trac.webkit.org/changeset/72122</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>74916</attachid>
            <date>2010-11-26 04:20:30 -0800</date>
            <delta_ts>2010-11-26 04:20:30 -0800</delta_ts>
            <desc>test case</desc>
            <filename>newwin.html</filename>
            <type>text/html</type>
            <size>697</size>
            <attacher name="alan">zalan</attacher>
            
              <data encoding="base64">PGh0bWw+IAo8aGVhZD4gCjx0aXRsZT5KYXZhU2NyaXB0IFdpbmRvdyBPcGVuIC8gQ2xvc2UgVGVz
dCAxPC90aXRsZT4gCjwvaGVhZD4gCjxzY3JpcHQgdHlwZT0idGV4dC9qYXZhc2NyaXB0Ij4gCnZh
ciBuZXdXaW47CmZ1bmN0aW9uIGNyZWF0ZVdpbmRvdygpIHsKbmV3V2luID0gd2luZG93Lm9wZW4o
IiIsICJhd2luIik7Cm5ld1dpbi5kb2N1bWVudC5vcGVuKCk7Cm5ld1dpbi5kb2N1bWVudC5jbG9z
ZSgpOwp9CiAKZnVuY3Rpb24gY2xvc2VXaW5kb3coKSB7CmlmIChuZXdXaW4pIHsKICBuZXdXaW4u
Y2xvc2UoKTsKICBuZXdXaW4gPSB2b2lkKDApOwp9IGVsc2UgewogIGFsZXJ0KCdXaW5kb3cgYWxy
ZWFkeSBjbG9zZWQnKTsKfQp9Cjwvc2NyaXB0PiAKPGJvZHk+IAogCjxwPiBDbGljayB0aGUgIm9w
ZW4gcG9wdXAgd2luZG93Ii4KIAo8cD4gRXhwZWN0ZWQ6IHdpbmRvdyBvcGVucyBhbmQgbm8gbG9h
ZCBwcm9ncmVzcyBpcyB2aXNpYmxlLgogCjxwPiBCdWc6IHdpbmRvdyBvcGVucyBidXQgbG9hZCBw
cm9ncmVzcyBpbmRpY2F0b3IgaXMgdmlzaWJsZS4KIAo8cD48YSBocmVmPSJqYXZhc2NyaXB0OmNy
ZWF0ZVdpbmRvdygpOyI+T3BlbiBQb3B1cCBXaW5kb3c8L2E+IAogCjxwPjxhIGhyZWY9ImphdmFz
Y3JpcHQ6Y2xvc2VXaW5kb3coKTsiPkNsb3NlIHRoZSBQb3B1cCBXaW5kb3c8L2E+IAogCjwvYm9k
eT4gCjwvaHRtbD4gCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>