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

Unified Diff: src/api.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 | « no previous file | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index e247eb2c41c387509bb0777df3d5ace0c7f302ef..8269f27ed93c331f2e314e9abeb6c5ee8e2e03a0 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7221,19 +7221,19 @@ String::Value::~Value() {
}
-#define DEFINE_ERROR(NAME) \
- Local<Value> Exception::NAME(v8::Handle<v8::String> raw_message) { \
- i::Isolate* isolate = i::Isolate::Current(); \
- LOG_API(isolate, #NAME); \
- ENTER_V8(isolate); \
- i::Object* error; \
- { \
- i::HandleScope scope(isolate); \
- i::Handle<i::String> message = Utils::OpenHandle(*raw_message); \
- error = *isolate->factory()->New##NAME(message); \
- } \
- i::Handle<i::Object> result(error, isolate); \
- return Utils::ToLocal(result); \
+#define DEFINE_ERROR(NAME) \
+ Local<Value> Exception::NAME(v8::Handle<v8::String> raw_message) { \
+ i::Isolate* isolate = i::Isolate::Current(); \
+ LOG_API(isolate, #NAME); \
+ ENTER_V8(isolate); \
+ i::Object* error; \
+ { \
+ i::HandleScope scope(isolate); \
+ i::Handle<i::String> message = Utils::OpenHandle(*raw_message); \
+ error = *isolate->factory()->NewError("$" #NAME, message); \
+ } \
+ i::Handle<i::Object> result(error, isolate); \
+ return Utils::ToLocal(result); \
}
DEFINE_ERROR(RangeError)
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698