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

Side by Side Diff: sdk/lib/isolate/capability.dart

Issue 2973823002: Revert "Remaining private libs" (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | sdk/lib/math/jenkins_smi_hash.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of "dart:isolate"; 5 part of "isolate.dart";
6 6
7 /** 7 /**
8 * An unforgeable object that comes back as equal when passed through other 8 * An unforgeable object that comes back as equal when passed through other
9 * isolates. 9 * isolates.
10 * 10 *
11 * Sending a capability object to another isolate, and getting it back, 11 * Sending a capability object to another isolate, and getting it back,
12 * will produce an object that is equal to the original. 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. 13 * There is no other way to create objects equal to a capability object.
14 * 14 *
15 * Capabilities can be used as access guards: A remote isolate can send 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 16 * a request for an operation, but it is only allowed if the request contains
17 * the correct capability object. 17 * the correct capability object.
18 * 18 *
19 * This allows exposing the same interface to multiple clients, 19 * This allows exposing the same interface to multiple clients,
20 * but restricting some operations to only those clients 20 * but restricting some operations to only those clients
21 * that have also been given the corresponding capability. 21 * that have also been given the corresponding capability.
22 * 22 *
23 * Capabilities can be used inside a single isolate, 23 * Capabilities can be used inside a single isolate,
24 * but they have no advantage over 24 * but they have no advantage over
25 * just using `new Object` to create a unique object, 25 * just using `new Object` to create a unique object,
26 * and it offers no real security against other code 26 * and it offers no real security against other code
27 * running in the same isolate. 27 * running in the same isolate.
28 */ 28 */
29 class Capability { 29 class Capability {
30 /** 30 /**
31 * Create a new unforgeable capability object. 31 * Create a new unforgeable capability object.
32 */ 32 */
33 external factory Capability(); 33 external factory Capability();
34 } 34 }
OLDNEW
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | sdk/lib/math/jenkins_smi_hash.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698