perf: avoid unnecessary base value clone (#38564)

This commit is contained in:
trop[bot]
2023-06-02 17:04:19 -05:00
committed by GitHub
parent 9bbd85c2ba
commit e12b30b6ce
6 changed files with 23 additions and 28 deletions

View File

@@ -206,7 +206,7 @@ void UsbChooserContext::RevokeObjectPermissionInternal(
v8::HandleScope scope(isolate);
gin_helper::Dictionary details =
gin_helper::Dictionary::CreateEmpty(isolate);
details.Set("device", object.Clone());
details.Set("device", object);
details.Set("origin", origin.Serialize());
session->Emit("usb-device-revoked", details);
}