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

Unified Diff: src/code-stub-assembler.cc

Issue 2825123002: Revert of [errors] Improve NotGeneric error message (Closed)
Patch Set: Created 3 years, 8 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/builtins/builtins-number.cc ('k') | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index c4b26ef697ae52d5fcfac2399b44edb7fc65e685..b83ffbd53d48f4203aa9b38b334c3900de566da4 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -2900,27 +2900,10 @@
BIND(&done_throw);
{
- const char* primitive_name = nullptr;
- switch (primitive_type) {
- case PrimitiveType::kBoolean:
- primitive_name = "Boolean";
- break;
- case PrimitiveType::kNumber:
- primitive_name = "Number";
- break;
- case PrimitiveType::kString:
- primitive_name = "String";
- break;
- case PrimitiveType::kSymbol:
- primitive_name = "Symbol";
- break;
- }
- CHECK_NOT_NULL(primitive_name);
-
// The {value} is not a compatible receiver for this method.
- CallRuntime(Runtime::kThrowTypeError, context,
- SmiConstant(MessageTemplate::kNotGeneric),
- CStringConstant(method_name), CStringConstant(primitive_name));
+ CallRuntime(Runtime::kThrowNotGeneric, context,
+ HeapConstant(factory()->NewStringFromAsciiChecked(method_name,
+ TENURED)));
Unreachable();
}
« no previous file with comments | « src/builtins/builtins-number.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698