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

Unified Diff: third_party/WebKit/Source/core/geometry/DOMMatrix.cpp

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: add some layout tests 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/core/geometry/DOMMatrix.cpp
diff --git a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
index 8af26a523d5764c33f6f8c511de63ad41cf188c2..9be60d4f354b1e7f190d09cea0e5bfc5e2219e50 100644
--- a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
+++ b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
@@ -39,26 +39,30 @@ DOMMatrix* DOMMatrix::create(Vector<double> sequence,
return new DOMMatrix(sequence, sequence.size());
}
-DOMMatrix* DOMMatrix::fromFloat32Array(DOMFloat32Array* float32Array,
+DOMMatrix* DOMMatrix::fromFloat32Array(NotShared<DOMFloat32Array> float32Array,
ExceptionState& exceptionState) {
- if (float32Array->length() != 6 && float32Array->length() != 16) {
+ if (float32Array.view()->length() != 6 &&
+ float32Array.view()->length() != 16) {
exceptionState.throwTypeError(
"The sequence must contain 6 elements for a 2D matrix or 16 elements "
"for a 3D matrix.");
return nullptr;
}
- return new DOMMatrix(float32Array->data(), float32Array->length());
+ return new DOMMatrix(float32Array.view()->data(),
+ float32Array.view()->length());
}
-DOMMatrix* DOMMatrix::fromFloat64Array(DOMFloat64Array* float64Array,
+DOMMatrix* DOMMatrix::fromFloat64Array(NotShared<DOMFloat64Array> float64Array,
ExceptionState& exceptionState) {
- if (float64Array->length() != 6 && float64Array->length() != 16) {
+ if (float64Array.view()->length() != 6 &&
+ float64Array.view()->length() != 16) {
exceptionState.throwTypeError(
"The sequence must contain 6 elements for a 2D matrix or 16 elements "
"for a 3D matrix.");
return nullptr;
}
- return new DOMMatrix(float64Array->data(), float64Array->length());
+ return new DOMMatrix(float64Array.view()->data(),
+ float64Array.view()->length());
}
template <typename T>

Powered by Google App Engine
This is Rietveld 408576698