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

Unified Diff: third_party/WebKit/Source/core/geometry/DOMMatrix.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/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 799107e0add538f027b79ce5939182fd056abc30..3dc15d7929111e2723e3f8769401a51ef0541f2a 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* float32_array,
+DOMMatrix* DOMMatrix::fromFloat32Array(NotShared<DOMFloat32Array> float32_array,
ExceptionState& exception_state) {
- if (float32_array->length() != 6 && float32_array->length() != 16) {
+ if (float32_array.View()->length() != 6 &&
+ float32_array.View()->length() != 16) {
exception_state.ThrowTypeError(
"The sequence must contain 6 elements for a 2D matrix or 16 elements "
"for a 3D matrix.");
return nullptr;
}
- return new DOMMatrix(float32_array->Data(), float32_array->length());
+ return new DOMMatrix(float32_array.View()->Data(),
+ float32_array.View()->length());
}
-DOMMatrix* DOMMatrix::fromFloat64Array(DOMFloat64Array* float64_array,
+DOMMatrix* DOMMatrix::fromFloat64Array(NotShared<DOMFloat64Array> float64_array,
ExceptionState& exception_state) {
- if (float64_array->length() != 6 && float64_array->length() != 16) {
+ if (float64_array.View()->length() != 6 &&
+ float64_array.View()->length() != 16) {
exception_state.ThrowTypeError(
"The sequence must contain 6 elements for a 2D matrix or 16 elements "
"for a 3D matrix.");
return nullptr;
}
- return new DOMMatrix(float64_array->Data(), float64_array->length());
+ return new DOMMatrix(float64_array.View()->Data(),
+ float64_array.View()->length());
}
template <typename T>
« no previous file with comments | « third_party/WebKit/Source/core/geometry/DOMMatrix.h ('k') | third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698