Skip to content
File

Blob: src/workerd/jsg/v8-platform-wrapper.c++

567 bytes
1// Copyright (c) 2023 Cloudflare, Inc.
2// Licensed under the Apache 2.0 license found in the LICENSE file or at:
3// https://opensource.org/licenses/Apache-2.0
4 
5#include "v8-platform-wrapper.h"
6 
7#include "jsg.h"
8 
9#include <v8-isolate.h>
10 
11namespace workerd::jsg {
12 
13V8PlatformWrapper::JobTaskWrapper::JobTaskWrapper(std::unique_ptr<v8::JobTask> inner)
14 : inner(kj::mv(inner)) {}
15 
16void V8PlatformWrapper::JobTaskWrapper::Run(v8::JobDelegate* delegate) {
17 runInV8Stack([&](jsg::V8StackScope& stackScope) { inner->Run(delegate); });
18}
19 
20} // namespace workerd::jsg