| OLD | NEW |
| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 231 } |
| 232 result = DartUtils::SetIntegerField(library, "_port", server_port); | 232 result = DartUtils::SetIntegerField(library, "_port", server_port); |
| 233 SHUTDOWN_ON_ERROR(result); | 233 SHUTDOWN_ON_ERROR(result); |
| 234 result = Dart_SetField(library, DartUtils::NewString("_autoStart"), | 234 result = Dart_SetField(library, DartUtils::NewString("_autoStart"), |
| 235 Dart_NewBoolean(auto_start)); | 235 Dart_NewBoolean(auto_start)); |
| 236 SHUTDOWN_ON_ERROR(result); | 236 SHUTDOWN_ON_ERROR(result); |
| 237 result = Dart_SetField(library, DartUtils::NewString("_originCheckDisabled"), | 237 result = Dart_SetField(library, DartUtils::NewString("_originCheckDisabled"), |
| 238 Dart_NewBoolean(dev_mode_server)); | 238 Dart_NewBoolean(dev_mode_server)); |
| 239 | 239 |
| 240 // Are we running on Windows? | 240 // Are we running on Windows? |
| 241 #if defined(TARGET_OS_WINDOWS) | 241 #if defined(HOST_OS_WINDOWS) |
| 242 Dart_Handle is_windows = Dart_True(); | 242 Dart_Handle is_windows = Dart_True(); |
| 243 #else | 243 #else |
| 244 Dart_Handle is_windows = Dart_False(); | 244 Dart_Handle is_windows = Dart_False(); |
| 245 #endif | 245 #endif |
| 246 result = | 246 result = |
| 247 Dart_SetField(library, DartUtils::NewString("_isWindows"), is_windows); | 247 Dart_SetField(library, DartUtils::NewString("_isWindows"), is_windows); |
| 248 SHUTDOWN_ON_ERROR(result); | 248 SHUTDOWN_ON_ERROR(result); |
| 249 | 249 |
| 250 // Are we running on Fuchsia? | 250 // Are we running on Fuchsia? |
| 251 #if defined(TARGET_OS_FUCHSIA) | 251 #if defined(HOST_OS_FUCHSIA) |
| 252 Dart_Handle is_fuchsia = Dart_True(); | 252 Dart_Handle is_fuchsia = Dart_True(); |
| 253 #else | 253 #else |
| 254 Dart_Handle is_fuchsia = Dart_False(); | 254 Dart_Handle is_fuchsia = Dart_False(); |
| 255 #endif | 255 #endif |
| 256 result = | 256 result = |
| 257 Dart_SetField(library, DartUtils::NewString("_isFuchsia"), is_fuchsia); | 257 Dart_SetField(library, DartUtils::NewString("_isFuchsia"), is_fuchsia); |
| 258 SHUTDOWN_ON_ERROR(result); | 258 SHUTDOWN_ON_ERROR(result); |
| 259 | 259 |
| 260 // Get _getWatchSignalInternal from dart:io. | 260 // Get _getWatchSignalInternal from dart:io. |
| 261 Dart_Handle dart_io_str = Dart_NewStringFromCString(DartUtils::kIOLibURL); | 261 Dart_Handle dart_io_str = Dart_NewStringFromCString(DartUtils::kIOLibURL); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 Dart_Handle source = GetSource(url_string); | 365 Dart_Handle source = GetSource(url_string); |
| 366 if (Dart_IsError(source)) { | 366 if (Dart_IsError(source)) { |
| 367 return source; | 367 return source; |
| 368 } | 368 } |
| 369 return Dart_LoadSource(library, url, Dart_Null(), source, 0, 0); | 369 return Dart_LoadSource(library, url, Dart_Null(), source, 0, 0); |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 } // namespace bin | 373 } // namespace bin |
| 374 } // namespace dart | 374 } // namespace dart |
| OLD | NEW |