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

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

Issue 9429047: Implement operator-is for interfaces' supertypes and String's supertypes. Also, improve stack trace… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
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('coreimpl.dart'); 7 #import('coreimpl.dart');
8 8
9 #source('date_helper.dart'); 9 #source('date_helper.dart');
10 #source('regexp_helper.dart'); 10 #source('regexp_helper.dart');
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 throw 'String.hashCode is not implemented'; 1165 throw 'String.hashCode is not implemented';
1166 } 1166 }
1167 if (isJsArray(receiver)) { 1167 if (isJsArray(receiver)) {
1168 throw 'List.hashCode is not implemented'; 1168 throw 'List.hashCode is not implemented';
1169 } 1169 }
1170 return UNINTERCEPTED(receiver.hashCode()); 1170 return UNINTERCEPTED(receiver.hashCode());
1171 } 1171 }
1172 1172
1173 // TODO(ahe): Dynamic may be overridden. 1173 // TODO(ahe): Dynamic may be overridden.
1174 builtin$get$dynamic(receiver) => receiver; 1174 builtin$get$dynamic(receiver) => receiver;
1175
1176 /**
1177 * Called by generated code to capture the stacktrace before throwing
1178 * an exception.
1179 */
1180 captureStackTrace(ex) {
1181 return ex;
ngeoffray 2012/02/22 11:12:36 Remove this line.
ahe 2012/02/22 21:51:24 Done.
1182 if (ex === null) return ex;
ngeoffray 2012/02/22 11:12:36 You could change that to: if (JS('bool', @'typeof
ahe 2012/02/22 21:51:24 Great idea!
1183 if (JS('bool', @'typeof $0 === "object"', ex)) {
1184 var hasCapture = JS('bool', @'!!(Error.captureStackTrace)');
1185 if (hasCapture) {
1186 JS('Object', @'Error.captureStackTrace($0)', ex);
1187 }
1188 }
1189 return ex;
1190 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698