DescriptionFunction.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 #
Messages
Total messages: 2 (0 generated)
|