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

Side by Side Diff: Source/modules/audio_output_devices/SetSinkIdCallbacks.cpp

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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "config.h" 5 #include "config.h"
6 #include "modules/audio_output_devices/SetSinkIdCallbacks.h" 6 #include "modules/audio_output_devices/SetSinkIdCallbacks.h"
7 7
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" 9 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h"
10 #include "platform/Logging.h" 10 #include "platform/Logging.h"
11 #include "public/platform/WebSetSinkIdError.h" 11 #include "public/platform/WebSetSinkIdError.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 SetSinkIdCallbacks::SetSinkIdCallbacks(PassRefPtrWillBeRawPtr<ScriptPromiseResol ver> resolver, HTMLMediaElement& element, const String& sinkId) 15 SetSinkIdCallbacks::SetSinkIdCallbacks(ScriptPromiseResolver* resolver, HTMLMedi aElement& element, const String& sinkId)
16 : m_resolver(resolver) 16 : m_resolver(resolver)
17 , m_element(element) 17 , m_element(element)
18 , m_sinkId(sinkId) 18 , m_sinkId(sinkId)
19 { 19 {
20 ASSERT(m_resolver); 20 ASSERT(m_resolver);
21 WTF_LOG(Media, __FUNCTION__); 21 WTF_LOG(Media, __FUNCTION__);
22 } 22 }
23 23
24 SetSinkIdCallbacks::~SetSinkIdCallbacks() 24 SetSinkIdCallbacks::~SetSinkIdCallbacks()
25 { 25 {
(...skipping 29 matching lines...) Expand all
55 break; 55 break;
56 case WebSetSinkIdError::ErrorTypeAbort: 56 case WebSetSinkIdError::ErrorTypeAbort:
57 m_resolver->reject(DOMException::create(AbortError, error->message)); 57 m_resolver->reject(DOMException::create(AbortError, error->message));
58 break; 58 break;
59 default: 59 default:
60 ASSERT_NOT_REACHED(); 60 ASSERT_NOT_REACHED();
61 } 61 }
62 } 62 }
63 63
64 } // namespace blink 64 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/audio_output_devices/SetSinkIdCallbacks.h ('k') | Source/modules/background_sync/PeriodicSyncManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698