| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import 'deferred_in_isolate_lib.dart' deferred as test; | |
| 6 | |
| 7 void main(args, msg) { | |
| 8 assert(args != null); | |
| 9 assert(args.length == 1); | |
| 10 assert(msg != null); | |
| 11 assert(msg.length == 1); | |
| 12 | |
| 13 var expectedMsg = args[0]; | |
| 14 var replyPort = msg[0]; | |
| 15 | |
| 16 try { | |
| 17 print("BeforeLibraryLoading"); | |
| 18 | |
| 19 test.loadLibrary().then((_) { | |
| 20 var obj = new test.DeferredObj(expectedMsg); | |
| 21 replyPort.send(obj.toString()); | |
| 22 }).catchError((error) { | |
| 23 replyPort.send("Error from isolate:\n$error"); | |
| 24 }); | |
| 25 } catch (exception, stacktrace) { | |
| 26 replyPort.send("Exception from isolate:\n$exception\n$stacktrace"); | |
| 27 } | |
| 28 } | |
| OLD | NEW |