<?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>27883</bug_id>
          
          <creation_ts>2009-07-31 09:03:56 -0700</creation_ts>
          <short_desc>[commit+] [v8] check if proxy is present before invoking a handler</short_desc>
          <delta_ts>2009-08-02 00:33:51 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</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>0</everconfirmed>
          <reporter name="anton muhin">antonm</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>vitalyr</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>136168</commentid>
    <comment_count>0</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-07-31 09:03:56 -0700</bug_when>
    <thetext>There is NPE crash (http://crash/reportdetail?reportid=19d99906cbceb8a7&amp;product=Chrome&amp;version=3.0.196.0&amp;date=&amp;signature=WebCore::V8Proxy::callFunction%28v8::Handle) which is most probably due NULL proxy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136170</commentid>
    <comment_count>1</comment_count>
      <attachid>33878</attachid>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-07-31 09:10:57 -0700</bug_when>
    <thetext>Created attachment 33878
Initial version

To be honest, I would guess the code expects always not NULL proxy here as listeners are enabled. (but I think in that case it should be documented with ASSERT).  So I am by no means insisting on this patch.

One thing that stroke me is presence of GoogleUpdateClient in the call stack (see http://crash/reportdetail?reportid=19d99906cbceb8a7&amp;product=Chrome&amp;version=3.0.196.0&amp;date=&amp;signature=WebCore::V8Proxy::callFunction%28v8::Handle).  My immediate reaction is something wasn&apos;t initialized properly.

And I&apos;ll be on vacation two next weeks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136173</commentid>
    <comment_count>2</comment_count>
      <attachid>33878</attachid>
    <who name="David Levin">levin</who>
    <bug_when>2009-07-31 09:19:04 -0700</bug_when>
    <thetext>Comment on attachment 33878
Initial version

&gt; Index: third_party/WebKit/WebCore/ChangeLog
&gt; +2009-07-31  Anton Muhin  &lt;antonm@chromium.org&gt;
&gt; +
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +

Please add:

Bug Title
Bug Link

&quot;prepare-ChangeLog --bug #&quot; will do this for you.

&gt; +        Do not invoke handler functio if proxy is NULL (that would lead to NPE anyway).

typo: functio

Change NULL to 0 (since WebKit doesn&apos;t use NULL).

NPE is not an abbreviation that I&apos;m familiar with but I guess you mean crash/access violation.  It would be good to write it in a longer form without using an abbreviation.

Also, this ChangeLog explains what but not why.  Please add why.


Can there be a layout test for whatever problem was encountered?
  If so, please add one.
  If not, why not?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136210</commentid>
    <comment_count>3</comment_count>
      <attachid>33893</attachid>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-07-31 12:01:06 -0700</bug_when>
    <thetext>Created attachment 33893
Next iteration</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136212</commentid>
    <comment_count>4</comment_count>
    <who name="anton muhin">antonm</who>
    <bug_when>2009-07-31 12:07:35 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 33878 [details])
&gt; &gt; Index: third_party/WebKit/WebCore/ChangeLog
&gt; &gt; +2009-07-31  Anton Muhin  &lt;antonm@chromium.org&gt;
&gt; &gt; +
&gt; &gt; +        Reviewed by NOBODY (OOPS!).
&gt; &gt; +
&gt; 
&gt; Please add:
&gt; 
&gt; Bug Title
&gt; Bug Link
&gt; 
&gt; &quot;prepare-ChangeLog --bug #&quot; will do this for you.

Hopefully done. Thanks a lot for pointing out a flag.  Could this information be added to http://webkit.org/coding/contributing.html (just asking)

&gt; 
&gt; &gt; +        Do not invoke handler functio if proxy is NULL (that would lead to NPE anyway).
&gt; 
&gt; typo: functio

Tnx, done.

&gt; 
&gt; Change NULL to 0 (since WebKit doesn&apos;t use NULL).
&gt; 
&gt; NPE is not an abbreviation that I&apos;m familiar with but I guess you mean
&gt; crash/access violation.  It would be good to write it in a longer form without
&gt; using an abbreviation.

Hopefully done.
&gt; 
&gt; Also, this ChangeLog explains what but not why.  Please add why.

The problem is I don&apos;t know why (that&apos;s why I think we could drop this patch)---I think error is higher level, but I don&apos;t know enough to find the proper place.

&gt; 
&gt; 
&gt; Can there be a layout test for whatever problem was encountered?
&gt;   If so, please add one.
&gt;   If not, why not?

See above.  Sorry for repetition, but you, David, may know better person to track this down---I believe the problem is in higher levels (but in that case I&apos;d like to see ASSERT here instead my poor if)---I can understand that if event listener could be invoked, there should be proxy.  However, I am definitely not a person to understand every minutae of the stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136214</commentid>
    <comment_count>5</comment_count>
      <attachid>33893</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-07-31 12:22:23 -0700</bug_when>
    <thetext>Comment on attachment 33893
Next iteration

Thanks for the patch.  Can you file a bug to investigate whether we&apos;re making a mistake at a higher level?

As for modifying contributing.html, it&apos;s in SVN under WebKitSite.  Feel free to file a bug and propose a patch.  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136417</commentid>
    <comment_count>6</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-07-31 23:18:43 -0700</bug_when>
    <thetext>In the future, please create patches with bugzilla-tool or svn-create-patch.  This patch isn&apos;t correctly based, so we can&apos;t use our automatic tools.  :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>136518</commentid>
    <comment_count>7</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-08-02 00:33:51 -0700</bug_when>
    <thetext>Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/bindings/v8/custom/V8CustomEventListener.cpp
Committed r46689
	M	WebCore/ChangeLog
	M	WebCore/bindings/v8/custom/V8CustomEventListener.cpp
r46689 = 0fe2074611f24744d6dc1a6d37d9bb5f7ab66d10 (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
http://trac.webkit.org/changeset/46689</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>33878</attachid>
            <date>2009-07-31 09:10:57 -0700</date>
            <delta_ts>2009-07-31 12:01:06 -0700</delta_ts>
            <desc>Initial version</desc>
            <filename>webcore.patch</filename>
            <type>text/plain</type>
            <size>1297</size>
            <attacher name="anton muhin">antonm</attacher>
            
              <data encoding="base64">SW5kZXg6IHRoaXJkX3BhcnR5L1dlYktpdC9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t
LSB0aGlyZF9wYXJ0eS9XZWJLaXQvV2ViQ29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDQ2NjMxKQor
KysgdGhpcmRfcGFydHkvV2ViS2l0L1dlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTIgQEAKKzIwMDktMDctMzEgIEFudG9uIE11aGluICA8YW50b25tQGNocm9taXVt
Lm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KK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
OnJldHJpZXZlKG1fZnJhbWUpOworICAgIGlmICghcHJveHkpCisgICAgICAgIHJldHVybiB2ODo6
TG9jYWw8djg6OlZhbHVlPigpOwogICAgIHJldHVybiBwcm94eS0+Y2FsbEZ1bmN0aW9uKGhhbmRs
ZXJGdW5jdGlvbiwgcmVjZWl2ZXIsIDEsIHBhcmFtZXRlcnMpOwogfQogCg==
</data>
<flag name="review"
          id="18068"
          type_id="1"
          status="-"
          setter="levin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>33893</attachid>
            <date>2009-07-31 12:01:06 -0700</date>
            <delta_ts>2009-07-31 12:22:22 -0700</delta_ts>
            <desc>Next iteration</desc>
            <filename>webcore.patch</filename>
            <type>text/plain</type>
            <size>1379</size>
            <attacher name="anton muhin">antonm</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBXZWJLaXQvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDQ2NjMxKQorKysgV2ViS2l0L1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTYgQEAKKzIwMDktMDctMzEgIEFudG9uIE11
aGluICA8YW50b25tQGNocm9taXVtLm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkg
KE9PUFMhKS4KKworICAgICAgICBbdjhdIGNoZWNrIGlmIHByb3h5IGlzIHByZXNlbnQgYmVmb3Jl
IGludm9raW5nIGEgaGFuZGxlcgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9Mjc4ODMgCisKKyAgICAgICAgRG8gbm90IGludm9rZSBoYW5kbGVyIGZ1bmN0
aW9uIGlmIHByb3h5IGlzI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djg6OkxvY2FsPHY4OjpWYWx1ZT4oKTsKICAgICByZXR1cm4g
cHJveHktPmNhbGxGdW5jdGlvbihoYW5kbGVyRnVuY3Rpb24sIHJlY2VpdmVyLCAxLCBwYXJhbWV0
ZXJzKTsKIH0KIAo=
</data>
<flag name="review"
          id="18079"
          type_id="1"
          status="+"
          setter="abarth"
    />
          </attachment>
      

    </bug>

</bugzilla>