Author: [EMAIL PROTECTED]
Date: Mon Oct 6 05:53:02 2008
New Revision: 443
Modified:
branches/bleeding_edge/src/messages.js
Log:
The constructor properties on the prototypes of error objects should
not be enumerable.
Review URL: http://codereview.chromium.org/6270
Modified: branches/bleeding_edge/src/messages.js
==============================================================================
--- branches/bleeding_edge/src/messages.js (original)
+++ branches/bleeding_edge/src/messages.js Mon Oct 6 05:53:02 2008
@@ -639,8 +639,8 @@
// prototype of 'Error' must be as default: new Object().
if (name != 'Error') %FunctionSetPrototype(f, new $Error());
%FunctionSetInstanceClassName(f, 'Error');
+ %SetProperty(f.prototype, 'constructor', f, DONT_ENUM);
f.prototype.name = name;
- f.prototype.constructor = f;
%SetCode(f, function(m) {
if (%IsConstructCall()) {
if (!IS_UNDEFINED(m)) this.message = ToString(m);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---