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

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: Revised Created 6 years, 10 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
« no previous file with comments | « src/runtime.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index eb5552e3ecb7423dc29553926c76ad233fc04954..4a5b6ea7bb167d60a2e9c51bbbb184883d4109a4 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -3138,6 +3138,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);
« no previous file with comments | « 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