| 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..13a4aaa4cca35ca3e2b541bcd2c1fd9fa386eeea 100644
|
| --- a/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
|
| +++ b/third_party/WebKit/Source/core/geometry/DOMMatrix.cpp
|
| @@ -39,26 +39,32 @@ DOMMatrix* DOMMatrix::create(Vector<double> sequence,
|
| return new DOMMatrix(sequence, sequence.size());
|
| }
|
|
|
| -DOMMatrix* DOMMatrix::fromFloat32Array(DOMFloat32Array* float32Array,
|
| - ExceptionState& exceptionState) {
|
| - if (float32Array->length() != 6 && float32Array->length() != 16) {
|
| +DOMMatrix* DOMMatrix::fromFloat32Array(
|
| + const NotShared<DOMFloat32Array>& float32Array,
|
| + ExceptionState& exceptionState) {
|
| + 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,
|
| - ExceptionState& exceptionState) {
|
| - if (float64Array->length() != 6 && float64Array->length() != 16) {
|
| +DOMMatrix* DOMMatrix::fromFloat64Array(
|
| + const NotShared<DOMFloat64Array>& float64Array,
|
| + ExceptionState& exceptionState) {
|
| + 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>
|
|
|