<?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>127072</bug_id>
          
          <creation_ts>2014-01-15 16:07:16 -0800</creation_ts>
          <short_desc>Don&apos;t autorelease wrapper object (WebProcessPlugInScriptWorld) for InjectedBundleScriptWorld::normalWorld().</short_desc>
          <delta_ts>2014-01-15 18:00:18 -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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></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="Yongjun Zhang">yongjun_zhang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>andersca</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>mitz</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>968511</commentid>
    <comment_count>0</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2014-01-15 16:07:16 -0800</bug_when>
    <thetext>InjectedBundleScriptWorld::normalWorld() returns a static InjectedBundleScriptWorld,  autoreleasing its wrapper object could cause dangling pointer to InjectedBundleScriptWorld and crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968512</commentid>
    <comment_count>1</comment_count>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2014-01-15 16:08:33 -0800</bug_when>
    <thetext>This is referring to the method [WKWebProcessPlugInScriptWorld normalWorld]:

+ (WKWebProcessPlugInScriptWorld *)normalWorld
{
    return [wrapper(*InjectedBundleScriptWorld::normalWorld()) autorelease];
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968513</commentid>
    <comment_count>2</comment_count>
      <attachid>221313</attachid>
    <who name="Yongjun Zhang">yongjun_zhang</who>
    <bug_when>2014-01-15 16:14:45 -0800</bug_when>
    <thetext>Created attachment 221313
Patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968537</commentid>
    <comment_count>3</comment_count>
      <attachid>221313</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-01-15 17:18:40 -0800</bug_when>
    <thetext>Comment on attachment 221313
Patch.

What about all the other uses of the &quot;[wrapper(X) autorelease]&quot; idiom, like the &quot;world&quot; selector in the same file, and a bunch of others?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968539</commentid>
    <comment_count>4</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-01-15 17:21:26 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 221313 [details])
&gt; What about all the other uses of the &quot;[wrapper(X) autorelease]&quot; idiom, like the &quot;world&quot; selector in the same file, and a bunch of others?

I see. In all other cases, we only autorelease after allocating or ref-ing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968540</commentid>
    <comment_count>5</comment_count>
      <attachid>221313</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-01-15 17:21:42 -0800</bug_when>
    <thetext>Comment on attachment 221313
Patch.

r=me

Sadly, I am not a WK2 owner :(.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968541</commentid>
    <comment_count>6</comment_count>
    <who name="">mitz</who>
    <bug_when>2014-01-15 17:23:26 -0800</bug_when>
    <thetext>r=me too</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968551</commentid>
    <comment_count>7</comment_count>
      <attachid>221313</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-15 18:00:16 -0800</bug_when>
    <thetext>Comment on attachment 221313
Patch.

Clearing flags on attachment: 221313

Committed r162106: &lt;http://trac.webkit.org/changeset/162106&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>968552</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-01-15 18:00:18 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>221313</attachid>
            <date>2014-01-15 16:14:45 -0800</date>
            <delta_ts>2014-01-15 18:00:16 -0800</delta_ts>
            <desc>Patch.</desc>
            <filename>autorelease_wkWebProcessPlugInScriptWorld.patch</filename>
            <type>text/plain</type>
            <size>1593</size>
            <attacher name="Yongjun Zhang">yongjun_zhang</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
S2l0Mi9DaGFuZ2VMb2cJKHJldmlzaW9uIDE2MjEwMSkKKysrIFNvdXJjZS9XZWJLaXQyL0NoYW5n
ZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwzICsxLDE2IEBACisyMDE0LTAxLTE1ICBZb25nanVu
IFpoYW5nICA8eW9uZ2p1bl96aGFuZ0BhcHBsZS5jb20+CisKKyAgICAgICAgaHR0cHM6Ly9idWdz
LndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTEyNzA3MgorICAgICAgICBEb24ndCBhdXRvcmVs
ZWFzZSB3cmFwcGVyIG9iamVjdCAoV2ViUHJvY2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