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

Unified Diff: runtime/bin/eventhandler.cc

Issue 8380020: Refactor the dart api a bit: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler.cc
===================================================================
--- runtime/bin/eventhandler.cc (revision 775)
+++ runtime/bin/eventhandler.cc (working copy)
@@ -15,11 +15,11 @@
* Returns the reference of the EventHandler stored in the native field.
*/
static EventHandler* GetEventHandler(Dart_Handle handle) {
- Dart_Result result = Dart_GetNativeInstanceField(
- handle, kNativeEventHandlerFieldIndex);
- ASSERT(Dart_IsValidResult(result));
- EventHandler* event_handler =
- reinterpret_cast<EventHandler*>(Dart_GetResultAsCIntptr(result));
+ intptr_t value = 0;
+ Dart_Handle result = Dart_GetNativeInstanceField(
+ handle, kNativeEventHandlerFieldIndex, &value);
+ ASSERT(Dart_IsValid(result));
+ EventHandler* event_handler = reinterpret_cast<EventHandler*>(value);
ASSERT(event_handler != NULL);
return event_handler;
}
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698