Index: src/runtime/runtime-generator.cc |
diff --git a/src/runtime/runtime-generator.cc b/src/runtime/runtime-generator.cc |
index 926cd3ce2d6d107e6b94bb2f3caa44cd1bd6cdc9..54894a013a624d287fe4efe03e04bbc678410527 100644 |
--- a/src/runtime/runtime-generator.cc |
+++ b/src/runtime/runtime-generator.cc |
@@ -22,11 +22,8 @@ RUNTIME_FUNCTION(Runtime_CreateJSGeneratorObject) { |
RUNTIME_ASSERT(function->shared()->is_generator()); |
Handle<JSGeneratorObject> generator; |
- if (frame->IsConstructor()) { |
- generator = handle(JSGeneratorObject::cast(frame->receiver())); |
- } else { |
- generator = isolate->factory()->NewJSGeneratorObject(function); |
- } |
+ DCHECK(!frame->IsConstructor()); |
+ generator = isolate->factory()->NewJSGeneratorObject(function); |
generator->set_function(*function); |
generator->set_context(Context::cast(frame->context())); |
generator->set_receiver(frame->receiver()); |