Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: third_party/WebKit/Source/modules/webusb/USB.h

Issue 1848603002: Remove single observer assumption in WebUSBClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register pre-finalizer. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webusb/USB.h
diff --git a/third_party/WebKit/Source/modules/webusb/USB.h b/third_party/WebKit/Source/modules/webusb/USB.h
index fbad005d53dfa6c20683f1b6bb3be61689462d20..065936aece2ba043987e4bfa1c0d4c8356033348 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.h
+++ b/third_party/WebKit/Source/modules/webusb/USB.h
@@ -10,6 +10,7 @@
#include "core/events/EventTarget.h"
#include "core/frame/LocalFrameLifecycleObserver.h"
#include "platform/heap/Handle.h"
+#include "platform/heap/ThreadState.h"
#include "public/platform/modules/webusb/WebUSBClient.h"
namespace blink {
@@ -26,6 +27,7 @@ class USB final
DEFINE_WRAPPERTYPEINFO();
REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(USB);
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(USB);
+ WILL_BE_USING_PRE_FINALIZER(USB, dispose);
public:
static USB* create(LocalFrame& frame)
{
@@ -34,6 +36,8 @@ public:
~USB() override;
+ void dispose();
+
// USB.idl
ScriptPromise getDevices(ScriptState*);
ScriptPromise requestDevice(ScriptState*, const USBDeviceRequestOptions&);

Powered by Google App Engine
This is Rietveld 408576698