Reviewers: Lasse Reichstein, Kevin Millikin,
Message:
Kevin: removing the arguments property should not be a problem right?
Description:
Make arguments and caller always be null on native functions (fixes issue
1548
and issue 1643).
With this change we follow Firefox, Safari has a slightly different approach
where the property is just not there (at least according to GetOwnProperty).
Please review this at http://codereview.chromium.org/7792054/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/v8natives.js
Index: src/v8natives.js
===================================================================
--- src/v8natives.js (revision 9034)
+++ src/v8natives.js (working copy)
@@ -55,6 +55,13 @@
var f = functions[i + 1];
%FunctionSetName(f, key);
%FunctionRemovePrototype(f);
+ %IgnoreAttributesAndSetProperty(f, "caller",
+ null,
+ DONT_ENUM | DONT_DELETE);
+ %IgnoreAttributesAndSetProperty(f, "arguments",
+ null,
+ DONT_ENUM | DONT_DELETE);
+
%SetProperty(object, key, f, attributes);
%SetNativeFlag(f);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev