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

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

Issue 2812833003: Revert of [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: 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/DOMMatrixReadOnly.cpp
diff --git a/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp b/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp
index fd09781ae4727015e83006bf86f86971163d5b6c..0d788c76e0b2ae0590a912d15efee7ff9e60ed69 100644
--- a/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp
+++ b/third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.cpp
@@ -115,31 +115,27 @@
}
DOMMatrixReadOnly* DOMMatrixReadOnly::fromFloat32Array(
- NotShared<DOMFloat32Array> float32_array,
+ DOMFloat32Array* float32_array,
ExceptionState& exception_state) {
- if (float32_array.View()->length() != 6 &&
- float32_array.View()->length() != 16) {
+ if (float32_array->length() != 6 && float32_array->length() != 16) {
exception_state.ThrowTypeError(
"The sequence must contain 6 elements for a 2D matrix or 16 elements a "
"for 3D matrix.");
return nullptr;
}
- return new DOMMatrixReadOnly(float32_array.View()->Data(),
- float32_array.View()->length());
+ return new DOMMatrixReadOnly(float32_array->Data(), float32_array->length());
}
DOMMatrixReadOnly* DOMMatrixReadOnly::fromFloat64Array(
- NotShared<DOMFloat64Array> float64_array,
+ DOMFloat64Array* float64_array,
ExceptionState& exception_state) {
- if (float64_array.View()->length() != 6 &&
- float64_array.View()->length() != 16) {
+ if (float64_array->length() != 6 && float64_array->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 DOMMatrixReadOnly(float64_array.View()->Data(),
- float64_array.View()->length());
+ return new DOMMatrixReadOnly(float64_array->Data(), float64_array->length());
}
DOMMatrixReadOnly* DOMMatrixReadOnly::fromMatrix(
@@ -279,7 +275,7 @@
is2d_ = is2d;
}
-NotShared<DOMFloat32Array> DOMMatrixReadOnly::toFloat32Array() const {
+DOMFloat32Array* DOMMatrixReadOnly::toFloat32Array() const {
float array[] = {
static_cast<float>(matrix_->M11()), static_cast<float>(matrix_->M12()),
static_cast<float>(matrix_->M13()), static_cast<float>(matrix_->M14()),
@@ -290,17 +286,17 @@
static_cast<float>(matrix_->M41()), static_cast<float>(matrix_->M42()),
static_cast<float>(matrix_->M43()), static_cast<float>(matrix_->M44())};
- return NotShared<DOMFloat32Array>(DOMFloat32Array::Create(array, 16));
-}
-
-NotShared<DOMFloat64Array> DOMMatrixReadOnly::toFloat64Array() const {
+ return DOMFloat32Array::Create(array, 16);
+}
+
+DOMFloat64Array* DOMMatrixReadOnly::toFloat64Array() const {
double array[] = {
matrix_->M11(), matrix_->M12(), matrix_->M13(), matrix_->M14(),
matrix_->M21(), matrix_->M22(), matrix_->M23(), matrix_->M24(),
matrix_->M31(), matrix_->M32(), matrix_->M33(), matrix_->M34(),
matrix_->M41(), matrix_->M42(), matrix_->M43(), matrix_->M44()};
- return NotShared<DOMFloat64Array>(DOMFloat64Array::Create(array, 16));
+ return DOMFloat64Array::Create(array, 16);
}
const String DOMMatrixReadOnly::toString() const {
« no previous file with comments | « third_party/WebKit/Source/core/geometry/DOMMatrixReadOnly.h ('k') | third_party/WebKit/Source/core/html/ImageData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698