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

Side by Side Diff: Source/modules/webmidi/MIDIAccess.h

Issue 1179143002: Oilpan: eagerly finalize MIDIAccess. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 { 86 {
87 // This method is for MIDIAccess initialization: MIDIAccessInitializer 87 // This method is for MIDIAccess initialization: MIDIAccessInitializer
88 // has the implementation. 88 // has the implementation.
89 ASSERT_NOT_REACHED(); 89 ASSERT_NOT_REACHED();
90 } 90 }
91 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_ t length, double timeStamp) override; 91 void didReceiveMIDIData(unsigned portIndex, const unsigned char* data, size_ t length, double timeStamp) override;
92 92
93 // |timeStampInMilliseconds| is in the same time coordinate system as perfor mance.now(). 93 // |timeStampInMilliseconds| is in the same time coordinate system as perfor mance.now().
94 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStampInMilliseconds); 94 void sendMIDIData(unsigned portIndex, const unsigned char* data, size_t leng th, double timeStampInMilliseconds);
95 95
96 // Eager finalization needed to promptly release m_accessor. Otherwise
97 // its client back reference could end up being unsafely used during
98 // the lazy sweeping phase.
99 EAGERLY_FINALIZE();
96 DECLARE_VIRTUAL_TRACE(); 100 DECLARE_VIRTUAL_TRACE();
97 101
98 private: 102 private:
99 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc essInitializer::PortDescriptor>&, ExecutionContext*); 103 MIDIAccess(PassOwnPtr<MIDIAccessor>, bool sysexEnabled, const Vector<MIDIAcc essInitializer::PortDescriptor>&, ExecutionContext*);
100 104
101 OwnPtr<MIDIAccessor> m_accessor; 105 OwnPtr<MIDIAccessor> m_accessor;
102 bool m_sysexEnabled; 106 bool m_sysexEnabled;
103 bool m_hasPendingActivity; 107 bool m_hasPendingActivity;
104 HeapVector<Member<MIDIInput>> m_inputs; 108 HeapVector<Member<MIDIInput>> m_inputs;
105 HeapVector<Member<MIDIOutput>> m_outputs; 109 HeapVector<Member<MIDIOutput>> m_outputs;
106 }; 110 };
107 111
108 } // namespace blink 112 } // namespace blink
109 113
110 #endif // MIDIAccess_h 114 #endif // MIDIAccess_h
OLDNEW
« 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