Index: third_party/WebKit/Source/core/html/ImageData.cpp |
diff --git a/third_party/WebKit/Source/core/html/ImageData.cpp b/third_party/WebKit/Source/core/html/ImageData.cpp |
index 91a16a09966187dfd1252198bfc0d9bac2aa5b42..b42e161b4dcd789ac903e81e86824386e446a959 100644 |
--- a/third_party/WebKit/Source/core/html/ImageData.cpp |
+++ b/third_party/WebKit/Source/core/html/ImageData.cpp |
@@ -229,12 +229,13 @@ ImageData* ImageData::Create(const IntSize& size, |
} |
ImageData* ImageData::Create(const IntSize& size, |
- DOMArrayBufferView* data_array, |
+ NotShared<DOMArrayBufferView> data_array, |
const ImageDataColorSettings* color_settings) { |
- if (!ImageData::ValidateConstructorArguments( |
- kParamSize | kParamData, &size, 0, 0, data_array, color_settings)) |
+ if (!ImageData::ValidateConstructorArguments(kParamSize | kParamData, &size, |
+ 0, 0, data_array.View(), |
+ color_settings)) |
return nullptr; |
- return new ImageData(size, data_array, color_settings); |
+ return new ImageData(size, data_array.View(), color_settings); |
} |
ImageData* ImageData::Create(unsigned width, |
@@ -251,28 +252,28 @@ ImageData* ImageData::Create(unsigned width, |
: nullptr; |
} |
-ImageData* ImageData::Create(DOMUint8ClampedArray* data, |
+ImageData* ImageData::Create(NotShared<DOMUint8ClampedArray> data, |
unsigned width, |
ExceptionState& exception_state) { |
if (!ImageData::ValidateConstructorArguments(kParamData | kParamWidth, |
- nullptr, width, 0, data, nullptr, |
- &exception_state)) |
+ nullptr, width, 0, data.View(), |
+ nullptr, &exception_state)) |
return nullptr; |
- unsigned height = data->length() / (width * 4); |
- return new ImageData(IntSize(width, height), data); |
+ unsigned height = data.View()->length() / (width * 4); |
+ return new ImageData(IntSize(width, height), data.View()); |
} |
-ImageData* ImageData::Create(DOMUint8ClampedArray* data, |
+ImageData* ImageData::Create(NotShared<DOMUint8ClampedArray> data, |
unsigned width, |
unsigned height, |
ExceptionState& exception_state) { |
if (!ImageData::ValidateConstructorArguments( |
- kParamData | kParamWidth | kParamHeight, nullptr, width, height, data, |
- nullptr, &exception_state)) |
+ kParamData | kParamWidth | kParamHeight, nullptr, width, height, |
+ data.View(), nullptr, &exception_state)) |
return nullptr; |
- return new ImageData(IntSize(width, height), data); |
+ return new ImageData(IntSize(width, height), data.View()); |
} |
ImageData* ImageData::createImageData( |
@@ -308,13 +309,13 @@ ImageData* ImageData::createImageData(ImageDataArray& data, |
String storage_format_name; |
if (data.isUint8ClampedArray()) { |
- buffer_view = data.getAsUint8ClampedArray(); |
+ buffer_view = data.getAsUint8ClampedArray().View(); |
storage_format_name = kUint8ClampedArrayStorageFormatName; |
} else if (data.isUint16Array()) { |
- buffer_view = data.getAsUint16Array(); |
+ buffer_view = data.getAsUint16Array().View(); |
storage_format_name = kUint16ArrayStorageFormatName; |
} else if (data.isFloat32Array()) { |
- buffer_view = data.getAsFloat32Array(); |
+ buffer_view = data.getAsFloat32Array().View(); |
storage_format_name = kFloat32ArrayStorageFormatName; |
} else { |
NOTREACHED(); |