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

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

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 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
« no previous file with comments | « Source/modules/webaudio/RealtimeAnalyser.cpp ('k') | Source/modules/webusb/USB.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MIDIAccessInitializer_h 5 #ifndef MIDIAccessInitializer_h
6 #define MIDIAccessInitializer_h 6 #define MIDIAccessInitializer_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 22 matching lines...) Expand all
33 : id(id) 33 : id(id)
34 , manufacturer(manufacturer) 34 , manufacturer(manufacturer)
35 , name(name) 35 , name(name)
36 , type(type) 36 , type(type)
37 , version(version) 37 , version(version)
38 , state(state) { } 38 , state(state) { }
39 }; 39 };
40 40
41 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti ons) 41 static ScriptPromise start(ScriptState* scriptState, const MIDIOptions& opti ons)
42 { 42 {
43 RefPtrWillBeRawPtr<MIDIAccessInitializer> resolver = adoptRefWillBeNoop( new MIDIAccessInitializer(scriptState, options)); 43 MIDIAccessInitializer* resolver = new MIDIAccessInitializer(scriptState, options);
44 resolver->keepAliveWhilePending(); 44 resolver->keepAliveWhilePending();
45 resolver->suspendIfNeeded(); 45 resolver->suspendIfNeeded();
46 return resolver->start(); 46 return resolver->start();
47 } 47 }
48 48
49 ~MIDIAccessInitializer() override; 49 ~MIDIAccessInitializer() override;
50 50
51 // Eager finalization to allow dispose() operation access 51 // Eager finalization to allow dispose() operation access
52 // other (non eager) heap objects. 52 // other (non eager) heap objects.
53 EAGERLY_FINALIZE(); 53 EAGERLY_FINALIZE();
(...skipping 21 matching lines...) Expand all
75 OwnPtr<MIDIAccessor> m_accessor; 75 OwnPtr<MIDIAccessor> m_accessor;
76 Vector<PortDescriptor> m_portDescriptors; 76 Vector<PortDescriptor> m_portDescriptors;
77 bool m_requestSysex; 77 bool m_requestSysex;
78 bool m_hasBeenDisposed; 78 bool m_hasBeenDisposed;
79 bool m_sysexPermissionResolved; 79 bool m_sysexPermissionResolved;
80 }; 80 };
81 81
82 } // namespace blink 82 } // namespace blink
83 83
84 #endif // MIDIAccessInitializer_h 84 #endif // MIDIAccessInitializer_h
OLDNEW
« no previous file with comments | « Source/modules/webaudio/RealtimeAnalyser.cpp ('k') | Source/modules/webusb/USB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698