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

Issue 1842953003: Preserve exception message in iterator finalization. (Closed)

Created:
4 years, 8 months ago by neis
Modified:
4 years, 8 months ago
CC:
oth, rmcilroy, v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Preserve exception message in iterator finalization. The parser uses a try-catch in order to record when the client of an iterator throws. The exception then used to get rethrown via 'throw', which unfortunately resulted in the original exception message object getting overwritten. This CL solves this as follows: - add a clear_pending_message flag to TryCatchStatement (set to true in normal cases), - set clear_pending_message to false for the TryCatchStatement used in iterator finalization - change full-codegen, turbofan, and the interpreter to emit the ClearPendingMessage call only when the flag is set, - replace 'throw' with '%ReThrow' in the iterator finalization code, thus reusing the (not-cleared) pending message R=littledan@chromium.org, mstarzinger@chromium.org, yangguo@chromium.org BUG=v8:4875 LOG=n Committed: https://crrev.com/f70b3d3b2c482e8a9918202e358c929852861e07 Cr-Commit-Position: refs/heads/master@{#35226}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Test and cosmetics #

Patch Set 3 : Turbofan #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -54 lines) Patch
M src/ast/ast.h View 1 2 chunks +28 lines, -4 lines 1 comment Download
M src/compiler/ast-graph-builder.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M src/parsing/parser.cc View 1 4 chunks +12 lines, -7 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForOf.golden View 20 chunks +30 lines, -30 lines 0 comments Download
A + test/message/for-of-throw-in-body.js View 1 1 chunk +1 line, -3 lines 0 comments Download
A + test/message/for-of-throw-in-body.out View 1 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 26 (11 generated)
neis
4 years, 8 months ago (2016-03-30 11:15:26 UTC) #1
Yang
Please add a test case in test/messages/ based on the one in the issue description ...
4 years, 8 months ago (2016-03-30 12:12:49 UTC) #2
neis
On 2016/03/30 12:12:49, Yang wrote: > Please add a test case in test/messages/ based on ...
4 years, 8 months ago (2016-03-30 13:05:50 UTC) #5
Yang
On 2016/03/30 13:05:50, neis wrote: > On 2016/03/30 12:12:49, Yang wrote: > > Please add ...
4 years, 8 months ago (2016-03-31 07:24:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1842953003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1842953003/60001
4 years, 8 months ago (2016-03-31 07:28:32 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/13030)
4 years, 8 months ago (2016-03-31 07:35:03 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1842953003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1842953003/80001
4 years, 8 months ago (2016-03-31 08:39:59 UTC) #13
neis
@littledan, please take a look at the parser changes.
4 years, 8 months ago (2016-03-31 08:47:12 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-03-31 09:05:27 UTC) #16
Michael Starzinger
LGTM with one nit. https://codereview.chromium.org/1842953003/diff/80001/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/1842953003/diff/80001/src/ast/ast.h#newcode1185 src/ast/ast.h:1185: bool clear_pending_message() { return clear_pending_message_; ...
4 years, 8 months ago (2016-04-01 13:07:41 UTC) #17
Dan Ehrenberg
lgtm Parser change LGTM. Dumb question--could we somehow make this work for user code too, ...
4 years, 8 months ago (2016-04-01 14:42:58 UTC) #18
Yang
On 2016/04/01 14:42:58, Dan Ehrenberg wrote: > lgtm > > Parser change LGTM. > > ...
4 years, 8 months ago (2016-04-01 14:47:30 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1842953003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1842953003/80001
4 years, 8 months ago (2016-04-04 07:49:05 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years, 8 months ago (2016-04-04 08:15:07 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-04 08:15:35 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f70b3d3b2c482e8a9918202e358c929852861e07
Cr-Commit-Position: refs/heads/master@{#35226}

Powered by Google App Engine
This is Rietveld 408576698