| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // TODO(sigmund): this file should be removed when the dart code generation | 5 // TODO(sigmund): this file should be removed when the dart code generation |
| 6 // backend is deleted. | 6 // backend is deleted. |
| 7 | 7 |
| 8 var isolate$current = null; | 8 var isolate$current = null; |
| 9 var isolate$rootIsolate = null; // Will only be set in the main worker. | 9 var isolate$rootIsolate = null; // Will only be set in the main worker. |
| 10 var isolate$inits = []; | 10 var isolate$inits = []; |
| 11 var isolate$globalThis = this; | 11 var isolate$globalThis = this; |
| 12 | 12 |
| 13 // These declarations are needed to avoid errors from the Closure Compiler | 13 // These declarations are needed to avoid errors from the Closure Compiler |
| 14 // optimizer. They are defined in client/dom/generated/dart_dom_wrapping.js. | 14 // optimizer. They are defined in lib/dom/generated/dart_dom_wrapping.js. |
| 15 var __dom_wrap; | 15 var __dom_wrap; |
| 16 var __dom_unwrap; | 16 var __dom_unwrap; |
| 17 | 17 |
| 18 var isolate$inWorker = | 18 var isolate$inWorker = |
| 19 (typeof isolate$globalThis['importScripts']) != "undefined"; | 19 (typeof isolate$globalThis['importScripts']) != "undefined"; |
| 20 var isolate$supportsWorkers = | 20 var isolate$supportsWorkers = |
| 21 isolate$inWorker || ((typeof isolate$globalThis['Worker']) != 'undefined'); | 21 isolate$inWorker || ((typeof isolate$globalThis['Worker']) != 'undefined'); |
| 22 | 22 |
| 23 var isolate$MAIN_WORKER_ID = 0; | 23 var isolate$MAIN_WORKER_ID = 0; |
| 24 // Non-main workers will update the id variable. | 24 // Non-main workers will update the id variable. |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 516 } |
| 517 | 517 |
| 518 function isolate$deserializeMessage(message) { | 518 function isolate$deserializeMessage(message) { |
| 519 if (isolate$useWorkers || isolate$useWorkerSerializationProtocol) { | 519 if (isolate$useWorkers || isolate$useWorkerSerializationProtocol) { |
| 520 return native__IsolateJsUtil__deserializeMessage(message); | 520 return native__IsolateJsUtil__deserializeMessage(message); |
| 521 } else { | 521 } else { |
| 522 // Nothing more to do. | 522 // Nothing more to do. |
| 523 return message; | 523 return message; |
| 524 } | 524 } |
| 525 } | 525 } |
| OLD | NEW |