<?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>51528</bug_id>
          
          <creation_ts>2010-12-23 03:02:15 -0800</creation_ts>
          <short_desc>[v8] ScriptController::evaluate returns empty result for undefined. Can&apos;t distinguish errors from undefined results.</short_desc>
          <delta_ts>2011-03-01 01: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>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</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="Tom R">tom.rathbone</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>anthony.taranto</cc>
    
    <cc>magreenblatt</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>326006</commentid>
    <comment_count>0</comment_count>
    <who name="Tom R">tom.rathbone</who>
    <bug_when>2010-12-23 03:02:15 -0800</bug_when>
    <thetext>ScriptController::evaluate contains:

    if (object.IsEmpty() || object-&gt;IsUndefined())
        return ScriptValue();

Should be:

    if (object.IsEmpty())
        return ScriptValue();

Returning an empty ScriptValue should indicate an error. As undefined is a valid return value for void calls returning an empty ScriptValue makes it impossible to distinguish undefined results from errors.

Related mailing list thread:

https://lists.webkit.org/pipermail/webkit-dev/2010-December/015417.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>326060</commentid>
    <comment_count>1</comment_count>
      <attachid>77331</attachid>
    <who name="Tom R">tom.rathbone</who>
    <bug_when>2010-12-23 06:39:17 -0800</bug_when>
    <thetext>Created attachment 77331
fix, allow the &quot;undefined&quot; v8 object to be returned</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>330850</commentid>
    <comment_count>2</comment_count>
    <who name="Marshall Greenblatt">magreenblatt</who>
    <bug_when>2011-01-07 10:29:08 -0800</bug_when>
    <thetext>Hi Yury, please review this patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>332216</commentid>
    <comment_count>3</comment_count>
      <attachid>77331</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-01-11 03:08:49 -0800</bug_when>
    <thetext>Comment on attachment 77331
fix, allow the &quot;undefined&quot; v8 object to be returned

This patch was not created correctly.  Please create from a WebKit checkout.  Also, all patches require a ChangeLog.

webkit-patch upload

will walk you through much of this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>332236</commentid>
    <comment_count>4</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2011-01-11 03:30:55 -0800</bug_when>
    <thetext>Hi Tom, please add proper ChangeLog entry to the patch as Eric suggested, otherwise the change looks good to me.

(In reply to comment #2)
&gt; Hi Yury, please review this patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355470</commentid>
    <comment_count>5</comment_count>
      <attachid>83357</attachid>
    <who name="anthony taranto">anthony.taranto</who>
    <bug_when>2011-02-22 12:04:55 -0800</bug_when>
    <thetext>Created attachment 83357
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>355472</commentid>
    <comment_count>6</comment_count>
    <who name="anthony taranto">anthony.taranto</who>
    <bug_when>2011-02-22 12:06:50 -0800</bug_when>
    <thetext>Generated a patch with webkit-patch upload and included a ChangeLog. Let me know if anything else is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>358114</commentid>
    <comment_count>7</comment_count>
    <who name="Marshall Greenblatt">magreenblatt</who>
    <bug_when>2011-02-25 12:16:56 -0800</bug_when>
    <thetext>Can someone add this patch to the commit queue? Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>359736</commentid>
    <comment_count>8</comment_count>
      <attachid>83357</attachid>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2011-03-01 01:00:11 -0800</bug_when>
    <thetext>Comment on attachment 83357
Patch

Clearing flags on attachment: 83357

Committed r79981: &lt;http://trac.webkit.org/changeset/79981&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>359737</commentid>
    <comment_count>9</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2011-03-01 01:00:18 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>77331</attachid>
            <date>2010-12-23 06:39:17 -0800</date>
            <delta_ts>2011-03-01 00:57:05 -0800</delta_ts>
            <desc>fix, allow the &quot;undefined&quot; v8 object to be returned</desc>
            <filename>51528-fix.patch</filename>
            <type>text/plain</type>
            <size>511</size>
            <attacher name="Tom R">tom.rathbone</attacher>
            
              <data encoding="base64">SW5kZXg6IHNyYy90aGlyZF9wYXJ0eS9XZWJLaXQvV2ViQ29yZS9iaW5kaW5ncy92OC9TY3JpcHRD
b250cm9sbGVyLmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBzcmMvdGhpcmRfcGFydHkvV2ViS2l0L1dlYkNv
cmUvYmluZGluZ3MvdjgvU2NyaXB0Q29udHJvbGxlci5jcHAJKHJldmlzaW9uIDc0MTgyKQorKysg
c3JjL3RoaXJkX3BhcnR5L1dlYktpdC9XZWJDb3JlL2JpbmRpbmdzL3Y4L1NjcmlwdENvbnRyb2xs
ZXIuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0yNTcsNyArMjU3LDcgQEAKIAogICAgIG1fc291cmNl
VVJMID0gc2F2ZWRTb3VyY2VVUkw7CiAKLSAgICBpZiAob2JqZWN0LklzRW1wdHkoKSB8fCBvYmpl
Y3QtPklzVW5kZWZpbmVkKCkpCisgICAgaWYgKG9iamVjdC5Jc0VtcHR5KCkpCiAgICAgICAgIHJl
dHVybiBTY3JpcHRWYWx1ZSgpOwogCiAgICAgcmV0dXJuIFNjcmlwdFZhbHVlKG9iamVjdCk7Cg==
</data>
<flag name="review"
          id="69829"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>83357</attachid>
            <date>2011-02-22 12:04:55 -0800</date>
            <delta_ts>2011-03-01 01:00:11 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-51528-20110216114639.patch</filename>
            <type>text/plain</type>
            <size>1232</size>
            <attacher name="anthony taranto">anthony.taranto</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCBjYWEyMTYyZjk4NWQ5YWYwNzNhYzJhYzllYmQ1ZTk5NTE2YzA5ZjMwLi5m
MzFhMDE5NTVlZjkzNDI1Yjk5Y2M3MGM4Njc1ZjBkMjUzMjg3NWNiIDEwMDY0NAotLS0gYS9Tb3Vy
Y2UvV2ViQ29yZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0x
LDMgKzEsMTEgQEAKKzIwMTEtMDItMTYgIGFudGhvbnkgdGFyYW50byAgPGFudGhvbnkudGFyYW50
b0BnbWFpbC5jb20+CisKKyAgICAgICAgUmV0dXJuIHVuZGVmaW5lZCB2YWx1ZSBmcm9tIFNjcmlw
dENvbnRyb2xsZXI6OmV2YW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