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

Issue 93873014: Update isolate documentation.

Created:
7 years ago by floitsch
Modified:
7 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Update isolate documentation.

Patch Set 1 #

Patch Set 2 : Add isolateMessageException #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -6 lines) Patch
M runtime/vm/exceptions.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/exceptions.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/symbols.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/lib/isolate_helper.dart View 1 3 chunks +9 lines, -4 lines 4 comments Download
M sdk/lib/isolate/isolate.dart View 1 3 chunks +16 lines, -0 lines 4 comments Download

Messages

Total messages: 4 (0 generated)
floitsch
We don't implement this yet, so I will wait before committing, but I want to ...
7 years ago (2013-12-10 10:42:22 UTC) #1
Lasse Reichstein Nielsen
I still don't see why errors, especially ArgumentError, should not be thrown directly. Every function ...
7 years ago (2013-12-10 11:42:26 UTC) #2
Lasse Reichstein Nielsen
https://codereview.chromium.org/93873014/diff/20001/sdk/lib/_internal/lib/isolate_helper.dart File sdk/lib/_internal/lib/isolate_helper.dart (right): https://codereview.chromium.org/93873014/diff/20001/sdk/lib/_internal/lib/isolate_helper.dart#newcode1087 sdk/lib/_internal/lib/isolate_helper.dart:1087: throw new IsolateMessageException("Illegal value $x passed"); Could we put ...
7 years ago (2013-12-11 10:38:28 UTC) #3
floitsch
7 years ago (2013-12-11 12:14:16 UTC) #4
As discussed. I'm handing over to you (Lasse).

https://codereview.chromium.org/93873014/diff/20001/sdk/lib/_internal/lib/iso...
File sdk/lib/_internal/lib/isolate_helper.dart (right):

https://codereview.chromium.org/93873014/diff/20001/sdk/lib/_internal/lib/iso...
sdk/lib/_internal/lib/isolate_helper.dart:1087: throw new
IsolateMessageException("Illegal value $x passed");
On 2013/12/11 10:38:28, Lasse Reichstein Nielsen wrote:
> Could we put the value of x into the object?
> If the receiver of the exception is also the one passing the value, it won't
> leak anything, and it can be useful to inspect the object that causes the
> problem.
> This is an Exception, so you need data that can allow you to act on the
> exception. The value of x, and perhaps the entire message as well, seems
> reasonable.

Yes. I would like that.
The problem is that it would require more changes to the VM, so I only marked it
as TODO.

https://codereview.chromium.org/93873014/diff/20001/sdk/lib/_internal/lib/iso...
sdk/lib/_internal/lib/isolate_helper.dart:1242: throw new
IsolateDeserializationError("Unexpected serialized object");
On 2013/12/11 10:38:28, Lasse Reichstein Nielsen wrote:
> How does this error occur?
> 
> It happens during deserialization, but anything passed through serialization
> should be deserializable as well, so is this really a sanity check?

It's a sanity check, and could happen once we have cross-computer isolates. In
that case other users could fake isolate-messages.

https://codereview.chromium.org/93873014/diff/20001/sdk/lib/isolate/isolate.dart
File sdk/lib/isolate/isolate.dart (right):

https://codereview.chromium.org/93873014/diff/20001/sdk/lib/isolate/isolate.d...
sdk/lib/isolate/isolate.dart:66: * All errors are reported asynchronously
through the returned future.
On 2013/12/11 10:38:28, Lasse Reichstein Nielsen wrote:
> Not necessarily all errors.
> Let's specify which arguments and conditions can cause an exception, and that
> these exceptions are returned through the future.

Yes.
This should be changed to list all the possible exceptions and to make sure that
they are dealt with correctly.

Powered by Google App Engine
This is Rietveld 408576698