Commit 3840bf2c authored by ager@chromium.org's avatar ager@chromium.org

The constructor properties on the prototypes of error objects should

not be enumerable.
Review URL: http://codereview.chromium.org/6270

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 892b0cac
...@@ -639,8 +639,8 @@ function DefineError(f) { ...@@ -639,8 +639,8 @@ function DefineError(f) {
// prototype of 'Error' must be as default: new Object(). // prototype of 'Error' must be as default: new Object().
if (name != 'Error') %FunctionSetPrototype(f, new $Error()); if (name != 'Error') %FunctionSetPrototype(f, new $Error());
%FunctionSetInstanceClassName(f, 'Error'); %FunctionSetInstanceClassName(f, 'Error');
%SetProperty(f.prototype, 'constructor', f, DONT_ENUM);
f.prototype.name = name; f.prototype.name = name;
f.prototype.constructor = f;
%SetCode(f, function(m) { %SetCode(f, function(m) {
if (%IsConstructCall()) { if (%IsConstructCall()) {
if (!IS_UNDEFINED(m)) this.message = ToString(m); if (!IS_UNDEFINED(m)) this.message = ToString(m);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment