Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index 4f786b590fbca91513b4944117c2b467a2deba37..33fbaa5d80b8bb821fc39112bd747446d39f2ce1 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -285,8 +285,8 @@ function MakeGenericError(constructor, type, args) { |
* Set up the Script function and constructor. |
*/ |
%FunctionSetInstanceClassName(Script, 'Script'); |
-%AddProperty(Script.prototype, 'constructor', Script, |
- DONT_ENUM | DONT_DELETE | READ_ONLY); |
+%AddNamedProperty(Script.prototype, 'constructor', Script, |
+ DONT_ENUM | DONT_DELETE | READ_ONLY); |
%SetCode(Script, function(x) { |
// Script objects can only be created by the VM. |
throw new $Error("Not supported"); |
@@ -1159,9 +1159,9 @@ function SetUpError() { |
// effects when overwriting the error functions from |
// user code. |
var name = f.name; |
- %AddProperty(global, name, f, DONT_ENUM); |
- %AddProperty(builtins, '$' + name, f, |
- DONT_ENUM | DONT_DELETE | READ_ONLY); |
+ %AddNamedProperty(global, name, f, DONT_ENUM); |
+ %AddNamedProperty(builtins, '$' + name, f, |
+ DONT_ENUM | DONT_DELETE | READ_ONLY); |
// Configure the error function. |
if (name == 'Error') { |
// The prototype of the Error object must itself be an error. |
@@ -1176,16 +1176,16 @@ function SetUpError() { |
%FunctionSetPrototype(f, new $Error()); |
} |
%FunctionSetInstanceClassName(f, 'Error'); |
- %AddProperty(f.prototype, 'constructor', f, DONT_ENUM); |
- %AddProperty(f.prototype, "name", name, DONT_ENUM); |
+ %AddNamedProperty(f.prototype, 'constructor', f, DONT_ENUM); |
+ %AddNamedProperty(f.prototype, "name", name, DONT_ENUM); |
%SetCode(f, function(m) { |
if (%_IsConstructCall()) { |
// Define all the expected properties directly on the error |
// object. This avoids going through getters and setters defined |
// on prototype objects. |
- %AddProperty(this, 'stack', UNDEFINED, DONT_ENUM); |
+ %AddNamedProperty(this, 'stack', UNDEFINED, DONT_ENUM); |
if (!IS_UNDEFINED(m)) { |
- %AddProperty(this, 'message', ToString(m), DONT_ENUM); |
+ %AddNamedProperty(this, 'message', ToString(m), DONT_ENUM); |
} |
try { captureStackTrace(this, f); } catch (e) { } |
} else { |
@@ -1208,7 +1208,7 @@ SetUpError(); |
$Error.captureStackTrace = captureStackTrace; |
-%AddProperty($Error.prototype, 'message', '', DONT_ENUM); |
+%AddNamedProperty($Error.prototype, 'message', '', DONT_ENUM); |
// Global list of error objects visited during ErrorToString. This is |
// used to detect cycles in error toString formatting. |