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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO 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 cb436c239f1d32913dc4ab4dfbccbfb53536249f..cc469ed134467333121ad7f329376778484e448c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
@@ -469,17 +469,17 @@ AudioParam* AudioParam::setTargetAtTime(float target,
return this;
}
-AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
+AudioParam* AudioParam::setValueCurveAtTime(NotShared<DOMFloat32Array> curve,
double time,
double duration,
ExceptionState& exception_state) {
- float* curve_data = curve->Data();
+ float* curve_data = 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 = curve_data[k];
if (!std::isfinite(value)) {
@@ -494,7 +494,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 = curve_data[k];
if (value < min || value > max) {
@@ -503,7 +503,7 @@ AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
}
}
- Handler().Timeline().SetValueCurveAtTime(curve, time, duration,
+ Handler().Timeline().SetValueCurveAtTime(curve.View(), time, duration,
exception_state);
// We could update the histogram with every value in the curve, due to

Powered by Google App Engine
This is Rietveld 408576698