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

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

Issue 2518933002: Remove RELEASE_NOTREACHED(). (Closed)
Patch Set: Created 4 years, 1 month 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) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 // Start rendering and return the promise. 202 // Start rendering and return the promise.
203 m_isRenderingStarted = true; 203 m_isRenderingStarted = true;
204 setContextState(Running); 204 setContextState(Running);
205 destinationHandler().startRendering(); 205 destinationHandler().startRendering();
206 206
207 return m_completeResolver->promise(); 207 return m_completeResolver->promise();
208 } 208 }
209 209
210 ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState) { 210 ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState) {
211 // This CANNOT be called on OfflineAudioContext; this is only to implement 211 LOG(FATAL) << "This CANNOT be called on OfflineAudioContext; this is only to "
212 // the pure virtual interface from BaseAudioContext. 212 "implement the pure virtual interface from BaseAudioContext.";
213 RELEASE_NOTREACHED();
214
215 return ScriptPromise(); 213 return ScriptPromise();
216 } 214 }
217 215
218 ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState, 216 ScriptPromise OfflineAudioContext::suspendContext(ScriptState* scriptState,
219 double when) { 217 double when) {
220 DCHECK(isMainThread()); 218 DCHECK(isMainThread());
221 219
222 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); 220 ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
223 ScriptPromise promise = resolver->promise(); 221 ScriptPromise promise = resolver->promise();
224 222
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 434
437 // Note that the GraphLock is required before this check. Since this needs 435 // Note that the GraphLock is required before this check. Since this needs
438 // to run on the audio thread, OfflineGraphAutoLocker must be used. 436 // to run on the audio thread, OfflineGraphAutoLocker must be used.
439 if (m_scheduledSuspends.contains(currentSampleFrame())) 437 if (m_scheduledSuspends.contains(currentSampleFrame()))
440 return true; 438 return true;
441 439
442 return false; 440 return false;
443 } 441 }
444 442
445 } // namespace blink 443 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/FetchManager.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698