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

Issue 6713059: Function.caller when caller is a strict function. (Closed)

Created:
9 years, 9 months ago by Martin Maly
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Function.caller when caller is a strict function. This may be a tricky one. I did some experimenting with Firefox and jsc and it appears that jsc doesn't implement this kind of poison pill at all and mozilla's behavior is, as far as I can tell, the same as what this patch implements. Because the function.caller property is read only there is no danger that someone would arbitrarily set it to value which is a strict function and then expect exception on access. As for the arguments.caller, it appears to be implemented neither in Firefox nor jsc so I feel that the right approach is to do the same, especially because V8 doesn't give any special meaning to arguments.caller in non-strict code anyway. The implementation of the letter of the standard is possible although it is a tough call whether to adhere to the standard or be compatible with other major browsers. BUG= TEST=test/mjsunit/strict-mode.js

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -2 lines) Patch
M src/accessors.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M src/messages.js View 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/strict-mode.js View 1 chunk +51 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Martin Maly
Next bit of poison pills, hopefully the last one.
9 years, 9 months ago (2011-03-19 03:01:29 UTC) #1
Mads Ager (chromium)
9 years, 9 months ago (2011-03-21 10:09:39 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698