From c394da395cac519c0274bcdd3f407fbc4bd51c12 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 17 May 2022 15:30:31 -0400 Subject: [PATCH] chore: use `SetGetter` to serialize the render_frame_host Co-authored-by: Samuel Maddock --- shell/browser/hid/hid_chooser_context.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index aeebfa554e2d9..947803559aafd 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -123,10 +123,10 @@ void HidChooserContext::RevokeDevicePermission( if (session) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope scope(isolate); - v8::Local details = gin::DataObjectBuilder(isolate) - .Set("device", device.Clone()) - .Set("frame", render_frame_host) - .Build(); + gin_helper::Dictionary details = + gin_helper::Dictionary::CreateEmpty(isolate); + details.Set("device", device.Clone()); + details.SetGetter("frame", render_frame_host); session->Emit("hid-device-revoked", details); } }