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

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

Issue 179643002: Fixing some exception message typos in webaudio/AnalyzerNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 if (inputBus != outputBus) 68 if (inputBus != outputBus)
69 outputBus->copyFrom(*inputBus); 69 outputBus->copyFrom(*inputBus);
70 } 70 }
71 71
72 void AnalyserNode::setFftSize(unsigned size, ExceptionState& exceptionState) 72 void AnalyserNode::setFftSize(unsigned size, ExceptionState& exceptionState)
73 { 73 {
74 if (!m_analyser.setFftSize(size)) { 74 if (!m_analyser.setFftSize(size)) {
75 exceptionState.throwDOMException( 75 exceptionState.throwDOMException(
76 IndexSizeError, 76 IndexSizeError,
77 (size < RealtimeAnalyser::MinFFTSize || size > RealtimeAnalyser::Max FFTSize) ? 77 (size < RealtimeAnalyser::MinFFTSize || size > RealtimeAnalyser::Max FFTSize) ?
78 ExceptionMessages::indexOutsideRange("FTT size", size, RealtimeA nalyser::MinFFTSize, ExceptionMessages::InclusiveBound, RealtimeAnalyser::MaxFFT Size, ExceptionMessages::InclusiveBound) 78 ExceptionMessages::indexOutsideRange("FFT size", size, RealtimeA nalyser::MinFFTSize, ExceptionMessages::InclusiveBound, RealtimeAnalyser::MaxFFT Size, ExceptionMessages::InclusiveBound)
79 : ("The value provided (" + String::number(size) + " is not a po wer of two.")); 79 : ("The value provided (" + String::number(size) + ") is not a p ower of two."));
80 } 80 }
81 } 81 }
82 82
83 void AnalyserNode::setMinDecibels(float k, ExceptionState& exceptionState) 83 void AnalyserNode::setMinDecibels(float k, ExceptionState& exceptionState)
84 { 84 {
85 if (k <= maxDecibels()) { 85 if (k <= maxDecibels()) {
86 m_analyser.setMinDecibels(k); 86 m_analyser.setMinDecibels(k);
87 } else { 87 } else {
88 exceptionState.throwDOMException( 88 exceptionState.throwDOMException(
89 IndexSizeError, 89 IndexSizeError,
(...skipping 19 matching lines...) Expand all
109 } else { 109 } else {
110 exceptionState.throwDOMException( 110 exceptionState.throwDOMException(
111 IndexSizeError, 111 IndexSizeError,
112 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0f, Exc eptionMessages::InclusiveBound, 1.0f, ExceptionMessages::InclusiveBound)); 112 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0f, Exc eptionMessages::InclusiveBound, 1.0f, ExceptionMessages::InclusiveBound));
113 } 113 }
114 } 114 }
115 115
116 } // namespace WebCore 116 } // namespace WebCore
117 117
118 #endif // ENABLE(WEB_AUDIO) 118 #endif // ENABLE(WEB_AUDIO)
OLDNEW
« no previous file with comments | « LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698