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

Side by Side Diff: runtime/lib/developer.cc

Issue 2468093007: clang-format runtime/lib (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/lib/date.cc ('k') | runtime/lib/double.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/debugger.h" 9 #include "vm/debugger.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return Object::null(); 52 return Object::null();
53 } 53 }
54 GET_NON_NULL_NATIVE_ARGUMENT(String, message, arguments->NativeArgAt(0)); 54 GET_NON_NULL_NATIVE_ARGUMENT(String, message, arguments->NativeArgAt(0));
55 GET_NON_NULL_NATIVE_ARGUMENT(Integer, timestamp, arguments->NativeArgAt(1)); 55 GET_NON_NULL_NATIVE_ARGUMENT(Integer, timestamp, arguments->NativeArgAt(1));
56 GET_NON_NULL_NATIVE_ARGUMENT(Integer, sequence, arguments->NativeArgAt(2)); 56 GET_NON_NULL_NATIVE_ARGUMENT(Integer, sequence, arguments->NativeArgAt(2));
57 GET_NON_NULL_NATIVE_ARGUMENT(Smi, level, arguments->NativeArgAt(3)); 57 GET_NON_NULL_NATIVE_ARGUMENT(Smi, level, arguments->NativeArgAt(3));
58 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(4)); 58 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(4));
59 GET_NATIVE_ARGUMENT(Instance, dart_zone, arguments->NativeArgAt(5)); 59 GET_NATIVE_ARGUMENT(Instance, dart_zone, arguments->NativeArgAt(5));
60 GET_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(6)); 60 GET_NATIVE_ARGUMENT(Instance, error, arguments->NativeArgAt(6));
61 GET_NATIVE_ARGUMENT(Instance, stack_trace, arguments->NativeArgAt(7)); 61 GET_NATIVE_ARGUMENT(Instance, stack_trace, arguments->NativeArgAt(7));
62 Service::SendLogEvent(isolate, 62 Service::SendLogEvent(isolate, sequence.AsInt64Value(),
63 sequence.AsInt64Value(), 63 timestamp.AsInt64Value(), level.Value(), name, message,
64 timestamp.AsInt64Value(), 64 dart_zone, error, stack_trace);
65 level.Value(),
66 name,
67 message,
68 dart_zone,
69 error,
70 stack_trace);
71 return Object::null(); 65 return Object::null();
72 #endif // PRODUCT 66 #endif // PRODUCT
73 } 67 }
74 68
75 69
76 DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) { 70 DEFINE_NATIVE_ENTRY(Developer_postEvent, 2) {
77 #if defined(PRODUCT) 71 #if defined(PRODUCT)
78 return Object::null(); 72 return Object::null();
79 #else 73 #else
80 if (!FLAG_support_service) { 74 if (!FLAG_support_service) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #if defined(PRODUCT) 128 #if defined(PRODUCT)
135 return Smi::New(0); 129 return Smi::New(0);
136 #else 130 #else
137 return Smi::New(SERVICE_PROTOCOL_MINOR_VERSION); 131 return Smi::New(SERVICE_PROTOCOL_MINOR_VERSION);
138 #endif 132 #endif
139 } 133 }
140 134
141 135
142 static void SendNull(const SendPort& port) { 136 static void SendNull(const SendPort& port) {
143 const Dart_Port destination_port_id = port.Id(); 137 const Dart_Port destination_port_id = port.Id();
144 PortMap::PostMessage(new Message( 138 PortMap::PostMessage(new Message(destination_port_id, Object::null(),
145 destination_port_id, Object::null(), Message::kNormalPriority)); 139 Message::kNormalPriority));
146 } 140 }
147 141
148 142
149 DEFINE_NATIVE_ENTRY(Developer_getServerInfo, 1) { 143 DEFINE_NATIVE_ENTRY(Developer_getServerInfo, 1) {
150 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0)); 144 GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
151 #if defined(PRODUCT) 145 #if defined(PRODUCT)
152 SendNull(port); 146 SendNull(port);
153 return Object::null(); 147 return Object::null();
154 #else 148 #else
155 if (!ServiceIsolate::IsRunning()) { 149 if (!ServiceIsolate::IsRunning()) {
(...skipping 16 matching lines...) Expand all
172 if (!ServiceIsolate::IsRunning()) { 166 if (!ServiceIsolate::IsRunning()) {
173 SendNull(port); 167 SendNull(port);
174 } else { 168 } else {
175 ServiceIsolate::ControlWebServer(port, enabled.value()); 169 ServiceIsolate::ControlWebServer(port, enabled.value());
176 } 170 }
177 return Object::null(); 171 return Object::null();
178 #endif 172 #endif
179 } 173 }
180 174
181 } // namespace dart 175 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/date.cc ('k') | runtime/lib/double.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698