Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 4d40f417f977598e99a11878e141a915b49dcdbe..ce3182fe7436df6694bd14cc2e07a83df4929515 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12876,7 +12876,8 @@ void JSFunction::SetInstancePrototype(Handle<JSFunction> function, |
void JSFunction::SetPrototype(Handle<JSFunction> function, |
Handle<Object> value) { |
- DCHECK(function->IsConstructor()); |
+ DCHECK(function->IsConstructor() || |
+ IsGeneratorFunction(function->shared()->kind())); |
Handle<Object> construct_prototype = value; |
// If the value is not a JSReceiver, store the value in the map's |