Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 41b6c148c743c64bac72c1914585f08397e3063c..b8de1db096cc09fe0839156a9dfd1be0b8f96521 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -9926,6 +9926,11 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) { |
expr->IsMonomorphic() && |
IsAllocationInlineable(expr->target())) { |
Handle<JSFunction> constructor = expr->target(); |
+ DCHECK( |
+ constructor->shared()->construct_stub() == |
+ isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric) || |
+ constructor->shared()->construct_stub() == |
+ isolate()->builtins()->builtin(Builtins::kJSConstructStubApi)); |
HValue* check = Add<HCheckValue>(function, constructor); |
// Force completion of inobject slack tracking before generating |