mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user