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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp

Issue 1979953002: Remove OwnPtr::release() calls in modules/ (part 3). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (audioTracks.isEmpty()) { 302 if (audioTracks.isEmpty()) {
303 exceptionState.throwDOMException( 303 exceptionState.throwDOMException(
304 InvalidStateError, 304 InvalidStateError,
305 "MediaStream has no audio track"); 305 "MediaStream has no audio track");
306 return nullptr; 306 return nullptr;
307 } 307 }
308 308
309 // Use the first audio track in the media stream. 309 // Use the first audio track in the media stream.
310 MediaStreamTrack* audioTrack = audioTracks[0]; 310 MediaStreamTrack* audioTrack = audioTracks[0];
311 OwnPtr<AudioSourceProvider> provider = audioTrack->createWebAudioSource(); 311 OwnPtr<AudioSourceProvider> provider = audioTrack->createWebAudioSource();
312 MediaStreamAudioSourceNode* node = MediaStreamAudioSourceNode::create(*this, *mediaStream, audioTrack, provider.release()); 312 MediaStreamAudioSourceNode* node = MediaStreamAudioSourceNode::create(*this, *mediaStream, audioTrack, std::move(provider));
313 313
314 // FIXME: Only stereo streams are supported right now. We should be able to accept multi-channel streams. 314 // FIXME: Only stereo streams are supported right now. We should be able to accept multi-channel streams.
315 node->setFormat(2, sampleRate()); 315 node->setFormat(2, sampleRate());
316 316
317 notifySourceNodeStartedProcessing(node); // context keeps reference until no de is disconnected 317 notifySourceNodeStartedProcessing(node); // context keeps reference until no de is disconnected
318 return node; 318 return node;
319 } 319 }
320 320
321 MediaStreamAudioDestinationNode* AbstractAudioContext::createMediaStreamDestinat ion(ExceptionState& exceptionState) 321 MediaStreamAudioDestinationNode* AbstractAudioContext::createMediaStreamDestinat ion(ExceptionState& exceptionState)
322 { 322 {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 976
977 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const 977 SecurityOrigin* AbstractAudioContext::getSecurityOrigin() const
978 { 978 {
979 if (getExecutionContext()) 979 if (getExecutionContext())
980 return getExecutionContext()->getSecurityOrigin(); 980 return getExecutionContext()->getSecurityOrigin();
981 981
982 return nullptr; 982 return nullptr;
983 } 983 }
984 984
985 } // namespace blink 985 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698