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(); |
} |