Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Issue 7388011: Fix the debugger for strict-mode functions. (Closed)

Created:
9 years, 5 months ago by Mads Ager (chromium)
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Fix the debugger for strict-mode functions. undefined is passed unchanged as the receiver for strict-mode functions through call and apply. Also, if a strict-mode function is called without an explicit receiver, undefined is passed as the receiver (not the global object as for other functions). R=vegorov@chromium.org BUG=89236 TEST=mjsunit/debug-scopes.js Committed: http://code.google.com/p/v8/source/detail?r=8675

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment. #

Patch Set 3 : Add new test file instead. #

Total comments: 6

Patch Set 4 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+137 lines, -7 lines) Patch
M src/mirror-debugger.js View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 3 2 chunks +7 lines, -5 lines 0 comments Download
A test/mjsunit/debug-receiver.js View 1 2 3 1 chunk +126 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Mads Ager (chromium)
9 years, 5 months ago (2011-07-15 12:25:04 UTC) #1
Vyacheslav Egorov (Chromium)
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()) { I think we should ...
9 years, 5 months ago (2011-07-15 12:43:13 UTC) #2
Mads Ager (chromium)
Randomly adding Vitaly as a new reviewer since Slava is now on vacation. http://codereview.chromium.org/7388011/diff/1/src/runtime.cc File ...
9 years, 5 months ago (2011-07-15 16:32:09 UTC) #3
Mads Ager (chromium)
Ready for another look. Added new test file that actually tests that the receiver is ...
9 years, 5 months ago (2011-07-15 17:53:10 UTC) #4
Vitaly Repeshko
LGTM http://codereview.chromium.org/7388011/diff/2002/src/mirror-debugger.js File src/mirror-debugger.js (right): http://codereview.chromium.org/7388011/diff/2002/src/mirror-debugger.js#newcode1609 src/mirror-debugger.js:1609: for (var r = receiver; !r.isNull() && property.isUndefined(); ...
9 years, 5 months ago (2011-07-18 13:04:49 UTC) #5
Mads Ager (chromium)
9 years, 5 months ago (2011-07-18 14:27:07 UTC) #6
Thanks Vitaly!

http://codereview.chromium.org/7388011/diff/2002/src/mirror-debugger.js
File src/mirror-debugger.js (right):

http://codereview.chromium.org/7388011/diff/2002/src/mirror-debugger.js#newco...
src/mirror-debugger.js:1609: for (var r = receiver; !r.isNull() &&
property.isUndefined(); r = r.protoObject()) {
On 2011/07/18 13:04:50, Vitaly Repeshko wrote:
> nit: While we're here let's fix the long line.

Done.

http://codereview.chromium.org/7388011/diff/2002/test/mjsunit/debug-receiver.js
File test/mjsunit/debug-receiver.js (right):

http://codereview.chromium.org/7388011/diff/2002/test/mjsunit/debug-receiver....
test/mjsunit/debug-receiver.js:93: BeginTest("strict: 1"); TestStrict(1);
EndTest();
On 2011/07/18 13:04:50, Vitaly Repeshko wrote:
> Add heap number?

Done.

http://codereview.chromium.org/7388011/diff/2002/test/mjsunit/debug-receiver....
test/mjsunit/debug-receiver.js:116: BeginTest("non-strict: 1");
TestNonStrict(1); EndTest();
On 2011/07/18 13:04:50, Vitaly Repeshko wrote:
> Ditto.

Done.

Powered by Google App Engine
This is Rietveld 408576698