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

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

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: Created 3 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 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..cbe169bcf78111f6d4ad9a8f536a0e68381a7a0e 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
@@ -467,10 +467,18 @@ AudioParam* AudioParam::setTargetAtTime(float target,
return this;
}
-AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve,
- double time,
- double duration,
- ExceptionState& exceptionState) {
+AudioParam* AudioParam::setValueCurveAtTime(
+ const MaybeShared<DOMFloat32Array>& maybeShared,
+ double time,
+ double duration,
+ ExceptionState& exceptionState) {
+ if (maybeShared.isShared()) {
+ exceptionState.throwTypeError(
+ "The provided curve is backed by a SharedArrayBuffer.");
Raymond Toy 2017/03/06 20:06:33 DBC: Can we be consistent with the error messages
binji 2017/03/14 21:27:35 Yes, I was trying to be consistent with other erro
+ return nullptr;
+ }
+ DOMFloat32Array* curve = maybeShared.viewNotShared();
+
float* curveData = curve->data();
float min = minValue();
float max = maxValue();
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioParam.h ('k') | third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698