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

Side by Side Diff: dart/runtime/lib/isolate_patch.dart

Issue 11615023: Version 0.2.9.7 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/compiler.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 patch class ReceivePort { 5 patch class ReceivePort {
6 /* patch */ factory ReceivePort() { 6 /* patch */ factory ReceivePort() {
7 return new _ReceivePortImpl(); 7 return new _ReceivePortImpl();
8 } 8 }
9 } 9 }
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 _portInternal = _getPortInternal(); 121 _portInternal = _getPortInternal();
122 } 122 }
123 return _portInternal; 123 return _portInternal;
124 } 124 }
125 125
126 patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; 126 patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction";
127 127
128 patch spawnUri(String uri) native "isolate_spawnUri"; 128 patch spawnUri(String uri) native "isolate_spawnUri";
129 129
130 patch class Timer { 130 patch class Timer {
131 /* patch */ factory Timer(int milliseconds, void callback(Timer timer)) { 131 /* patch */ factory Timer(int milliSeconds, void callback(Timer timer)) {
132 if (_TimerFactory._factory == null) { 132 if (_TimerFactory._factory == null) {
133 throw new UnsupportedError("Timer interface not supported."); 133 throw new UnsupportedError("Timer interface not supported.");
134 } 134 }
135 return _TimerFactory._factory(milliseconds, callback, false); 135 return _TimerFactory._factory(milliSeconds, callback, false);
136 } 136 }
137 137
138 /** 138 /**
139 * Creates a new repeating timer. The [callback] is invoked every 139 * Creates a new repeating timer. The [callback] is invoked every
140 * [milliseconds] millisecond until cancelled. 140 * [milliSeconds] millisecond until cancelled.
141 */ 141 */
142 /* patch */ factory Timer.repeating(int milliseconds, 142 /* patch */ factory Timer.repeating(int milliSeconds,
143 void callback(Timer timer)) { 143 void callback(Timer timer)) {
144 if (_TimerFactory._factory == null) { 144 if (_TimerFactory._factory == null) {
145 throw new UnsupportedError("Timer interface not supported."); 145 throw new UnsupportedError("Timer interface not supported.");
146 } 146 }
147 return _TimerFactory._factory(milliseconds, callback, true); 147 return _TimerFactory._factory(milliSeconds, callback, true);
148 } 148 }
149 } 149 }
150 150
151 typedef Timer _TimerFactoryClosure(int milliseconds, 151 typedef Timer _TimerFactoryClosure(int milliSeconds,
152 void callback(Timer timer), 152 void callback(Timer timer),
153 bool repeating); 153 bool repeating);
154 154
155 class _TimerFactory { 155 class _TimerFactory {
156 static _TimerFactoryClosure _factory; 156 static _TimerFactoryClosure _factory;
157 } 157 }
158 158
159 // TODO(ahe): Warning: this is NOT called by Dartium. Instead, it sets 159 // TODO(ahe): Warning: this is NOT called by Dartium. Instead, it sets
160 // [_TimerFactory._factory] directly. 160 // [_TimerFactory._factory] directly.
161 void _setTimerFactoryClosure(_TimerFactoryClosure closure) { 161 void _setTimerFactoryClosure(_TimerFactoryClosure closure) {
162 _TimerFactory._factory = closure; 162 _TimerFactory._factory = closure;
163 } 163 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698