Skip to content

Commit

Permalink
[JSG] Explicitly set template parameter in returnRejectedPromise()
Browse files Browse the repository at this point in the history
The compiler would drop the reference otherwise, resulting in the info parameter
being copyied implicitly. This caused //src/workerd/io:promise-wrapper-test to
fail.
  • Loading branch information
fhanau committed Aug 13, 2024
1 parent ce5c54f commit 6e88bad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/workerd/jsg/util.c++
Original file line number Diff line number Diff line change
Expand Up @@ -614,14 +614,14 @@ void returnRejectedPromise(
const v8::FunctionCallbackInfo<v8::Value>& info,
v8::Local<v8::Value> exception,
v8::TryCatch& tryCatch) {
return returnRejectedPromiseImpl(info, exception, tryCatch);
return returnRejectedPromiseImpl<const v8::FunctionCallbackInfo<v8::Value>&>(info, exception, tryCatch);
}

void returnRejectedPromise(
const v8::PropertyCallbackInfo<v8::Value>& info,
v8::Local<v8::Value> exception,
v8::TryCatch& tryCatch) {
return returnRejectedPromiseImpl(info, exception, tryCatch);
return returnRejectedPromiseImpl<const v8::PropertyCallbackInfo<v8::Value>&>(info, exception, tryCatch);
}

// ======================================================================================
Expand Down

0 comments on commit 6e88bad

Please sign in to comment.