Version 3.19.10
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@14980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/factory.cc b/src/factory.cc
index ab42b19..f963334 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -676,9 +676,9 @@
}
-Handle<Object> Factory::NewTypeError(const char* type,
+Handle<Object> Factory::NewTypeError(const char* message,
Vector< Handle<Object> > args) {
- return NewError("MakeTypeError", type, args);
+ return NewError("MakeTypeError", message, args);
}
@@ -687,9 +687,9 @@
}
-Handle<Object> Factory::NewRangeError(const char* type,
+Handle<Object> Factory::NewRangeError(const char* message,
Vector< Handle<Object> > args) {
- return NewError("MakeRangeError", type, args);
+ return NewError("MakeRangeError", message, args);
}
@@ -698,8 +698,9 @@
}
-Handle<Object> Factory::NewSyntaxError(const char* type, Handle<JSArray> args) {
- return NewError("MakeSyntaxError", type, args);
+Handle<Object> Factory::NewSyntaxError(const char* message,
+ Handle<JSArray> args) {
+ return NewError("MakeSyntaxError", message, args);
}
@@ -708,9 +709,9 @@
}
-Handle<Object> Factory::NewReferenceError(const char* type,
+Handle<Object> Factory::NewReferenceError(const char* message,
Vector< Handle<Object> > args) {
- return NewError("MakeReferenceError", type, args);
+ return NewError("MakeReferenceError", message, args);
}
@@ -720,7 +721,7 @@
Handle<Object> Factory::NewError(const char* maker,
- const char* type,
+ const char* message,
Vector< Handle<Object> > args) {
// Instantiate a closeable HandleScope for EscapeFrom.
v8::HandleScope scope(reinterpret_cast<v8::Isolate*>(isolate()));
@@ -729,24 +730,24 @@
array->set(i, *args[i]);
}
Handle<JSArray> object = NewJSArrayWithElements(array);
- Handle<Object> result = NewError(maker, type, object);
+ Handle<Object> result = NewError(maker, message, object);
return result.EscapeFrom(&scope);
}
-Handle<Object> Factory::NewEvalError(const char* type,
+Handle<Object> Factory::NewEvalError(const char* message,
Vector< Handle<Object> > args) {
- return NewError("MakeEvalError", type, args);
+ return NewError("MakeEvalError", message, args);
}
-Handle<Object> Factory::NewError(const char* type,
+Handle<Object> Factory::NewError(const char* message,
Vector< Handle<Object> > args) {
- return NewError("MakeError", type, args);
+ return NewError("MakeError", message, args);
}
-Handle<String> Factory::EmergencyNewError(const char* type,
+Handle<String> Factory::EmergencyNewError(const char* message,
Handle<JSArray> args) {
const int kBufferSize = 1000;
char buffer[kBufferSize];
@@ -754,8 +755,8 @@
char* p = &buffer[0];
Vector<char> v(buffer, kBufferSize);
- OS::StrNCpy(v, type, space);
- space -= Min(space, strlen(type));
+ OS::StrNCpy(v, message, space);
+ space -= Min(space, strlen(message));
p = &buffer[kBufferSize] - space;
for (unsigned i = 0; i < ARRAY_SIZE(args); i++) {
@@ -784,7 +785,7 @@
Handle<Object> Factory::NewError(const char* maker,
- const char* type,
+ const char* message,
Handle<JSArray> args) {
Handle<String> make_str = InternalizeUtf8String(maker);
Handle<Object> fun_obj(
@@ -793,11 +794,11 @@
// If the builtins haven't been properly configured yet this error
// constructor may not have been defined. Bail out.
if (!fun_obj->IsJSFunction()) {
- return EmergencyNewError(type, args);
+ return EmergencyNewError(message, args);
}
Handle<JSFunction> fun = Handle<JSFunction>::cast(fun_obj);
- Handle<Object> type_obj = InternalizeUtf8String(type);
- Handle<Object> argv[] = { type_obj, args };
+ Handle<Object> message_obj = InternalizeUtf8String(message);
+ Handle<Object> argv[] = { message_obj, args };
// Invoke the JavaScript factory method. If an exception is thrown while
// running the factory method, use the exception as the result.