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

Unified Diff: third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp

Issue 1876703002: Oilpan: Replace EAGERLY_FINALIZE in EventTarget's hierarchy with pre-finalizers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/webmidi/MIDIAccess.cpp
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
index c0e197c3007356b2805fb443ed90d5fd2a446dea..0edcaa7ddb11f42bcd5231dd38ad5fa88a5d25de 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.cpp
@@ -54,6 +54,7 @@ MIDIAccess::MIDIAccess(PassOwnPtr<MIDIAccessor> accessor, bool sysexEnabled, con
, m_sysexEnabled(sysexEnabled)
, m_hasPendingActivity(false)
{
+ ThreadState::current()->registerPreFinalizer(this);
m_accessor->setClient(this);
for (size_t i = 0; i < ports.size(); ++i) {
const MIDIAccessInitializer::PortDescriptor& port = ports[i];
@@ -69,6 +70,11 @@ MIDIAccess::~MIDIAccess()
{
}
+void MIDIAccess::dispose()
+{
+ m_accessor.clear();
+}
+
EventListener* MIDIAccess::onstatechange()
{
return getAttributeEventListener(EventTypeNames::statechange);
« no previous file with comments | « third_party/WebKit/Source/modules/webmidi/MIDIAccess.h ('k') | third_party/WebKit/Source/modules/webusb/USB.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698