refactor: narrow or remove gin arguments (#48300)

* refactor: narrow App:SetJumpList() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow WebContents::AddWorkSpace() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow ShowMessageBox() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow ShowOpenDialog() arg from gin::Arguments* to v8::Isolate*

* refactor: remove unused gin::Arguments* arg from OverrideGlobalPropertyFromIsolatedWorld()

* refactor: narrow WebContents::StartDrag() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow NetLog::StopLogging() arg from gin::Arguments* to v8::Isolate*

* refactor: narrow Protocol::IsProtocolHandled() arg from gin::Arguments* to v8::Isolate*
This commit is contained in:
Charles Kerr
2025-09-12 18:19:07 -05:00
committed by GitHub
parent 5444738721
commit a468ed7f10
10 changed files with 44 additions and 50 deletions

View File

@@ -1241,14 +1241,13 @@ v8::Local<v8::Value> App::GetJumpListSettings() {
return dict.GetHandle();
}
JumpListResult App::SetJumpList(v8::Local<v8::Value> val,
gin::Arguments* args) {
JumpListResult App::SetJumpList(v8::Isolate* const isolate,
v8::Local<v8::Value> val) {
std::vector<JumpListCategory> categories;
bool delete_jump_list = val->IsNull();
if (!delete_jump_list &&
!gin::ConvertFromV8(args->isolate(), val, &categories)) {
gin_helper::ErrorThrower(args->isolate())
.ThrowTypeError("Argument must be null or an array of categories");
if (!delete_jump_list && !gin::ConvertFromV8(isolate, val, &categories)) {
gin_helper::ErrorThrower{isolate}.ThrowTypeError(
"Argument must be null or an array of categories");
return JumpListResult::kArgumentError;
}