summaryrefslogtreecommitdiff
path: root/chromium/v8/include/v8-platform.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/include/v8-platform.h
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/include/v8-platform.h')
-rw-r--r--chromium/v8/include/v8-platform.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/chromium/v8/include/v8-platform.h b/chromium/v8/include/v8-platform.h
index 7cfd18b5708..03be1c8cdd6 100644
--- a/chromium/v8/include/v8-platform.h
+++ b/chromium/v8/include/v8-platform.h
@@ -80,6 +80,14 @@ class TaskRunner {
* implementation takes ownership of |task|. The |task| cannot be nested
* within other task executions.
*
+ * Tasks which shouldn't be interleaved with JS execution must be posted with
+ * |PostNonNestableTask| or |PostNonNestableDelayedTask|. This is because the
+ * embedder may process tasks in a callback which is called during JS
+ * execution.
+ *
+ * In particular, tasks which execute JS must be non-nestable, since JS
+ * execution is not allowed to nest.
+ *
* Requires that |TaskRunner::NonNestableTasksEnabled()| is true.
*/
virtual void PostNonNestableTask(std::unique_ptr<Task> task) {}
@@ -98,6 +106,14 @@ class TaskRunner {
* implementation takes ownership of |task|. The |task| cannot be nested
* within other task executions.
*
+ * Tasks which shouldn't be interleaved with JS execution must be posted with
+ * |PostNonNestableTask| or |PostNonNestableDelayedTask|. This is because the
+ * embedder may process tasks in a callback which is called during JS
+ * execution.
+ *
+ * In particular, tasks which execute JS must be non-nestable, since JS
+ * execution is not allowed to nest.
+ *
* Requires that |TaskRunner::NonNestableDelayedTasksEnabled()| is true.
*/
virtual void PostNonNestableDelayedTask(std::unique_ptr<Task> task,
@@ -519,9 +535,8 @@ class Platform {
* libplatform looks like:
* std::unique_ptr<JobHandle> PostJob(
* TaskPriority priority, std::unique_ptr<JobTask> job_task) override {
- * return std::make_unique<DefaultJobHandle>(
- * std::make_shared<DefaultJobState>(
- * this, std::move(job_task), kNumThreads));
+ * return v8::platform::NewDefaultJobHandle(
+ * this, priority, std::move(job_task), NumberOfWorkerThreads());
* }
*/
virtual std::unique_ptr<JobHandle> PostJob(