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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/MediaSource.cpp

Issue 1978173002: Remove OwnPtr::release() calls in modules/ (part 2). (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) 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 String codecs = contentType.parameter("codecs"); 148 String codecs = contentType.parameter("codecs");
149 OwnPtr<WebSourceBuffer> webSourceBuffer = createWebSourceBuffer(contentType. type(), codecs, exceptionState); 149 OwnPtr<WebSourceBuffer> webSourceBuffer = createWebSourceBuffer(contentType. type(), codecs, exceptionState);
150 150
151 if (!webSourceBuffer) { 151 if (!webSourceBuffer) {
152 ASSERT(exceptionState.code() == NotSupportedError || exceptionState.code () == QuotaExceededError); 152 ASSERT(exceptionState.code() == NotSupportedError || exceptionState.code () == QuotaExceededError);
153 // 2. If type contains a MIME type that is not supported ..., then throw a NotSupportedError exception and abort these steps. 153 // 2. If type contains a MIME type that is not supported ..., then throw a NotSupportedError exception and abort these steps.
154 // 3. If the user agent can't handle any more SourceBuffer objects then throw a QuotaExceededError exception and abort these steps 154 // 3. If the user agent can't handle any more SourceBuffer objects then throw a QuotaExceededError exception and abort these steps
155 return 0; 155 return 0;
156 } 156 }
157 157
158 SourceBuffer* buffer = SourceBuffer::create(webSourceBuffer.release(), this, m_asyncEventQueue.get()); 158 SourceBuffer* buffer = SourceBuffer::create(std::move(webSourceBuffer), this , m_asyncEventQueue.get());
159 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object. 159 // 6. Add the new object to sourceBuffers and fire a addsourcebuffer on that object.
160 m_sourceBuffers->add(buffer); 160 m_sourceBuffers->add(buffer);
161 161
162 // 7. Return the new object to the caller. 162 // 7. Return the new object to the caller.
163 WTF_LOG(Media, "MediaSource::addSourceBuffer(%s) %p -> %p", type.ascii().dat a(), this, buffer); 163 WTF_LOG(Media, "MediaSource::addSourceBuffer(%s) %p -> %p", type.ascii().dat a(), this, buffer);
164 return buffer; 164 return buffer;
165 } 165 }
166 166
167 void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionState& excep tionState) 167 void MediaSource::removeSourceBuffer(SourceBuffer* buffer, ExceptionState& excep tionState)
168 { 168 {
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 612
613 m_asyncEventQueue->enqueueEvent(event); 613 m_asyncEventQueue->enqueueEvent(event);
614 } 614 }
615 615
616 URLRegistry& MediaSource::registry() const 616 URLRegistry& MediaSource::registry() const
617 { 617 {
618 return MediaSourceRegistry::registry(); 618 return MediaSourceRegistry::registry();
619 } 619 }
620 620
621 } // namespace blink 621 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698