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

Unified Diff: src/factory.cc

Issue 1322883002: Make isolate.h usable without objects-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-includes-frames-2
Patch Set: Rebased. Created 5 years, 4 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/flags.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 4f45be0f36253d87681c5f2274e0902bccce0929..e934f18054c73a33cd8eee79fb828683226f47b8 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -8,6 +8,7 @@
#include "src/base/bits.h"
#include "src/bootstrapper.h"
#include "src/conversions.h"
+#include "src/isolate-inl.h"
#include "src/macro-assembler.h"
namespace v8 {
@@ -1136,6 +1137,22 @@ Handle<Object> Factory::NewError(Handle<JSFunction> constructor,
}
+#define DEFINE_ERROR(NAME, name) \
+ Handle<Object> Factory::New##NAME(MessageTemplate::Template template_index, \
+ Handle<Object> arg0, Handle<Object> arg1, \
+ Handle<Object> arg2) { \
+ return NewError(isolate()->name##_function(), template_index, arg0, arg1, \
+ arg2); \
+ }
+DEFINE_ERROR(Error, error)
+DEFINE_ERROR(EvalError, eval_error)
+DEFINE_ERROR(RangeError, range_error)
+DEFINE_ERROR(ReferenceError, reference_error)
+DEFINE_ERROR(SyntaxError, syntax_error)
+DEFINE_ERROR(TypeError, type_error)
+#undef DEFINE_ERROR
+
+
void Factory::InitializeFunction(Handle<JSFunction> function,
Handle<SharedFunctionInfo> info,
Handle<Context> context) {
« no previous file with comments | « src/factory.h ('k') | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698