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

Side by Side Diff: include/v8-platform.h

Issue 1179153002: Add V8 platform API to call delayed task. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Provide empty body to enable roll in Chromium. Created 5 years, 6 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 | « no previous file | 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_V8_PLATFORM_H_ 5 #ifndef V8_V8_PLATFORM_H_
6 #define V8_V8_PLATFORM_H_ 6 #define V8_V8_PLATFORM_H_
7 7
8 namespace v8 { 8 namespace v8 {
9 9
10 class Isolate; 10 class Isolate;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ExpectedRuntime expected_runtime) = 0; 50 ExpectedRuntime expected_runtime) = 0;
51 51
52 /** 52 /**
53 * Schedules a task to be invoked on a foreground thread wrt a specific 53 * Schedules a task to be invoked on a foreground thread wrt a specific
54 * |isolate|. Tasks posted for the same isolate should be execute in order of 54 * |isolate|. Tasks posted for the same isolate should be execute in order of
55 * scheduling. The definition of "foreground" is opaque to V8. 55 * scheduling. The definition of "foreground" is opaque to V8.
56 */ 56 */
57 virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0; 57 virtual void CallOnForegroundThread(Isolate* isolate, Task* task) = 0;
58 58
59 /** 59 /**
60 * Schedules a task to be invoked on a foreground thread wrt a specific
61 * |isolate| after the given number of seconds |delay_in_seconds|.
62 * Tasks posted for the same isolate should be execute in order of
63 * scheduling. The definition of "foreground" is opaque to V8.
64 */
65 virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task,
66 double delay_in_seconds) {
67 // TODO(ulan): Make this function abstract after V8 roll in Chromium.
68 }
69
70 /**
60 * Monotonically increasing time in seconds from an arbitrary fixed point in 71 * Monotonically increasing time in seconds from an arbitrary fixed point in
61 * the past. This function is expected to return at least 72 * the past. This function is expected to return at least
62 * millisecond-precision values. For this reason, 73 * millisecond-precision values. For this reason,
63 * it is recommended that the fixed point be no further in the past than 74 * it is recommended that the fixed point be no further in the past than
64 * the epoch. 75 * the epoch.
65 **/ 76 **/
66 virtual double MonotonicallyIncreasingTime() = 0; 77 virtual double MonotonicallyIncreasingTime() = 0;
67 }; 78 };
68 79
69 } // namespace v8 80 } // namespace v8
70 81
71 #endif // V8_V8_PLATFORM_H_ 82 #endif // V8_V8_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | src/libplatform/default-platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698