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

Unified Diff: pkg/dev_compiler/lib/js/amd/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 2731333002: Update for latest tests and sdk (Closed)
Patch Set: Created 3 years, 9 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:
Download patch
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/js/common/dart_sdk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/amd/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
index 89fc6603a5acadaada50c6b52d9751eff0d6bb1e..8bdefcd93f2db0a3ef5ffb0a6f38d72aa1dc72de 100644
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
@@ -111,6 +111,7 @@ define([], function() {
let ListOf_IsolateEvent = () => (ListOf_IsolateEvent = dart.constFn(core.List$(_isolate_helper._IsolateEvent)))();
let QueueOf_IsolateEvent = () => (QueueOf_IsolateEvent = dart.constFn(collection.Queue$(_isolate_helper._IsolateEvent)))();
let CompleterOfList = () => (CompleterOfList = dart.constFn(async.Completer$(core.List)))();
+ let FutureOrOfList = () => (FutureOrOfList = dart.constFn(async.FutureOr$(core.List)))();
let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.functionType(dart.void, [dart.dynamic])))();
let StringTovoid = () => (StringTovoid = dart.constFn(dart.functionType(dart.void, [core.String])))();
let ExpandoOfint = () => (ExpandoOfint = dart.constFn(core.Expando$(core.int)))();
@@ -9839,7 +9840,7 @@ define([], function() {
let completer = CompleterOfList().new();
port.first.then(dart.dynamic)(dart.fn(msg => {
if (dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWNED_SIGNAL)) {
- completer.complete(msg);
+ completer.complete(FutureOrOfList()._check(msg));
} else {
dart.assert(dart.equals(dart.dindex(msg, 0), _isolate_helper._SPAWN_FAILED_SIGNAL));
completer.completeError(dart.dindex(msg, 1));
@@ -18310,12 +18311,14 @@ define([], function() {
async._Completer = _Completer();
const _asyncCompleteError = Symbol('_asyncCompleteError');
async._AsyncCompleter$ = dart.generic(T => {
+ let FutureOrOfT = () => (FutureOrOfT = dart.constFn(async.FutureOr$(T)))();
class _AsyncCompleter extends async._Completer$(T) {
new() {
super.new();
}
complete(value) {
if (value === void 0) value = null;
+ FutureOrOfT()._check(value);
if (!dart.test(this.future[_mayComplete])) dart.throw(new core.StateError("Future already completed"));
this.future[_asyncComplete](value);
}
@@ -18325,7 +18328,7 @@ define([], function() {
}
dart.setSignature(_AsyncCompleter, {
methods: () => ({
- complete: dart.definiteFunctionType(dart.void, [], [dart.dynamic]),
+ complete: dart.definiteFunctionType(dart.void, [], [FutureOrOfT()]),
[_completeError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace])
})
});
@@ -18333,12 +18336,14 @@ define([], function() {
});
async._AsyncCompleter = _AsyncCompleter();
async._SyncCompleter$ = dart.generic(T => {
+ let FutureOrOfT = () => (FutureOrOfT = dart.constFn(async.FutureOr$(T)))();
class _SyncCompleter extends async._Completer$(T) {
new() {
super.new();
}
complete(value) {
if (value === void 0) value = null;
+ FutureOrOfT()._check(value);
if (!dart.test(this.future[_mayComplete])) dart.throw(new core.StateError("Future already completed"));
this.future[_complete](value);
}
@@ -18348,7 +18353,7 @@ define([], function() {
}
dart.setSignature(_SyncCompleter, {
methods: () => ({
- complete: dart.definiteFunctionType(dart.void, [], [dart.dynamic]),
+ complete: dart.definiteFunctionType(dart.void, [], [FutureOrOfT()]),
[_completeError]: dart.definiteFunctionType(dart.void, [core.Object, core.StackTrace])
})
});
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/js/common/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698