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

Side by Side Diff: runtime/bin/eventhandler.cc

Issue 150563005: Short-cut the call to Timer.run, to not go through standalone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | sdk/lib/io/timer_impl.dart » ('j') | sdk/lib/io/timer_impl.dart » ('J')
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 #include "bin/dartutils.h" 5 #include "bin/dartutils.h"
6 #include "bin/eventhandler.h" 6 #include "bin/eventhandler.h"
7 #include "bin/socket.h" 7 #include "bin/socket.h"
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 9
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 Dart_PropagateError(handle); 99 Dart_PropagateError(handle);
100 UNREACHABLE(); 100 UNREACHABLE();
101 } 101 }
102 Dart_Port dart_port; 102 Dart_Port dart_port;
103 handle = Dart_IntegerToInt64(handle, &dart_port); 103 handle = Dart_IntegerToInt64(handle, &dart_port);
104 if (Dart_IsError(handle)) { 104 if (Dart_IsError(handle)) {
105 Dart_PropagateError(handle); 105 Dart_PropagateError(handle);
106 UNREACHABLE(); 106 UNREACHABLE();
107 } 107 }
108 int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2)); 108 int64_t data = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
109 if ((id == kTimerId) && (data == 0)) { 109 event_handler->SendData(id, dart_port, data);
110 // This is a 0-timer. Simply queue a 'null' on the port.
111 DartUtils::PostNull(dart_port);
112 } else {
113 event_handler->SendData(id, dart_port, data);
114 }
115 } 110 }
116 111
117 } // namespace bin 112 } // namespace bin
118 } // namespace dart 113 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/timer_impl.dart » ('j') | sdk/lib/io/timer_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698