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

Side by Side Diff: dart/samples/proxy/proxy.dart

Issue 10553007: Remove support for String operator + from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update co19 status Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
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 #library("proxy"); 5 #library("proxy");
6 #import("dart:isolate"); 6 #import("dart:isolate");
7 7
8 /** 8 /**
9 * Base class for all RpcProxy's 9 * Base class for all RpcProxy's
10 * 10 *
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 static final String prefix = "RpcException:"; 215 static final String prefix = "RpcException:";
216 216
217 final String message; 217 final String message;
218 const RpcException(String this.message); 218 const RpcException(String this.message);
219 219
220 String toString() { 220 String toString() {
221 return message; 221 return message;
222 } 222 }
223 223
224 static String format(Object e) { 224 static String format(Object e) {
225 return prefix + e.toString(); 225 return "$prefix$e";
226 } 226 }
227 227
228 static RpcException parse(Object object) { 228 static RpcException parse(Object object) {
229 if (object === null || !(object is String)) { 229 if (object === null || !(object is String)) {
230 return null; 230 return null;
231 } 231 }
232 String s = object; 232 String s = object;
233 if (!s.startsWith(prefix)) { 233 if (!s.startsWith(prefix)) {
234 return null; 234 return null;
235 } 235 }
236 return new RpcException(s.substring(prefix.length, s.length)); 236 return new RpcException(s.substring(prefix.length, s.length));
237 } 237 }
238 } 238 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698