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

Unified Diff: src/ic/ic.cc

Issue 1130073005: Revert of Migrate error messages, part 10. (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/isolate.cc » ('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 628da7d2055aaa5570509f41366ba4ace0c96662..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"
@@ -361,10 +362,11 @@
}
-MaybeHandle<Object> IC::TypeError(MessageTemplate::Template index,
- Handle<Object> object, Handle<Object> key) {
+MaybeHandle<Object> IC::TypeError(const char* type, Handle<Object> object,
+ Handle<Object> key) {
HandleScope scope(isolate());
- THROW_NEW_ERROR(isolate(), NewTypeError(index, key, object), Object);
+ Handle<Object> args[2] = {key, object};
+ THROW_NEW_ERROR(isolate(), NewTypeError(type, HandleVector(args, 2)), Object);
}
@@ -694,7 +696,7 @@
// If the object is undefined or null it's illegal to try to get any
// of its properties; throw a TypeError in that case.
if (object->IsUndefined() || object->IsNull()) {
- return TypeError(MessageTemplate::kNonObjectPropertyLoad, object, name);
+ return TypeError("non_object_property_load", object, name);
}
// Check if the name is trivially convertible to an index and get
@@ -1556,7 +1558,7 @@
Handle<Context> script_context = ScriptContextTable::GetContext(
script_contexts, lookup_result.context_index);
if (lookup_result.mode == CONST) {
- return TypeError(MessageTemplate::kConstAssign, object, name);
+ return TypeError("const_assign", object, name);
}
Handle<Object> previous_value =
@@ -1592,7 +1594,7 @@
// If the object is undefined or null it's illegal to try to set any
// properties on it; throw a TypeError in that case.
if (object->IsUndefined() || object->IsNull()) {
- return TypeError(MessageTemplate::kNonObjectPropertyStore, object, name);
+ return TypeError("non_object_property_store", object, name);
}
// Check if the given name is an array index.
« no previous file with comments | « src/ic/ic.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698