<?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>7831</bug_id>
          
          <creation_ts>2006-03-17 10:41:03 -0800</creation_ts>
          <short_desc>.apply/call does not set this for eval</short_desc>
          <delta_ts>2008-07-20 13:30: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>JavaScriptCore</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Francisco Tolmasky">tolmasky</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ddkilzer</cc>
    
    <cc>ggaren</cc>
    
    <cc>ian</cc>
    
    <cc>oliver</cc>
    
    <cc>zwarich</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36756</commentid>
    <comment_count>0</comment_count>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2006-03-17 10:41:03 -0800</bug_when>
    <thetext>Since eval simply ignores the this argument and always opts for the calling context&apos;s this or the global object, using eval.apply(something, args) does not work.  ECMA is somewhat unclear about this (10.2 says to use the calling context&apos;s this object), but I think it&apos;s pretty clear that if you explicitly ask to use another this then you should, given that that is basically the point of apply/call.  Firefox handles this the same way Safari currently does (incorrectly in my opinion).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36757</commentid>
    <comment_count>1</comment_count>
      <attachid>7132</attachid>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2006-03-17 10:42:36 -0800</bug_when>
    <thetext>Created attachment 7132
test case

when this.x=9 is done, window.x is set instead of a.x, which is why &quot;undfined&quot; is then alerted.  I believe &quot;9&quot; should be alerted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36759</commentid>
    <comment_count>2</comment_count>
      <attachid>7133</attachid>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2006-03-17 10:48:46 -0800</bug_when>
    <thetext>Created attachment 7133
Makes eval.apply/call pay attention to the this argument.

What this does is make callAsFunction for eval check whether there is in fact a thisObj, which only takes place I believe if its called through apply or call.  In this case, if its not undefined or null, it uses it.  ContextImp now also checks for a this argument in eval if which again should only take place if we called it initially through apply or call.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36769</commentid>
    <comment_count>3</comment_count>
      <attachid>7133</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2006-03-17 11:48:09 -0800</bug_when>
    <thetext>Comment on attachment 7133
Makes eval.apply/call pay attention to the this argument.

The substance of the change looks good. I have some style concerns:

1) I don&apos;t think you need comments explaining what the code used to do or why it was wrong. That can go in the ChangeLog.

2) This if statement shouldn&apos;t be all on one line.

+		if(!thisObj||thisObj-&gt;isUndefinedOrNull()) thisObj= static_cast&lt;JSObject *&gt;(exec-&gt;context().thisValue());

Can thisObj ever actually truly be a null pointer as opposed to JS null?

3) Needs a ChangeLog entry.

