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

Issue 11558034: Second version of support for specifying an unhandled exception callback (Closed)

Created:
8 years ago by Tom Ball
Modified:
7 years, 11 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Second version of support for specifying an unhandled exception callback in Dart. Isolate.spawnFunction optionally takes a callback parameter, which is not resolved until an unhandled exception occurs. If a callback wasn't specified, the VM will then call an "_unhandledExceptionCallback" function if it is defined in the isolate's source file. If no callback is provided, the error is logged as the isolate is closed. Committed: https://code.google.com/p/dart/source/detail?r=16186

Patch Set 1 #

Total comments: 10

Patch Set 2 : #

Total comments: 8

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 8

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+363 lines, -24 lines) Patch
M runtime/lib/isolate.cc View 1 2 3 4 5 8 chunks +49 lines, -7 lines 0 comments Download
M runtime/lib/isolate_patch.dart View 1 1 chunk +3 lines, -1 line 0 comments Download
A runtime/tests/vm/dart/isolate_unhandled_exception_test.dart View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
A runtime/tests/vm/dart/isolate_unhandled_exception_test2.dart View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
A runtime/tests/vm/dart/isolate_unhandled_exception_uri_helper.dart View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
A runtime/tests/vm/dart/isolate_unhandled_exception_uri_test.dart View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/exceptions.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/exceptions.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 4 chunks +95 lines, -11 lines 0 comments Download
M runtime/vm/object_store.h View 1 2 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart View 1 1 chunk +2 lines, -1 line 0 comments Download
M sdk/lib/isolate/base.dart View 1 2 chunks +28 lines, -2 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Tom Ball
This is an update to issue 11473026, which I can't update due to a merge ...
8 years ago (2012-12-12 22:41:11 UTC) #1
siva
https://chromiumcodereview.appspot.com/11558034/diff/1/runtime/lib/isolate.cc File runtime/lib/isolate.cc (right): https://chromiumcodereview.appspot.com/11558034/diff/1/runtime/lib/isolate.cc#newcode205 runtime/lib/isolate.cc:205: explicit SpawnState(const Function& func, const Function& callback_func) explicit not ...
8 years ago (2012-12-13 18:30:38 UTC) #2
Tom Ball
https://codereview.chromium.org/11558034/diff/8001/runtime/lib/isolate.cc File runtime/lib/isolate.cc (right): https://codereview.chromium.org/11558034/diff/8001/runtime/lib/isolate.cc#newcode445 runtime/lib/isolate.cc:445: callback_func = Function::null(); On 2012/12/13 18:30:38, siva wrote: > ...
8 years ago (2012-12-13 19:33:22 UTC) #3
siva
LGTM with some minor nits. https://chromiumcodereview.appspot.com/11558034/diff/22004/runtime/lib/isolate.cc File runtime/lib/isolate.cc (right): https://chromiumcodereview.appspot.com/11558034/diff/22004/runtime/lib/isolate.cc#newcode460 runtime/lib/isolate.cc:460: ASSERT(callback_func.IsFunction() || callback_func.IsNull()); I ...
8 years ago (2012-12-14 06:28:35 UTC) #4
Tom Ball
https://codereview.chromium.org/11558034/diff/22004/runtime/lib/isolate.cc File runtime/lib/isolate.cc (right): https://codereview.chromium.org/11558034/diff/22004/runtime/lib/isolate.cc#newcode460 runtime/lib/isolate.cc:460: ASSERT(callback_func.IsFunction() || callback_func.IsNull()); On 2012/12/14 06:28:36, siva wrote: > ...
8 years ago (2012-12-14 21:22:44 UTC) #5
Mads Ager (google)
7 years, 11 months ago (2013-01-22 13:52:22 UTC) #6
Message was sent while issue was closed.
Sorry for the extremely slow drive-by:

What is the plan for making it possible to have a top-level exception handler
for the main isolate as well? Maybe the isolate library could have a top-level
function instead that can be set from user-code. That way the main isolate and
isolates spawned later will behave the same.

Powered by Google App Engine
This is Rietveld 408576698