Randomly adding Vitaly as a new reviewer since Slava is now on vacation.




http://codereview.chromium.org/7388011/diff/1/src/runtime.cc
File src/runtime.cc (right):

http://codereview.chromium.org/7388011/diff/1/src/runtime.cc#newcode10302
src/runtime.cc:10302: if (!receiver->IsJSObject() &&
!receiver->IsUndefined()) {
On 2011/07/15 12:43:13, Vyacheslav Egorov wrote:
I think we should check for strict || builtin function instead.
Receivers of all
other functions should be wrapped.

I think we have general problem with non-jsobject receivers for strict
functions.

function f() { "use strict"; debugger; }
f.apply("x");

will display this as String object in the debugger while it is
actually a
primitive. (But it will not crash).

D'oh! You are absolutely right. Thank you. :-)

That change requires a couple of extra changes as well because the
receiver can now be primitive values as well as undefined and objects.

http://codereview.chromium.org/7388011/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to