Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: src/runtime.cc

Issue 139653003: Throw a TypeError when calling "next" method of a newly created generator with a value (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index a1f04a270ecddb31bc5da7e8010f9de81a3b1459..b34652612db8c47710ef608d2bd65b1db4cca789 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3161,6 +3161,16 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowGeneratorStateError) {
}
+RUNTIME_FUNCTION(MaybeObject*, Runtime_ThrowGeneratorStartError) {
+ HandleScope scope(isolate);
+ ASSERT(args.length() == 0);
+ Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0);
+ Handle<Object> error =
+ isolate->factory()->NewTypeError("generator_start", argv);
+ return isolate->Throw(*error);
+}
+
+
RUNTIME_FUNCTION(MaybeObject*, Runtime_ObjectFreeze) {
HandleScope scope(isolate);
ASSERT(args.length() == 1);
« src/ia32/full-codegen-ia32.cc ('K') | « src/runtime.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698