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

Issue 881373002: Implemented more of the Isolate API (Closed)

Created:
5 years, 10 months ago by Ivan Posva
Modified:
5 years, 9 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Søren Gjesse
Visibility:
Public.

Description

- Implement some more missing pieces of the Isolate API. Added: * addOnExitListener, removeOnExitListener * setErrorsFatal * addOnErrorListener, removeOnErrorListener R=asiva@google.com Committed: https://code.google.com/p/dart/source/detail?r=44307

Patch Set 1 #

Patch Set 2 : #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -19 lines) Patch
M runtime/lib/isolate_patch.dart View 1 3 chunks +31 lines, -5 lines 3 comments Download
M runtime/vm/isolate.h View 1 3 chunks +13 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 8 chunks +218 lines, -4 lines 8 comments Download
M runtime/vm/object_store.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M runtime/vm/object_store.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download
M tests/isolate/handle_error2_test.dart View 1 1 chunk +0 lines, -1 line 0 comments Download
M tests/isolate/handle_error3_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/isolate/isolate.status View 1 1 chunk +1 line, -8 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Ivan Posva
5 years, 9 months ago (2015-03-06 22:50:36 UTC) #2
siva
lgtm https://codereview.chromium.org/881373002/diff/20001/runtime/lib/isolate_patch.dart File runtime/lib/isolate_patch.dart (right): https://codereview.chromium.org/881373002/diff/20001/runtime/lib/isolate_patch.dart#newcode417 runtime/lib/isolate_patch.dart:417: /* patch */ void addErrorListener(SendPort port) { maybe ...
5 years, 9 months ago (2015-03-06 23:56:04 UTC) #3
Ivan Posva
Committed patchset #2 (id:20001) manually as r44307 (presubmit successful).
5 years, 9 months ago (2015-03-07 01:04:34 UTC) #4
Ivan Posva
5 years, 9 months ago (2015-03-07 04:20:40 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/881373002/diff/20001/runtime/lib/isolate_patc...
File runtime/lib/isolate_patch.dart (right):

https://codereview.chromium.org/881373002/diff/20001/runtime/lib/isolate_patc...
runtime/lib/isolate_patch.dart:417: /* patch */ void addErrorListener(SendPort
port) {
On 2015/03/06 23:56:04, siva wrote:
> maybe call the param responsePort to be consistent with the code for
> addOnExitListener ....

I went by the names in the Dart API documentation. They are responsePort for
addOnExitListener and port for addErrorListener. Note that the names of the
functions are also inconsistent: One has an On, the other doesn't. Leaving as
is.

https://codereview.chromium.org/881373002/diff/20001/runtime/vm/isolate.cc
File runtime/vm/isolate.cc (right):

https://codereview.chromium.org/881373002/diff/20001/runtime/vm/isolate.cc#ne...
runtime/vm/isolate.cc:140: kAsEventAction = 2
On 2015/03/06 23:56:04, siva wrote:
> can these be in two enum blocks seems confusing to have two names with the
same
> values.

Done.

https://codereview.chromium.org/881373002/diff/20001/runtime/vm/isolate.cc#ne...
runtime/vm/isolate.cc:266: Object& obj = Object::Handle(I, message.At(2));
On 2015/03/06 23:56:04, siva wrote:
> const Object& obj = ...;

Done.

https://codereview.chromium.org/881373002/diff/20001/runtime/vm/isolate.cc#ne...
runtime/vm/isolate.cc:267: if (!obj.IsSendPort()) return true;
On 2015/03/06 23:56:04, siva wrote:
> Did we change the C++ style here, we always used to have this be written as
> if (!obj.IsSendPort()) {
>   return true;
> }

There are 2628 places in the project that use the single line if-statement where
we are guaranteed not to continue below, because of a break in control flow.

https://codereview.chromium.org/881373002/diff/20001/runtime/vm/isolate.cc#ne...
runtime/vm/isolate.cc:997: static const intptr_t kMaxListeners = kSmiMax /
(6*kWordSize);
On 2015/03/06 23:56:04, siva wrote:
> spaces 6 * kWOrdSize

Done.

Powered by Google App Engine
This is Rietveld 408576698