[ES6] Add @@toStringTag to GeneratorFunction
[WebKit-https.git] / Source / JavaScriptCore / runtime / GeneratorFunctionPrototype.cpp
index 33fe8f2..6a36dab 100644 (file)
@@ -50,7 +50,10 @@ GeneratorFunctionPrototype::GeneratorFunctionPrototype(VM& vm, Structure* struct
 void GeneratorFunctionPrototype::finishCreation(VM& vm)
 {
     Base::finishCreation(vm);
+    ASSERT(inherits(info()));
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
+    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "GeneratorFunction"), DontEnum | ReadOnly);
+    vm.prototypeMap.addPrototype(this);
 }
 
 } // namespace JSC