OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
8 #define V8_SHARED | 8 #define V8_SHARED |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 String::NewFromUtf8(isolate, "arguments", NewStringType::kNormal) | 1252 String::NewFromUtf8(isolate, "arguments", NewStringType::kNormal) |
1253 .ToLocalChecked(), | 1253 .ToLocalChecked(), |
1254 Utils::ToLocal(arguments_jsarray)) | 1254 Utils::ToLocal(arguments_jsarray)) |
1255 .FromJust(); | 1255 .FromJust(); |
1256 #endif // !V8_SHARED | 1256 #endif // !V8_SHARED |
1257 return handle_scope.Escape(context); | 1257 return handle_scope.Escape(context); |
1258 } | 1258 } |
1259 | 1259 |
1260 | 1260 |
1261 void Shell::Exit(int exit_code) { | 1261 void Shell::Exit(int exit_code) { |
1262 // Use _exit instead of exit to avoid races between isolate | |
1263 // threads and static destructors. | |
1264 fflush(stdout); | 1262 fflush(stdout); |
1265 fflush(stderr); | 1263 fflush(stderr); |
1266 _exit(exit_code); | 1264 exit(exit_code); |
1267 } | 1265 } |
1268 | 1266 |
1269 | 1267 |
1270 #ifndef V8_SHARED | 1268 #ifndef V8_SHARED |
1271 struct CounterAndKey { | 1269 struct CounterAndKey { |
1272 Counter* counter; | 1270 Counter* counter; |
1273 const char* key; | 1271 const char* key; |
1274 }; | 1272 }; |
1275 | 1273 |
1276 | 1274 |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2526 } | 2524 } |
2527 | 2525 |
2528 } // namespace v8 | 2526 } // namespace v8 |
2529 | 2527 |
2530 | 2528 |
2531 #ifndef GOOGLE3 | 2529 #ifndef GOOGLE3 |
2532 int main(int argc, char* argv[]) { | 2530 int main(int argc, char* argv[]) { |
2533 return v8::Shell::Main(argc, argv); | 2531 return v8::Shell::Main(argc, argv); |
2534 } | 2532 } |
2535 #endif | 2533 #endif |
OLD | NEW |