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

Unified Diff: frog/leg/lib/js_helper.dart

Issue 9750003: Write our JS blobs for handling native classes in Dart. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: frog/leg/lib/js_helper.dart
===================================================================
--- frog/leg/lib/js_helper.dart (revision 5817)
+++ frog/leg/lib/js_helper.dart (working copy)
@@ -8,6 +8,7 @@
#source('constant_map.dart');
#source('date_helper.dart');
+#source('native_helper.dart');
#source('regexp_helper.dart');
#source('string_helper.dart');
@@ -1179,7 +1180,7 @@
captureStackTrace(ex) {
var jsError = JS('Object', @'new Error()');
JS('void', @'#.dartException = #', jsError, ex);
- JS('void', @'''#.toString = #''', jsError, toStringWrapper);
+ JS('void', @'''#.toString = #''', jsError, JS_TO_CLOSURE(toStringWrapper));
ahe 2012/03/26 13:01:55 This method is doing "Dart closure to JS", right?
ngeoffray 2012/03/26 13:32:20 Done.
return jsError;
}
@@ -1218,7 +1219,7 @@
*/
unwrapException(ex) {
// Note that we are checking if the object has the property. If it
- // has, it could be set null if the thrown value is null.
+ // has, it could be set to null if the thrown value is null.
if (JS('bool', @'"dartException" in #', ex)) {
return JS('Object', @'#.dartException', ex);
} else if (JS('bool', @'# instanceof TypeError', ex)) {
@@ -1310,7 +1311,7 @@
function = JS("var", @"""function() {
return #(#, #, arguments.length, arguments[0], arguments[1]);
}""",
- invokeClosure,
+ JS_TO_CLOSURE(invokeClosure),
closure,
JS_CURRENT_ISOLATE());

Powered by Google App Engine
This is Rietveld 408576698