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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: remove unused checks Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
index e1eb9bebba9a0c8efc9e94fb9d0eb479c77357cc..79a63c7e576aa5a62bbe563e3a70ab85c4a91944 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
@@ -467,17 +467,18 @@ AudioParam* AudioParam::setTargetAtTime(float target,
return this;
}
-AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
- double time,
- double duration,
- ExceptionState& exceptionState) {
- float* curveData = curve->data();
+AudioParam* AudioParam::setValueCurveAtTime(
+ const NotShared<DOMFloat32Array>& curve,
+ double time,
+ double duration,
+ ExceptionState& exceptionState) {
+ float* curveData = curve.view()->data();
float min = minValue();
float max = maxValue();
// First, find any non-finite value in the curve and throw an exception if
// there are any.
- for (unsigned k = 0; k < curve->length(); ++k) {
+ for (unsigned k = 0; k < curve.view()->length(); ++k) {
float value = curveData[k];
if (!std::isfinite(value)) {
@@ -492,7 +493,7 @@ AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
// Second, find the first value in the curve (if any) that is outside the
// nominal range. It's probably not necessary to produce a warning on every
// value outside the nominal range.
- for (unsigned k = 0; k < curve->length(); ++k) {
+ for (unsigned k = 0; k < curve.view()->length(); ++k) {
float value = curveData[k];
if (value < min || value > max) {
@@ -501,7 +502,7 @@ AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
}
}
- handler().timeline().setValueCurveAtTime(curve, time, duration,
+ handler().timeline().setValueCurveAtTime(curve.view(), time, duration,
exceptionState);
// We could update the histogram with every value in the curve, due to

Powered by Google App Engine
This is Rietveld 408576698