Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: src/factory.cc

Issue 1140053002: Migrate error messages, part 11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index fca1e1c1ca8abc821566f8e697fd591c7705e098..60b7d3b3ccb759487f411ade1ce7f20916fc2b55 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1076,52 +1076,6 @@ Handle<HeapNumber> Factory::NewHeapNumber(double value,
}
-Handle<Object> Factory::NewTypeError(Handle<String> message) {
- return NewError("$TypeError", message);
-}
-
-
-Handle<Object> Factory::NewRangeError(Handle<String> message) {
- return NewError("$RangeError", message);
-}
-
-
-Handle<Object> Factory::NewSyntaxError(const char* message,
- Handle<JSArray> args) {
- return NewError("MakeSyntaxError", message, args);
-}
-
-
-Handle<Object> Factory::NewSyntaxError(Handle<String> message) {
- return NewError("$SyntaxError", message);
-}
-
-
-Handle<Object> Factory::NewReferenceError(const char* message,
- Handle<JSArray> args) {
- return NewError("MakeReferenceError", message, args);
-}
-
-
-Handle<Object> Factory::NewReferenceError(Handle<String> message) {
- return NewError("$ReferenceError", message);
-}
-
-
-Handle<Object> Factory::NewError(const char* maker, const char* message,
- Vector<Handle<Object> > args) {
- // Instantiate a closeable HandleScope for EscapeFrom.
- v8::EscapableHandleScope scope(reinterpret_cast<v8::Isolate*>(isolate()));
- Handle<FixedArray> array = NewFixedArray(args.length());
- for (int i = 0; i < args.length(); i++) {
- array->set(i, *args[i]);
- }
- Handle<JSArray> object = NewJSArrayWithElements(array);
- Handle<Object> result = NewError(maker, message, object);
- return result.EscapeFrom(&scope);
-}
-
-
Handle<Object> Factory::NewError(const char* maker,
MessageTemplate::Template template_index,
Handle<Object> arg0, Handle<Object> arg1,
@@ -1169,6 +1123,13 @@ Handle<Object> Factory::NewTypeError(MessageTemplate::Template template_index,
}
+Handle<Object> Factory::NewSyntaxError(MessageTemplate::Template template_index,
+ Handle<Object> arg0, Handle<Object> arg1,
+ Handle<Object> arg2) {
+ return NewError("MakeSyntaxError", template_index, arg0, arg1, arg2);
+}
+
+
Handle<Object> Factory::NewReferenceError(
MessageTemplate::Template template_index, Handle<Object> arg0,
Handle<Object> arg1, Handle<Object> arg2) {
@@ -1257,11 +1218,6 @@ Handle<Object> Factory::NewError(const char* maker, const char* message,
}
-Handle<Object> Factory::NewError(Handle<String> message) {
- return NewError("$Error", message);
-}
-
-
Handle<Object> Factory::NewError(const char* constructor,
Handle<String> message) {
Handle<String> constr = InternalizeUtf8String(constructor);
« no previous file with comments | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698