Skip to content

Commit

Permalink
use runInV8Stack in JobTaskWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgu10 committed Apr 9, 2024
1 parent 7204518 commit 116d480
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/workerd/jsg/v8-platform-wrapper.c++
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ V8PlatformWrapper::JobTaskWrapper::JobTaskWrapper(std::unique_ptr<v8::JobTask> i
: inner(kj::mv(inner)), cageCtx(v8::PointerCageContext::GetCurrent()) {}

void V8PlatformWrapper::JobTaskWrapper::Run(v8::JobDelegate* delegate) {
v8::PointerCageContext::Scope cageScope(cageCtx);
inner->Run(delegate);
runInV8Stack([&](jsg::V8StackScope& stackScope) {
v8::PointerCageContext::Scope cageScope(cageCtx);
inner->Run(delegate);
});
}

} // namespace workerd::jsg

0 comments on commit 116d480

Please sign in to comment.