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

Unified Diff: tools/dom/templates/html/dartium/cpp_callback_header.template

Issue 22694004: - Change access pattern to Native Arguments (make one call instead of two). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« tools/dom/scripts/systemnative.py ('K') | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/cpp_callback_header.template
===================================================================
--- tools/dom/templates/html/dartium/cpp_callback_header.template (revision 25980)
+++ tools/dom/templates/html/dartium/cpp_callback_header.template (working copy)
@@ -29,6 +29,21 @@
return 0;
return create(object, exception);
}
+
+ static PassRefPtr<NativeType> create(Dart_NativeArguments args, int idx, Dart_Handle& exception)
+ {
+ Dart_Handle object = Dart_GetNativeArgument(args, idx);
+ return create(object, exception);
+ }
+
+ static PassRefPtr<NativeType> createWithNullCheck(Dart_NativeArguments args, int idx, Dart_Handle& exception)
+ {
+ Dart_Handle object = Dart_GetNativeArgument(args, idx);
+ if (Dart_IsNull(object))
+ return 0;
+ return create(object, exception);
+ }
+
$HANDLERS
private:
« tools/dom/scripts/systemnative.py ('K') | « tools/dom/scripts/systemnative.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698