Files
sdk/pkg/dev_compiler/test/generated_sdk/lib/isolate/capability.dart
T
John Messerly a3bbe2a291 cleans up sdk patching so we no longer have unresolved names
js_codegen.dart and patch_sdk.dart are the only human-changed files.

This also pulls in dart:isolate, which is depended on from one of the implementation libraries

This also moves dart:_* files back to `lib/_internal/compiler/js_lib/` because there's where libraries.dart points to, and hence Analyzer looks for them there. Alternatively, we could put them somewhere like `tool/input_sdk_internal` and then copy that file into the right path.

R=vsm@google.com

Review URL: https://codereview.chromium.org/955513008
2015-02-26 17:58:13 -08:00

35 lines
1.2 KiB
Dart

// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of dart.isolate;
/**
* An unforgeable object that comes back as equal when passed through other
* isolates.
*
* Sending a capability object to another isolate, and getting it back,
* will produce an object that is equal to the original.
* There is no other way to create objects equal to a capability object.
*
* Capabilities can be used as access guards: A remote isolate can send
* a request for an operation, but it is only allowed if the request contains
* the correct capability object.
*
* This allows exposing the same interface to multiple clients,
* but restricting some operations to only those clients
* that have also been given the corresponding capability.
*
* Capabilities can be used inside a single isolate,
* but they have no advantage over
* just using `new Object` to create a unique object,
* and it offers no real security against other code
* running in the same isolate.
*/
class Capability {
/**
* Create a new unforgeable capability object.
*/
factory Capability() = CapabilityImpl;
}