OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_LIBPLATFORM_LIBPLATFORM_H_ | 5 #ifndef V8_LIBPLATFORM_LIBPLATFORM_H_ |
6 #define V8_LIBPLATFORM_LIBPLATFORM_H_ | 6 #define V8_LIBPLATFORM_LIBPLATFORM_H_ |
7 | 7 |
8 #include "libplatform/libplatform-export.h" | 8 #include "libplatform/libplatform-export.h" |
9 #include "libplatform/v8-tracing.h" | 9 #include "libplatform/v8-tracing.h" |
10 #include "v8-platform.h" // NOLINT(build/include) | 10 #include "v8-platform.h" // NOLINT(build/include) |
(...skipping 17 matching lines...) Expand all Loading... |
28 * | 28 * |
29 * The caller has to make sure that this is called from the right thread. | 29 * The caller has to make sure that this is called from the right thread. |
30 * Returns true if a task was executed, and false otherwise. This call does | 30 * Returns true if a task was executed, and false otherwise. This call does |
31 * not block if no task is pending. The |platform| has to be created using | 31 * not block if no task is pending. The |platform| has to be created using |
32 * |CreateDefaultPlatform|. | 32 * |CreateDefaultPlatform|. |
33 */ | 33 */ |
34 V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform* platform, | 34 V8_PLATFORM_EXPORT bool PumpMessageLoop(v8::Platform* platform, |
35 v8::Isolate* isolate); | 35 v8::Isolate* isolate); |
36 | 36 |
37 /** | 37 /** |
| 38 * Runs pending idle tasks for at most |idle_time_in_seconds| seconds. |
| 39 * |
| 40 * The caller has to make sure that this is called from the right thread. |
| 41 * This call does not block if no task is pending. The |platform| has to be |
| 42 * created using |CreateDefaultPlatform|. |
| 43 */ |
| 44 V8_PLATFORM_EXPORT void RunIdleTasks(v8::Platform* platform, |
| 45 v8::Isolate* isolate, |
| 46 double idle_time_in_seconds); |
| 47 |
| 48 /** |
38 * Attempts to set the tracing controller for the given platform. | 49 * Attempts to set the tracing controller for the given platform. |
39 * | 50 * |
40 * The |platform| has to be created using |CreateDefaultPlatform|. | 51 * The |platform| has to be created using |CreateDefaultPlatform|. |
41 */ | 52 */ |
42 V8_PLATFORM_EXPORT void SetTracingController( | 53 V8_PLATFORM_EXPORT void SetTracingController( |
43 v8::Platform* platform, | 54 v8::Platform* platform, |
44 v8::platform::tracing::TracingController* tracing_controller); | 55 v8::platform::tracing::TracingController* tracing_controller); |
45 | 56 |
46 } // namespace platform | 57 } // namespace platform |
47 } // namespace v8 | 58 } // namespace v8 |
48 | 59 |
49 #endif // V8_LIBPLATFORM_LIBPLATFORM_H_ | 60 #endif // V8_LIBPLATFORM_LIBPLATFORM_H_ |
OLD | NEW |