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

Side by Side Diff: pkg/dev_compiler/lib/js/legacy/dart_library.js

Issue 2621543004: Cleanup references to the old DDC repo (Closed)
Patch Set: Linkify issues Created 3 years, 11 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/src/compiler/code_generator.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 dart_library.start = start; 118 dart_library.start = start;
119 119
120 let _bootstrapped = false; 120 let _bootstrapped = false;
121 function bootstrap() { 121 function bootstrap() {
122 if (_bootstrapped) return; 122 if (_bootstrapped) return;
123 _bootstrapped = true; 123 _bootstrapped = true;
124 124
125 // Force import of core. 125 // Force import of core.
126 var dart_sdk = import_('dart_sdk'); 126 var dart_sdk = import_('dart_sdk');
127 127
128 // TODO(vsm): DOM facades? 128 // TODO(vsm): Move this to a shared location:
129 // See: https://github.com/dart-lang/dev_compiler/issues/173 129 // https://github.com/dart-lang/sdk/issues/27605
130 if (typeof NodeList !== "undefined") { 130 if (typeof NodeList !== "undefined") {
131 // TODO(vsm): Do we still need these?
131 NodeList.prototype.get = function(i) { return this[i]; }; 132 NodeList.prototype.get = function(i) { return this[i]; };
132 NamedNodeMap.prototype.get = function(i) { return this[i]; }; 133 NamedNodeMap.prototype.get = function(i) { return this[i]; };
133 DOMTokenList.prototype.get = function(i) { return this[i]; }; 134 DOMTokenList.prototype.get = function(i) { return this[i]; };
134 HTMLCollection.prototype.get = function(i) { return this[i]; }; 135 HTMLCollection.prototype.get = function(i) { return this[i]; };
136
135 // Expose constructors for DOM types dart:html needs to assume are 137 // Expose constructors for DOM types dart:html needs to assume are
136 // available on window. 138 // available on window.
137 if (typeof PannerNode == "undefined") { 139 if (typeof PannerNode == "undefined") {
138 let audioContext; 140 let audioContext;
139 if (typeof AudioContext == "undefined" && 141 if (typeof AudioContext == "undefined" &&
140 (typeof webkitAudioContext != "undefined")) { 142 (typeof webkitAudioContext != "undefined")) {
141 audioContext = new webkitAudioContext(); 143 audioContext = new webkitAudioContext();
142 } else { 144 } else {
143 audioContext = new AudioContext(); 145 audioContext = new AudioContext();
144 window.StereoPannerNode = 146 window.StereoPannerNode =
(...skipping 25 matching lines...) Expand all
170 window.SourceBufferList = new MediaSource().sourceBuffers.constructor; 172 window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
171 } 173 }
172 } 174 }
173 175
174 // This import is only needed for chrome debugging. We should provide an 176 // This import is only needed for chrome debugging. We should provide an
175 // option to compile without it. 177 // option to compile without it.
176 dart_sdk._debugger.registerDevtoolsFormatter(); 178 dart_sdk._debugger.registerDevtoolsFormatter();
177 } 179 }
178 180
179 })(dart_library); 181 })(dart_library);
OLDNEW
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/src/compiler/code_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698