<?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>84884</bug_id>
          
          <creation_ts>2012-04-25 12:38:03 -0700</creation_ts>
          <short_desc>[Safari] jQuery&apos;s getJSON fails when the script element that loaded jquery.js is removed from document</short_desc>
          <delta_ts>2012-04-25 15:17:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>76083</dup_id>
          
          <bug_file_loc>https://www.facebook.com/cognitom/posts/319792518094577</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>adele</cc>
    
    <cc>ap</cc>
    
    <cc>ggaren</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>609974</commentid>
    <comment_count>0</comment_count>
      <attachid>138857</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-04-25 12:38:03 -0700</bug_when>
    <thetext>Created attachment 138857
demo

Reduction:
1. Save the attached document locally.
2. Open it.

Expected result:
Alerts &apos;PASS&apos;

Actual result:
No alerts</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>609978</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-04-25 12:40:39 -0700</bug_when>
    <thetext>The script works as intended if the script element is not removed.

This was reported on facebook by a Japanese developer. He says the problem doesn&apos;t reproduce on Chrome.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610069</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-04-25 14:58:08 -0700</bug_when>
    <thetext>This looks like correct behavior to me - the script element is removed before the script loads, so it never has a chance to execute.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610072</commentid>
    <comment_count>3</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-04-25 15:01:43 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; This looks like correct behavior to me - the script element is removed before the script loads, so it never has a chance to execute.

The script is supposed to be loaded since it doesn&apos;t have differ or aync content attributes on them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610081</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-04-25 15:15:27 -0700</bug_when>
    <thetext>Indeed, this is a valid test case. This has been fixed already, which is why this passes in Chrome.

*** This bug has been marked as a duplicate of bug 76083 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610085</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-04-25 15:17:18 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Indeed, this is a valid test case. This has been fixed already, which is why this passes in Chrome.
&gt; 
&gt; *** This bug has been marked as a duplicate of bug 76083 ***

Ah, great!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>138857</attachid>
            <date>2012-04-25 12:38:03 -0700</date>
            <delta_ts>2012-04-25 12:38:03 -0700</delta_ts>
            <desc>demo</desc>
            <filename>xhr-failure-on-script-removal.html</filename>
            <type>text/html</type>
            <size>390</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPHNjcmlwdCBzcmM9Imh0dHA6Ly9jb2RlLmpx
dWVyeS5jb20vanF1ZXJ5LTEuNy5qcyI+PC9zY3JpcHQ+CjwvaGVhZD4KPGJvZHk+CjxzY3JpcHQ+
CgokLmdldEpTT04oJ2h0dHBzOi8vYWpheC5nb29nbGVhcGlzLmNvbS9hamF4L3NlcnZpY2VzL2Zl
ZWQvbG9hZD92PTEuMCZxPWh0dHA6Ly93d3cuZW5nYWRnZXQuY29tL3Jzcy54bWwmY2FsbGJhY2s9
PycsIGZ1bmN0aW9uICgpIHsKICAgIGFsZXJ0KCdQQVNTJyk7Cn0pOwp2YXIgc2NyaXB0ID0gZG9j
dW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXTsKc2NyaXB0LnBhcmVudE5vZGUu
cmVtb3ZlQ2hpbGQoc2NyaXB0KTsKCjwvc2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>