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

Unified Diff: src/ic/ic.cc

Issue 1130783002: Migrate error messages, part 9. (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/ic/ic.h ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 69fe5f8b2ee527735f27ee5a7be96118cbf266c9..daf7704c71d5ffa5d197ce4fb06bbb95255e8b4d 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -16,6 +16,7 @@
#include "src/ic/ic-inl.h"
#include "src/ic/ic-compiler.h"
#include "src/ic/stub-cache.h"
+#include "src/messages.h"
#include "src/prototype.h"
#include "src/runtime/runtime.h"
@@ -369,10 +370,10 @@ MaybeHandle<Object> IC::TypeError(const char* type, Handle<Object> object,
}
-MaybeHandle<Object> IC::ReferenceError(const char* type, Handle<Name> name) {
+MaybeHandle<Object> IC::ReferenceError(Handle<Name> name) {
HandleScope scope(isolate());
- THROW_NEW_ERROR(isolate(), NewReferenceError(type, HandleVector(&name, 1)),
- Object);
+ THROW_NEW_ERROR(
+ isolate(), NewReferenceError(MessageTemplate::kNotDefined, name), Object);
}
@@ -737,7 +738,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
if (*result == *isolate()->factory()->the_hole_value()) {
// Do not install stubs and stay pre-monomorphic for
// uninitialized accesses.
- return ReferenceError("not_defined", name);
+ return ReferenceError(name);
}
if (use_ic && LoadScriptContextFieldStub::Accepted(&lookup_result)) {
@@ -767,7 +768,7 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) {
return result;
}
}
- return ReferenceError("not_defined", name);
+ return ReferenceError(name);
}
@@ -1566,7 +1567,7 @@ MaybeHandle<Object> StoreIC::Store(Handle<Object> object, Handle<Name> name,
if (*previous_value == *isolate()->factory()->the_hole_value()) {
// Do not install stubs and stay pre-monomorphic for
// uninitialized accesses.
- return ReferenceError("not_defined", name);
+ return ReferenceError(name);
}
if (FLAG_use_ic &&
@@ -2937,7 +2938,7 @@ static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
// Throw a reference error.
Handle<Name> name_handle(name);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewReferenceError("not_defined", HandleVector(&name_handle, 1)));
+ isolate, NewReferenceError(MessageTemplate::kNotDefined, name_handle));
}
« no previous file with comments | « src/ic/ic.h ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698