| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /* This file defines the module loader for the dart runtime. | 5 /* This file defines the module loader for the dart runtime. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 var dart_library = | 8 var dart_library = |
| 9 typeof module != "undefined" && module.exports || {}; | 9 typeof module != "undefined" && module.exports || {}; |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 this._state = LibraryLoader.LOADING; | 54 this._state = LibraryLoader.LOADING; |
| 55 | 55 |
| 56 // Handle imports | 56 // Handle imports |
| 57 let args = this.loadImports(); | 57 let args = this.loadImports(); |
| 58 | 58 |
| 59 // Load the library | 59 // Load the library |
| 60 args.unshift(this._library); | 60 args.unshift(this._library); |
| 61 this._loader.apply(null, args); | 61 this._loader.apply(null, args); |
| 62 this._state = LibraryLoader.READY; | 62 this._state = LibraryLoader.READY; |
| 63 this._library._name = this._name; |
| 63 return this._library; | 64 return this._library; |
| 64 } | 65 } |
| 65 | 66 |
| 66 stub() { | 67 stub() { |
| 67 return this._library; | 68 return this._library; |
| 68 } | 69 } |
| 69 } | 70 } |
| 70 LibraryLoader.NOT_LOADED = 0; | 71 LibraryLoader.NOT_LOADED = 0; |
| 71 LibraryLoader.LOADING = 1; | 72 LibraryLoader.LOADING = 1; |
| 72 LibraryLoader.READY = 2; | 73 LibraryLoader.READY = 2; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 window.SourceBufferList = new MediaSource().sourceBuffers.constructor; | 143 window.SourceBufferList = new MediaSource().sourceBuffers.constructor; |
| 143 } | 144 } |
| 144 } | 145 } |
| 145 | 146 |
| 146 // This import is only needed for chrome debugging. We should provide an | 147 // This import is only needed for chrome debugging. We should provide an |
| 147 // option to compile without it. | 148 // option to compile without it. |
| 148 dart_sdk._debugger.registerDevtoolsFormatter(); | 149 dart_sdk._debugger.registerDevtoolsFormatter(); |
| 149 } | 150 } |
| 150 | 151 |
| 151 })(dart_library); | 152 })(dart_library); |
| OLD | NEW |