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

Unified Diff: src/js/generator.js

Issue 1634553002: Fix bug where generators got closed prematurely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 4 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
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/generator.js
diff --git a/src/js/generator.js b/src/js/generator.js
index 7f43656ebcf5c1fb4cfb5eca311e8381082f5c33..63ec99ee4bf4f04874ad58a277b8984972a4b0cd 100644
--- a/src/js/generator.js
+++ b/src/js/generator.js
@@ -36,12 +36,7 @@ function GeneratorObjectNext(value) {
if (continuation > 0) {
// Generator is suspended.
DEBUG_PREPARE_STEP_IN_IF_STEPPING(this);
- try {
- return %_GeneratorNext(this, value);
- } catch (e) {
- %GeneratorClose(this);
- throw e;
- }
+ return %_GeneratorNext(this, value);
} else if (continuation == 0) {
// Generator is already closed.
return { value: void 0, done: true };
@@ -61,12 +56,7 @@ function GeneratorObjectThrow(exn) {
var continuation = %GeneratorGetContinuation(this);
if (continuation > 0) {
// Generator is suspended.
- try {
- return %_GeneratorThrow(this, exn);
- } catch (e) {
- %GeneratorClose(this);
- throw e;
- }
+ return %_GeneratorThrow(this, exn);
} else if (continuation == 0) {
// Generator is already closed.
throw exn;
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698