Skip to content

Commit f93cf84

Browse files
lrhncommit-bot@chromium.org
authored andcommitted
Update documentation of dart:isolate.
Change-Id: If026cebc668603f80168dfe943646c0c0dc451e9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178983 Commit-Queue: Lasse R.H. Nielsen <[email protected]> Reviewed-by: Nate Bosch <[email protected]>
1 parent e7b15e9 commit f93cf84

File tree

2 files changed

+597
-654
lines changed

2 files changed

+597
-654
lines changed

sdk/lib/isolate/capability.dart

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,26 @@
44

55
part of dart.isolate;
66

7-
/**
8-
* An unforgeable object that comes back as equal when passed through other
9-
* isolates.
10-
*
11-
* Sending a capability object to another isolate, and getting it back,
12-
* will produce an object that is equal to the original.
13-
* There is no other way to create objects equal to a capability object.
14-
*
15-
* Capabilities can be used as access guards: A remote isolate can send
16-
* a request for an operation, but it is only allowed if the request contains
17-
* the correct capability object.
18-
*
19-
* This allows exposing the same interface to multiple clients,
20-
* but restricting some operations to only those clients
21-
* that have also been given the corresponding capability.
22-
*
23-
* Capabilities can be used inside a single isolate,
24-
* but they have no advantage over
25-
* just using `new Object` to create a unique object,
26-
* and it offers no real security against other code
27-
* running in the same isolate.
28-
*/
7+
/// An unforgeable object that comes back as equal when passed through other
8+
/// isolates.
9+
///
10+
/// Sending a capability object to another isolate, and getting it back,
11+
/// will produce an object that is equal to the original.
12+
/// There is no other way to create objects equal to a capability object.
13+
///
14+
/// Capabilities can be used as access guards.
15+
/// An isolate can receive requests for operations from other isolates,
16+
/// but only allow them if the request contains the correct capability object.
17+
/// This allows exposing the same interface to multiple clients,
18+
/// but restricting some operations to only those clients
19+
/// that have also been given the corresponding capability.
20+
///
21+
/// Capabilities can be used inside a single isolate,
22+
/// but they have no advantage over
23+
/// just using `Object()` to create a unique object,
24+
/// and it offers no real security against other code
25+
/// running in the same isolate.
2926
class Capability {
30-
/**
31-
* Create a new unforgeable capability object.
32-
*/
27+
/// Create a new unforgeable capability object.
3328
external factory Capability();
3429
}

0 commit comments

Comments
 (0)