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

Side by Side Diff: dart/frog/leg/lib/js_helper.dart

Issue 9359039: Source in most stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 8 years, 10 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
« no previous file with comments | « dart/frog/leg/lib/coreimpl.dart ('k') | dart/frog/leg/scanner/listener.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 #library('js_helper'); 5 #library('js_helper');
6 6
7 #import('core.dart');
8
9 $throw(String msg) { 7 $throw(String msg) {
10 var e = JS("Object", @"new Error($0)", msg); 8 var e = JS("Object", @"new Error($0)", msg);
11 var hasTrace = JS("bool", @"Error.captureStackTrace !== (void 0)"); 9 var hasTrace = JS("bool", @"Error.captureStackTrace !== (void 0)");
12 if (hasTrace) { 10 if (hasTrace) {
13 JS("void", @"Error.captureStackTrace($0)", e); 11 JS("void", @"Error.captureStackTrace($0)", e);
14 } 12 }
15 throw e; 13 throw e;
16 } 14 }
17 15
18 /** 16 /**
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return UNINTERCEPTED(receiver.charCodeAt(index)); 288 return UNINTERCEPTED(receiver.charCodeAt(index));
291 } 289 }
292 } 290 }
293 291
294 builtin$isEmpty$0(var receiver) { 292 builtin$isEmpty$0(var receiver) {
295 if (receiver is String || isJSArray(receiver)) { 293 if (receiver is String || isJSArray(receiver)) {
296 return JS("bool", @"$0.length === 0", receiver); 294 return JS("bool", @"$0.length === 0", receiver);
297 } 295 }
298 return UNINTERCEPTED(receiver.isEmpty()); 296 return UNINTERCEPTED(receiver.isEmpty());
299 } 297 }
OLDNEW
« no previous file with comments | « dart/frog/leg/lib/coreimpl.dart ('k') | dart/frog/leg/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698