File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1168,6 +1168,9 @@ FILE: ../../../flutter/third_party/tonic/logging/dart_invoke.cc
11681168FILE: ../../../flutter/third_party/tonic/logging/dart_invoke.h
11691169FILE: ../../../flutter/third_party/tonic/parsers/packages_map.cc
11701170FILE: ../../../flutter/third_party/tonic/parsers/packages_map.h
1171+ FILE: ../../../flutter/third_party/tonic/platform/platform_utils.h
1172+ FILE: ../../../flutter/third_party/tonic/platform/platform_utils_posix.cc
1173+ FILE: ../../../flutter/third_party/tonic/platform/platform_utils_win.cc
11711174FILE: ../../../flutter/third_party/tonic/scopes/dart_api_scope.h
11721175FILE: ../../../flutter/third_party/tonic/scopes/dart_isolate_scope.cc
11731176FILE: ../../../flutter/third_party/tonic/scopes/dart_isolate_scope.h
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ source_set("tonic") {
3939 " converter" ,
4040 " file_loader" ,
4141 " logging" ,
42+ " platform" ,
4243 " scopes" ,
4344 " typed_data" ,
4445 " //third_party/dart/runtime:dart_api" ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ source_set("file_loader") {
2525 " ../converter" ,
2626 " ../filesystem" ,
2727 " ../parsers" ,
28+ " ../platform" ,
2829 " //third_party/dart/runtime:dart_api" ,
2930 ]
3031}
Original file line number Diff line number Diff line change 1414#include " tonic/common/macros.h"
1515#include " tonic/converter/dart_converter.h"
1616#include " tonic/parsers/packages_map.h"
17+ #include " tonic/platform/platform_utils.h"
1718
1819namespace tonic {
1920namespace {
Original file line number Diff line number Diff line change 1+ # Copyright 2013 The Flutter Authors. All rights reserved.
2+ # Use of this source code is governed by a BSD-style license that can be
3+ # found in the LICENSE file.
4+
5+ source_set (" platform" ) {
6+ visibility = [ " ../*" ]
7+
8+ configs += [ " ../:config" ]
9+
10+ if (is_win ) {
11+ set_sources_assignment_filter ([ " *_posix.cc" ])
12+ } else {
13+ set_sources_assignment_filter ([ " *_win.cc" ])
14+ }
15+
16+ deps = [
17+ " ../common" ,
18+ ]
19+
20+ sources = [
21+ " platform_utils.h" ,
22+ " platform_utils_posix.cc" ,
23+ " platform_utils_win.cc" ,
24+ ]
25+ }
Original file line number Diff line number Diff line change 1+ // Copyright 2013 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ #ifndef LIB_TONIC_PLATFORM_UTILS_H_
6+ #define LIB_TONIC_PLATFORM_UTILS_H_
7+
8+ namespace tonic {
9+
10+ // Calls the equivalent of exit(status) for a given platform.
11+ void PlatformExit (int status);
12+
13+ } // namespace tonic
14+
15+ #endif // LIB_TONIC_PLATFORM_UTILS_H_
Original file line number Diff line number Diff line change 1+ // Copyright 2013 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ #include < cstdlib>
6+ #include " platform_utils.h"
7+
8+ namespace tonic {
9+
10+ void PlatformExit (int status) {
11+ exit (status);
12+ }
13+
14+ } // namespace tonic
Original file line number Diff line number Diff line change 1+ // Copyright 2013 The Flutter Authors. All rights reserved.
2+ // Use of this source code is governed by a BSD-style license that can be
3+ // found in the LICENSE file.
4+
5+ #include " platform_utils.h"
6+
7+ #include < windows.h>
8+
9+ namespace tonic {
10+
11+ void PlatformExit (int status) {
12+ ::ExitProcess (status);
13+ }
14+
15+ } // namespace tonic
You can’t perform that action at this time.
0 commit comments