Skip to content

Commit

Permalink
use runInV8Stack in JobTaskWrapper (#1975)
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettgu10 authored and vickykont committed Apr 15, 2024
1 parent 7bcbc89 commit 362539f
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 362539f

Please sign in to comment.