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

Unified Diff: Source/modules/webmidi/MIDIAccessInitializer.cpp

Issue 873573005: Oilpan: merge MIDIAccessInitializer's prefinalizers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webmidi/MIDIAccessInitializer.cpp
diff --git a/Source/modules/webmidi/MIDIAccessInitializer.cpp b/Source/modules/webmidi/MIDIAccessInitializer.cpp
index 36d4b00cfd07e27b9eaeafeb009bca442a3078a4..18fc1085ad6d6dae3576fd676a8db4a23c17ed02 100644
--- a/Source/modules/webmidi/MIDIAccessInitializer.cpp
+++ b/Source/modules/webmidi/MIDIAccessInitializer.cpp
@@ -22,6 +22,10 @@ MIDIAccessInitializer::MIDIAccessInitializer(ScriptState* scriptState, const MID
, m_requestSysex(false)
{
#if ENABLE(OILPAN)
+ // A prefinalizer has already been registered (as a LifecycleObserver);
+ // remove it and register a combined one, as the infrastructure doesn't
+ // support multiple prefinalizers for an object.
haraken 2015/01/28 09:53:10 Shall we add a FIXME?
sof 2015/01/28 09:56:42 Can do that, what did you have in mind? i.e., mult
haraken 2015/01/28 10:01:36 Avoid multiple prefinalizers and add an ASSERT abo
sof 2015/01/28 10:56:38 Done.
+ ThreadState::current()->unregisterPreFinalizer(*this);
kouhei (in TOK) 2015/01/28 09:58:04 How about ThreadState::current()->unregisterPreFin
sof 2015/01/28 10:56:38 Done.
ThreadState::current()->registerPreFinalizer(*this);
#endif
if (options.hasSysex())
@@ -42,6 +46,11 @@ void MIDIAccessInitializer::dispose()
ASSERT(document);
if (MIDIController* controller = MIDIController::from(document->frame()))
controller->cancelSysexPermissionRequest(this);
+
+#if ENABLE(OILPAN)
+ // Delegate to LifecycleObserver's prefinalizer.
+ LifecycleObserver::dispose();
+#endif
}
ScriptPromise MIDIAccessInitializer::start()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698