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

Side by Side Diff: src/d8.cc

Issue 2737743002: Make idle tasks optional in the default platform. (Closed)
Patch Set: another fix Created 3 years, 9 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 | « include/libplatform/libplatform.h ('k') | src/libplatform/default-platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <string.h> 7 #include <string.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 2885 _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
2886 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE); 2886 _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG | _CRTDBG_MODE_FILE);
2887 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 2887 _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
2888 _set_error_mode(_OUT_TO_STDERR); 2888 _set_error_mode(_OUT_TO_STDERR);
2889 #endif // defined(_MSC_VER) 2889 #endif // defined(_MSC_VER)
2890 #endif // defined(_WIN32) || defined(_WIN64) 2890 #endif // defined(_WIN32) || defined(_WIN64)
2891 if (!SetOptions(argc, argv)) return 1; 2891 if (!SetOptions(argc, argv)) return 1;
2892 v8::V8::InitializeICUDefaultLocation(argv[0], options.icu_data_file); 2892 v8::V8::InitializeICUDefaultLocation(argv[0], options.icu_data_file);
2893 g_platform = i::FLAG_verify_predictable 2893 g_platform = i::FLAG_verify_predictable
2894 ? new PredictablePlatform() 2894 ? new PredictablePlatform()
2895 : v8::platform::CreateDefaultPlatform(); 2895 : v8::platform::CreateDefaultPlatform(
2896 0, v8::platform::IdleTaskSupport::kEnabled);
2896 2897
2897 platform::tracing::TracingController* tracing_controller; 2898 platform::tracing::TracingController* tracing_controller;
2898 if (options.trace_enabled) { 2899 if (options.trace_enabled) {
2899 trace_file.open("v8_trace.json"); 2900 trace_file.open("v8_trace.json");
2900 tracing_controller = new platform::tracing::TracingController(); 2901 tracing_controller = new platform::tracing::TracingController();
2901 platform::tracing::TraceBuffer* trace_buffer = 2902 platform::tracing::TraceBuffer* trace_buffer =
2902 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer( 2903 platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer(
2903 platform::tracing::TraceBuffer::kRingBufferChunks, 2904 platform::tracing::TraceBuffer::kRingBufferChunks,
2904 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file)); 2905 platform::tracing::TraceWriter::CreateJSONTraceWriter(trace_file));
2905 tracing_controller->Initialize(trace_buffer); 2906 tracing_controller->Initialize(trace_buffer);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 } 3026 }
3026 3027
3027 } // namespace v8 3028 } // namespace v8
3028 3029
3029 3030
3030 #ifndef GOOGLE3 3031 #ifndef GOOGLE3
3031 int main(int argc, char* argv[]) { 3032 int main(int argc, char* argv[]) {
3032 return v8::Shell::Main(argc, argv); 3033 return v8::Shell::Main(argc, argv);
3033 } 3034 }
3034 #endif 3035 #endif
OLDNEW
« no previous file with comments | « include/libplatform/libplatform.h ('k') | src/libplatform/default-platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698