|
4 | 4 |
|
5 | 5 | part of dart.isolate;
|
6 | 6 |
|
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. |
29 | 26 | class Capability {
|
30 |
| - /** |
31 |
| - * Create a new unforgeable capability object. |
32 |
| - */ |
| 27 | + /// Create a new unforgeable capability object. |
33 | 28 | external factory Capability();
|
34 | 29 | }
|
0 commit comments