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

Side by Side Diff: Source/modules/webaudio/AudioContext.cpp

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 } 359 }
360 360
361 return audioBuffer; 361 return audioBuffer;
362 } 362 }
363 363
364 void AudioContext::decodeAudioData(ArrayBuffer* audioData, PassOwnPtr<AudioBuffe rCallback> successCallback, PassOwnPtr<AudioBufferCallback> errorCallback, Excep tionState& exceptionState) 364 void AudioContext::decodeAudioData(ArrayBuffer* audioData, PassOwnPtr<AudioBuffe rCallback> successCallback, PassOwnPtr<AudioBufferCallback> errorCallback, Excep tionState& exceptionState)
365 { 365 {
366 if (!audioData) { 366 if (!audioData) {
367 exceptionState.throwDOMException( 367 exceptionState.throwDOMException(
368 SyntaxError, 368 SyntaxError,
369 ExceptionMessages::failedToExecute( 369 "invalid ArrayBuffer for audioData.");
370 "decodeAudioData",
371 "AudioContext",
372 "invalid ArrayBuffer for audioData."));
373 return; 370 return;
374 } 371 }
375 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa llback); 372 m_audioDecoder.decodeAsync(audioData, sampleRate(), successCallback, errorCa llback);
376 } 373 }
377 374
378 PassRefPtr<AudioBufferSourceNode> AudioContext::createBufferSource() 375 PassRefPtr<AudioBufferSourceNode> AudioContext::createBufferSource()
379 { 376 {
380 ASSERT(isMainThread()); 377 ASSERT(isMainThread());
381 lazyInitialize(); 378 lazyInitialize();
382 RefPtr<AudioBufferSourceNode> node = AudioBufferSourceNode::create(this, m_d estinationNode->sampleRate()); 379 RefPtr<AudioBufferSourceNode> node = AudioBufferSourceNode::create(this, m_d estinationNode->sampleRate());
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 } 1099 }
1103 1100
1104 void AudioContext::decrementActiveSourceCount() 1101 void AudioContext::decrementActiveSourceCount()
1105 { 1102 {
1106 atomicDecrement(&m_activeSourceCount); 1103 atomicDecrement(&m_activeSourceCount);
1107 } 1104 }
1108 1105
1109 } // namespace WebCore 1106 } // namespace WebCore
1110 1107
1111 #endif // ENABLE(WEB_AUDIO) 1108 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « Source/modules/webaudio/AudioBufferSourceNode.cpp ('k') | Source/modules/webaudio/AudioNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698