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

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

Issue 2168193002: Fuchsia: Build standalone VM. Make it run "Hello, World!". (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleanup Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/vmservice_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 result = DartUtils::SetIntegerField(library, "_port", server_port); 239 result = DartUtils::SetIntegerField(library, "_port", server_port);
240 SHUTDOWN_ON_ERROR(result); 240 SHUTDOWN_ON_ERROR(result);
241 result = Dart_SetField(library, 241 result = Dart_SetField(library,
242 DartUtils::NewString("_autoStart"), 242 DartUtils::NewString("_autoStart"),
243 Dart_NewBoolean(auto_start)); 243 Dart_NewBoolean(auto_start));
244 SHUTDOWN_ON_ERROR(result); 244 SHUTDOWN_ON_ERROR(result);
245 result = Dart_SetField(library, 245 result = Dart_SetField(library,
246 DartUtils::NewString("_originCheckDisabled"), 246 DartUtils::NewString("_originCheckDisabled"),
247 Dart_NewBoolean(dev_mode_server)); 247 Dart_NewBoolean(dev_mode_server));
248 248
249 // Are we running on Windows? 249 // Signals not supported on Windows or Fuchsia.
250 #if defined(TARGET_OS_WINDOWS) 250 #if defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_FUCHSIA)
251 Dart_Handle is_windows = Dart_True(); 251 Dart_Handle has_signals = Dart_False();
252 #else 252 #else
253 Dart_Handle is_windows = Dart_False(); 253 Dart_Handle has_signals = Dart_True();
254 #endif 254 #endif
255 result = 255 result = Dart_SetField(library,
256 Dart_SetField(library, DartUtils::NewString("_isWindows"), is_windows); 256 DartUtils::NewString("_hasSignals"), has_signals);
257 SHUTDOWN_ON_ERROR(result); 257 SHUTDOWN_ON_ERROR(result);
258 258
259 // Get _getWatchSignalInternal from dart:io. 259 // Get _getWatchSignalInternal from dart:io.
260 Dart_Handle dart_io_str = Dart_NewStringFromCString(DartUtils::kIOLibURL); 260 Dart_Handle dart_io_str = Dart_NewStringFromCString(DartUtils::kIOLibURL);
261 SHUTDOWN_ON_ERROR(dart_io_str); 261 SHUTDOWN_ON_ERROR(dart_io_str);
262 Dart_Handle io_lib = Dart_LookupLibrary(dart_io_str); 262 Dart_Handle io_lib = Dart_LookupLibrary(dart_io_str);
263 SHUTDOWN_ON_ERROR(io_lib); 263 SHUTDOWN_ON_ERROR(io_lib);
264 Dart_Handle function_name = 264 Dart_Handle function_name =
265 Dart_NewStringFromCString("_getWatchSignalInternal"); 265 Dart_NewStringFromCString("_getWatchSignalInternal");
266 SHUTDOWN_ON_ERROR(function_name); 266 SHUTDOWN_ON_ERROR(function_name);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 Dart_Handle source = GetSource(url_string); 357 Dart_Handle source = GetSource(url_string);
358 if (Dart_IsError(source)) { 358 if (Dart_IsError(source)) {
359 return source; 359 return source;
360 } 360 }
361 return Dart_LoadSource(library, url, source, 0, 0); 361 return Dart_LoadSource(library, url, source, 0, 0);
362 } 362 }
363 363
364 364
365 } // namespace bin 365 } // namespace bin
366 } // namespace dart 366 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698