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

Issue 294943009: Allow microtasks to throw exceptions and handle them gracefully (Closed)

Created:
6 years, 7 months ago by adamk
Modified:
6 years, 6 months ago
CC:
v8-dev, Dmitry Lomov (no reviews), dcarney, rossberg
Visibility:
Public.

Description

Allow microtasks to throw exceptions and handle them gracefully If the embedder calls V8::TerminateExecution while we're running microtasks, bail out and clear any pending microtasks. All other exceptions are simply swallowed. No current Blink or V8 microtasks throw, this just ensures something sane happens if another embedder decides to pass a throwing microtask (or if ours unexpectedly throw due to, e.g., stack exhaustion). BUG=371566 LOG=Y R=mstarzinger@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=21574

Patch Set 1 #

Total comments: 2

Patch Set 2 : Different approach, still need to write thread termination test #

Patch Set 3 : Added termination test #

Patch Set 4 : Use TryCall to swallow exceptions #

Total comments: 5

Patch Set 5 : Use existing Suppression scope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -8 lines) Patch
M include/v8.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 3 chunks +16 lines, -8 lines 0 comments Download
M test/cctest/test-api.cc View 1 1 chunk +37 lines, -0 lines 0 comments Download
M test/cctest/test-thread-termination.cc View 1 2 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
adamk
This still needs a test. There's a Blink test in https://codereview.chromium.org/273913002 for which I've verified ...
6 years, 7 months ago (2014-05-22 07:39:52 UTC) #1
jochen (gone - plz use gerrit)
would the stuff in cctest/test-thread-termination.cc work for you? See the TerminatorThread in there https://codereview.chromium.org/294943009/diff/1/src/isolate.cc File ...
6 years, 7 months ago (2014-05-22 07:45:38 UTC) #2
adamk
I'm restructuring this a bit based on feedback from Dan (to just ignore non-termination exceptions ...
6 years, 7 months ago (2014-05-22 08:02:16 UTC) #3
adamk
The try failures are real. I wasn't seeing them locally, but that's because I hadn't ...
6 years, 7 months ago (2014-05-22 10:48:47 UTC) #4
Yang
On 2014/05/22 10:48:47, adamk wrote: > The try failures are real. I wasn't seeing them ...
6 years, 7 months ago (2014-05-22 10:50:44 UTC) #5
adamk
Thanks for the tip, now using TryCall this should work with mstarzinger's change merged. Also ...
6 years, 7 months ago (2014-05-22 11:23:17 UTC) #6
Michael Starzinger
DBC. https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 src/isolate.cc:2294: goto done; Pretty please with a cherry on ...
6 years, 7 months ago (2014-05-22 11:27:58 UTC) #7
Yang
https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 src/isolate.cc:2294: goto done; On 2014/05/22 11:27:59, Michael Starzinger wrote: > ...
6 years, 7 months ago (2014-05-22 11:33:25 UTC) #8
adamk
https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 src/isolate.cc:2294: goto done; On 2014/05/22 11:27:59, Michael Starzinger wrote: > ...
6 years, 7 months ago (2014-05-22 11:49:25 UTC) #9
adamk
On 2014/05/22 11:33:25, Yang wrote: > https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc > File src/isolate.cc (right): > > https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 > ...
6 years, 7 months ago (2014-05-22 11:58:01 UTC) #10
Yang
On 2014/05/22 11:58:01, adamk wrote: > On 2014/05/22 11:33:25, Yang wrote: > > https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc > ...
6 years, 7 months ago (2014-05-22 11:59:36 UTC) #11
danno-g
https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 src/isolate.cc:2294: goto done; DBC: Please, no goto. Either the explicit ...
6 years, 7 months ago (2014-05-22 13:35:06 UTC) #12
adamk
https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc File src/isolate.cc (right): https://codereview.chromium.org/294943009/diff/50001/src/isolate.cc#newcode2294 src/isolate.cc:2294: goto done; No need to worry, the goto is ...
6 years, 7 months ago (2014-05-22 13:48:50 UTC) #13
adamk
Ping? Don't worry, no gotos anymore!
6 years, 6 months ago (2014-05-28 00:40:15 UTC) #14
Michael Starzinger
LGTM from my end. Not sure who the original intended reviewer for this was though.
6 years, 6 months ago (2014-05-28 11:51:01 UTC) #15
adamk
On 2014/05/28 11:51:01, Michael Starzinger wrote: > LGTM from my end. Not sure who the ...
6 years, 6 months ago (2014-05-28 16:19:58 UTC) #16
adamk
6 years, 6 months ago (2014-05-28 18:40:08 UTC) #17
Message was sent while issue was closed.
Committed patchset #5 manually as r21574 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698