4) Needs a test case - you can look in LayoutTests/fast/js/resources/*.js, make a JS file like that using shouldBe and then use make-js-test-wrappers to make the HTML wrapper.

r- for ChangeLog and test case, but the substance of the change looks correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36779</commentid>
    <comment_count>4</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-03-17 13:49:47 -0800</bug_when>
    <thetext>No, thisObj can never be a NULL pointer. It&apos;s important to leave NULL checks out of code that works with JSValues, because they might confuse folks into thinking that it&apos;s OK to return NULL rather than jsNull().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36780</commentid>
    <comment_count>5</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2006-03-17 13:51:58 -0800</bug_when>
    <thetext>Also, please execute run-javascriptcore-tests to make sure this patch doesn&apos;t cause any regressions in the mozilla JS tests. (And maybe it will fix a few!)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36836</commentid>
    <comment_count>6</comment_count>
      <attachid>7146</attachid>
    <who name="Francisco Tolmasky">tolmasky</who>
    <bug_when>2006-03-18 01:25:18 -0800</bug_when>
    <thetext>Created attachment 7146
Modified Patch

I ended up having to make a significantly different patch for this.  The old one, while working, caused a regression in Expressions/1.11.1.js or so.  The problem is that callAsFunction always gets sent a thisObj, so its not enough to check whether thisObj isn&apos;t null or undefined to see whether we are actually being called from an apply or call.  So the solution I came up with was to trick it by creating an inbetween ExecState that contains the correct thisObj.  I wanted to float this by you guys as whether it was an acceptible solution or not before writing a changelog/tests for it, since it does seem a bit hackish.  Also, this new patch fixes js1_6/Array/regress-304828.js .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36961</commentid>
    <comment_count>7</comment_count>
      <attachid>7146</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-03-19 16:30:49 -0800</bug_when>
    <thetext>Comment on attachment 7146
Modified Patch

Thanks for taking this on!

There are many minor things wrong with this patch.

1) no tests -- patches that fix bugs require tests that demonstrate the bug is fixed (although I suppose the fact that this fixes on of the Mozilla tests might be an OK substitute)
2) no change log entry
3) commented-out code left in internal.cpp, should not be
4) patch that changes only whitespace in function.cpp
5) tabs in the patch (we use spaces for indenting)
6) no space between &quot;if&quot; and the &quot;(&quot; following it in the code in function_object.cpp
7) no spaces around the &quot;==&quot; operator
8) &quot;ContextImp *cpy= &quot; should be &quot;ContextImp* cpy = &quot;.
9) We don&apos;t declare multiple variables with a single declaration as is done with &quot;cpy&quot; and &quot;ctx&quot;.
10) local variable named &quot;cpy&quot; -- &quot;copy&quot; would be better
11) local variable named &quot;ctx&quot; -- name that is either a word or just a single letter would be better
12) no spaces after commas in some function calls

However, the main issue here is almost certainly performance. Adding an inherits check to every function call is probably not a good idea. And as to the reason that&apos;s needed, I don&apos;t see what information FunctionProtoFunc::callAsFunction has that GlobalFuncImp::callAsFunction will not have.

Won&apos;t the internal.cpp change fix the bug without any change to function_object.cpp at all? If not, what&apos;s the high level description of what the function_object.cpp change does?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86463</commentid>
    <comment_count>8</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 06:49:15 -0700</bug_when>
    <thetext>This appears to be fixed (the test case no longer alerts) with WebKit nightly build r35249.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86464</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 06:52:22 -0700</bug_when>
    <thetext>Oops...since nothing is alerted on the nightly WebKit (expected is that &quot;9&quot; is alerted per Comment #1), this is a change in behavior that should probably be investigated.  Reopening.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86465</commentid>
    <comment_count>10</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 06:54:28 -0700</bug_when>
    <thetext>Firefox 2.0.0.x does not show an alert, either.  Firebug lists the error as:

function eval must be called directly, and not by way of a function of another name

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86466</commentid>
    <comment_count>11</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 07:20:33 -0700</bug_when>
    <thetext>Running a bisect of nightly builds to find when the behavior changed.  Interestingly, nightly builds r27811-r28007 all crashed with a null pointer running the test case.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86467</commentid>
    <comment_count>12</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 07:34:24 -0700</bug_when>
    <thetext>The bisect-builds script reports:

Fails: r30868  Works: r30885

Where &quot;Fails&quot; means an alert was displayed with &quot;undefined&quot; in the text of the alert, and &quot;Works&quot; means no alert was displayed.

Again, the expected result per Comment #1 is that &quot;9&quot; is displayed.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86469</commentid>
    <comment_count>13</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 07:48:07 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; The bisect-builds script reports:
&gt; 
&gt; Fails: r30868  Works: r30885

The only interesting commit in this range is:

http://trac.webkit.org/changeset/30871

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86470</commentid>
    <comment_count>14</comment_count>
      <attachid>22388</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2008-07-20 07:52:59 -0700</bug_when>
    <thetext>Created attachment 22388
test case for exception

This test case tests that an exception is thrown in the expression.  This seems to jibe with the changes in r30871.

I&apos;d suggest closing this bug in light of the above information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86495</commentid>
    <comment_count>15</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2008-07-20 13:30:51 -0700</bug_when>
    <thetext>This behaviour is &quot;correct&quot;.  Clearly firefox does the eval aliasing check before it does the target object checking which results in a different failure.  However this doesn&apos;t change the fact that eval can not be called in this manner.
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7132</attachid>
            <date>2006-03-17 10:42:36 -0800</date>
            <delta_ts>2006-03-17 10:42:36 -0800</delta_ts>
            <desc>test case</desc>
            <filename>tester.html</filename>
            <type>text/html</type>
            <size>70</size>
            <attacher name="Francisco Tolmasky">tolmasky</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KYT0ge307CgpldmFsLmFwcGx5KGEsIFsidGhpcy54PSA5OyBhbGVydChhLngpOyJd
KTsKCjwvc2NyaXB0Pg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>7133</attachid>
            <date>2006-03-17 10:48:46 -0800</date>
            <delta_ts>2006-03-17 11:48:09 -0800</delta_ts>
            <desc>Makes eval.apply/call pay attention to the this argument.</desc>
            <filename>evalapplypatch.txt</filename>
            <type>text/plain</type>
            <size>2268</size>
            <attacher name="Francisco Tolmasky">tolmasky</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL2tqcy9pbnRlcm5hbC5jcHAKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gSmF2
YVNjcmlwdENvcmUva2pzL2ludGVybmFsLmNwcAkocmV2aXNpb24gMTMzNTQpCisrKyBKYXZhU2Ny
aXB0Q29yZS9ranMvaW50ZXJuYWwuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0yMTYsNyArMjE2LDEw
IEBAIENvbnRleHRJbXA6OkNvbnRleHRJbXAoSlNPYmplY3QgKmdsb2IsIEkKICAgICAgIGlmIChf
Y2FsbGluZ0NvbnRleHQpIHsKICAgICAgICAgc2NvcGUgPSBfY2FsbGluZ0NvbnRleHQtPnNjb3Bl
Q2hhaW4oKTsKICAgICAgICAgdmFyaWFibGUgPSBfY2FsbGluZ0NvbnRleHQtPnZhcmlhYmxlT2Jq
ZWN0KCk7Ci0gICAgICAgIHRoaXNWYWwgPSBfY2FsbGluZ0NvbnRleHQtPnRoaXNWYWx1ZSgpOwor
CQkvLyB3YXM6IF9jYWxsaW5nQ29udGV4dC0+dGhpc1ZhbHVlKCk7ICBIb3dldmVyLCB3ZSBzaG91
bGQgdHJ1c3QgdGhpc1YsIGJlY2F1c2UgY2FsbEFzRnVuY3Rpb24gd2lsbCBoYW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ICAgICAg
ICAgIHByb2dOb2RlLmdldCgpLAogICAgICAgICAgICAgICAgICAgICAgICBFdmFsQ29kZSwKICAg
ICAgICAgICAgICAgICAgICAgICAgZXhlYy0+Y29udGV4dCgpLmltcCgpKTsK
</data>
<flag name="review"
          id="1872"
          type_id="1"
          status="-"
          setter="mjs"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>7146</attachid>
            <date>2006-03-18 01:25:18 -0800</date>
            <delta_ts>2006-03-19 16:30:49 -0800</delta_ts>
            <desc>Modified Patch</desc>
            <filename>newevalapplycallpatch.txt</filename>
            <type>text/plain</type>
            <size>3469</size>
            <attacher name="Francisco Tolmasky">tolmasky</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL2tqcy9pbnRlcm5hbC5jcHAKPT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gSmF2
YVNjcmlwdENvcmUva2pzL2ludGVybmFsLmNwcAkocmV2aXNpb24gMTMzNjUpCisrKyBKYXZhU2Ny
aXB0Q29yZS9ranMvaW50ZXJuYWwuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC0yMTYsNyArMjE2LDcg
QEAgQ29udGV4dEltcDo6Q29udGV4dEltcChKU09iamVjdCAqZ2xvYiwgSQogICAgICAgaWYgKF9j
YWxsaW5nQ29udGV4dCkgewogICAgICAgICBzY29wZSA9IF9jYWxsaW5nQ29udGV4dC0+c2NvcGVD
aGFpbigpOwogICAgICAgICB2YXJpYWJsZSA9IF9jYWxsaW5nQ29udGV4dC0+dmFyaWFibGVPYmpl
Y3QoKTsKLSAgICAgICAgdGhpc1ZhbCA9IF9jYWxsaW5nQ29udGV4dC0+dGhpc1ZhbHVlKCk7Cisg
ICAgICAgIHRoaXNWYWwgPSB0aGlzVjsvL19jYWxsaW5nQ29udGV4dC0+dGhpc1ZhbHVlKCk7CiAg
ICAgICAgIGJyZWFrOwogICAgICAgfSAvLyBlbHNlIHNhbWUgYXMgR2xvYmFsQ29kZQogICAgIGNh
c2UgR2xvYmFsQ29kZToKSW5kZXg6IEphdmFTY3JpcHRDb3JlL2tqcy9mdW5jdGlvbi5jcHAKPT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQotLS0gSmF2YVNjcmlwdENvcmUva2pzL2Z1bmN0aW9uLmNwcAkocmV2aXNpb24gMTMz
NjUpCisrKyBKYXZhU2NyaXB0Q29yZS9ranMvZnVuY3Rpb24uY3BwCSh3b3JraW5nIGNvcHkpCkBA
IC04MDcsNyArODA3LDcgQEAgSlNWYWx1ZSAqR2xvYmFsRnVuY0ltcDo6Y2FsbEFzRnVuY3Rpb24o
RQogICAgICAgICAgICAgICAgICAgICAgICBwcm9nTm9kZS5nZXQoKSwKICAgICAgICAgICAgICAg
ICAgICAgICAgRXZhbENvZGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGV4ZWMtPmNvbnRleHQo
KS5pbXAoKSk7Ci0gICAgICAgIAorCiAgICAgICAgIEV4ZWNTdGF0ZSBuZXdFeGVjKGV4ZWMtPmR5
bmFtaWNJbnRlcnByZXRlcigpLCAmY3R4KTsKICAgICAgICAgbmV3RXhlYy5zZXRFeGNlcHRpb24o
ZXhlYy0+ZXhjZXB0aW9uKCkpOyAvLyBjb3VsZCBiZSBudWxsCiAgICAgICAgIApJbmRleDogSmF2
YVNjcmlwdENvcmUva2pzL2Z1bmN0aW9uX29iamVjdC5jcHAKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gSmF2YVNj
cmlwdENvcmUva2pzL2Z1bmN0aW9uX29iamVjdC5jcHAJKHJldmlzaW9uIDEzMzY1KQorKysgSmF2
YVNjcmlwdENvcmUva2pzL2Z1bmN0aW9uX29iamVjdC5jcHAJKHdvcmtpbm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GxUaGlzLGFyZ3MuY29weVRhaWwoKSk7Cisg
ICAgfQorCQogICAgIH0KICAgICBicmVhazsKICAgfQpJbmRleDogSmF2YVNjcmlwdENvcmUva2pz
L2ludGVycHJldGVyLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gSmF2YVNjcmlwdENvcmUva2pzL2ludGVycHJl
dGVyLmgJKHJldmlzaW9uIDEzMzY1KQorKysgSmF2YVNjcmlwdENvcmUva2pzL2ludGVycHJldGVy
LmgJKHdvcmtpbmcgY29weSkKQEAgLTQzOCw2ICs0MzgsNyBAQCBuYW1lc3BhY2UgS0pTIHsKICAg
ICBmcmllbmQgY2xhc3MgRnVuY3Rpb25JbXA7CiAgICAgZnJpZW5kIGNsYXNzIFJ1bnRpbWVNZXRo
b2RJbXA7CiAgICAgZnJpZW5kIGNsYXNzIEdsb2JhbEZ1bmNJbXA7CisJZnJpZW5kIGNsYXNzIEZ1
bmN0aW9uUHJvdG9GdW5jOwogICBwdWJsaWM6CiAgICAgLyoqCiAgICAgICogUmV0dXJucyB0aGUg
aW50ZXJwcmV0ZXIgYXNzb2NpYXRlZCB3aXRoIHRoaXMgZXhlY3V0aW9uIHN0YXRlCg==
</data>
<flag name="review"
          id="1880"
          type_id="1"
          status="-"
          setter="darin"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>22388</attachid>
            <date>2008-07-20 07:52:59 -0700</date>
            <delta_ts>2008-07-20 07:52:59 -0700</delta_ts>
            <desc>test case for exception</desc>
            <filename>bug-7831-test-exception.html</filename>
            <type>text/html</type>
            <size>125</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PHNjcmlwdD4KYT0ge307Cgp0cnkgewpldmFsLmFwcGx5KGEsIFsidGhpcy54PSA5OyBhbGVydChh
LngpOyJdKTsKfSBjYXRjaCAoZXgpIHsKICAgIGFsZXJ0KCJFeGNlcHRpb246ICIgKyBleCk7Cn0K
Cjwvc2NyaXB0Pgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>