File
Blob: src/workerd/jsg/v8-platform-wrapper.c++
| 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 | |
| 11 | namespace workerd::jsg { |
| 12 | |
| 13 | V8PlatformWrapper::JobTaskWrapper::JobTaskWrapper(std::unique_ptr<v8::JobTask> inner) |
| 14 | : inner(kj::mv(inner)) {} |
| 15 | |
| 16 | void V8PlatformWrapper::JobTaskWrapper::Run(v8::JobDelegate* delegate) { |
| 17 | runInV8Stack([&](jsg::V8StackScope& stackScope) { inner->Run(delegate); }); |
| 18 | } |
| 19 | |
| 20 | } // namespace workerd::jsg |