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

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

Issue 1376143004: Fix build breakage encountered by Flutter (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/bin.gypi ('k') | no next file » | 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) 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/dartutils.h" 5 #include "bin/dartutils.h"
6 #include "bin/dbg_connection.h" 6 #include "bin/dbg_connection.h"
7 #include "bin/eventhandler.h" 7 #include "bin/eventhandler.h"
8 #include "bin/io_buffer.h" 8 #include "bin/io_buffer.h"
9 #include "bin/log.h" 9 #include "bin/log.h"
10 #include "bin/platform.h" 10 #include "bin/platform.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // Ignore result if passing invalid argument and just exit 0. 255 // Ignore result if passing invalid argument and just exit 0.
256 DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status); 256 DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status);
257 Dart_ShutdownIsolate(); 257 Dart_ShutdownIsolate();
258 Process::TerminateExitCodeHandler(); 258 Process::TerminateExitCodeHandler();
259 char* error = Dart_Cleanup(); 259 char* error = Dart_Cleanup();
260 if (error != NULL) { 260 if (error != NULL) {
261 Log::PrintErr("VM cleanup failed: %s\n", error); 261 Log::PrintErr("VM cleanup failed: %s\n", error);
262 free(error); 262 free(error);
263 } 263 }
264 if (do_vm_shutdown) { 264 if (do_vm_shutdown) {
265 #ifdef LEGACY_DEBUG_PROTOCOL_ENABLED
266 // Note that this dependency crosses logical project boundaries by making
267 // the dart:io implementation depend upon the standalone VM's legacy debug
268 // protocol. This breaks projects which want to use our dart:io
269 // implementation. Because the protocol is going away shortly, it's
270 // reasonable to leave it behind a #ifdef that is only enabled for the
271 // standalone VM for now.
265 DebuggerConnectionHandler::StopHandler(); 272 DebuggerConnectionHandler::StopHandler();
273 #endif
266 EventHandler::Stop(); 274 EventHandler::Stop();
267 } 275 }
268 exit(static_cast<int>(status)); 276 exit(static_cast<int>(status));
269 } 277 }
270 278
271 279
272 void FUNCTION_NAME(Process_SetExitCode)(Dart_NativeArguments args) { 280 void FUNCTION_NAME(Process_SetExitCode)(Dart_NativeArguments args) {
273 int64_t status = 0; 281 int64_t status = 0;
274 // Ignore result if passing invalid argument and just set exit code to 0. 282 // Ignore result if passing invalid argument and just set exit code to 0.
275 DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status); 283 DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 free(const_cast<char*>(system_string)); 391 free(const_cast<char*>(system_string));
384 Dart_PropagateError(result); 392 Dart_PropagateError(result);
385 } 393 }
386 memmove(buffer, system_string, system_len); 394 memmove(buffer, system_string, system_len);
387 free(const_cast<char*>(system_string)); 395 free(const_cast<char*>(system_string));
388 Dart_SetReturnValue(args, external_array); 396 Dart_SetReturnValue(args, external_array);
389 } 397 }
390 398
391 } // namespace bin 399 } // namespace bin
392 } // namespace dart 400 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/bin.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698