Changeset 209207 in webkit
- Timestamp:
- Dec 1, 2016 2:23:47 PM (7 years ago)
- Location:
- branches/safari-602-branch
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-602-branch/LayoutTests/ChangeLog
r208715 r209207 1 2016-12-01 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r208628. rdar://problem/29277337 4 5 2016-11-11 Brent Fulgham <bfulgham@apple.com> 6 7 Neutered ArrayBuffers are not properly serialized 8 https://bugs.webkit.org/show_bug.cgi?id=164647 9 <rdar://problem/29213490> 10 11 Reviewed by David Kilzer. 12 13 * fast/canvas/neutered-imagedata-expected.txt: Added. 14 * fast/canvas/neutered-imagedata.html: Added. 15 1 16 2016-11-14 Matthew Hanson <matthew_hanson@apple.com> 2 17 -
branches/safari-602-branch/Source/WebCore/ChangeLog
r209046 r209207 1 2016-12-01 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r208628. rdar://problem/29277337 4 5 2016-11-11 Brent Fulgham <bfulgham@apple.com> 6 7 Neutered ArrayBuffers are not properly serialized 8 https://bugs.webkit.org/show_bug.cgi?id=164647 9 <rdar://problem/29213490> 10 11 Reviewed by David Kilzer. 12 13 Correct binding logic to handle ImageBuffers being deserialized from neutered ArrayBuffers. 14 15 Test: fast/canvas/neutered-imagedata.html 16 17 * bindings/js/SerializedScriptValue.cpp: 18 (WebCore::CloneDeserializer::readTerminal): 19 1 20 2016-11-28 Matthew Hanson <matthew_hanson@apple.com> 2 21 -
branches/safari-602-branch/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r202890 r209207 2270 2270 if (!read(length)) 2271 2271 return JSValue(); 2272 if (m_end < ((uint8_t*)0) + length || m_ptr > m_end -length) {2272 if (m_end - m_ptr < length) { 2273 2273 fail(); 2274 2274 return JSValue(); … … 2278 2278 return jsNull(); 2279 2279 } 2280 RefPtr<ImageData> result = ImageData::create(IntSize(width, height)); 2281 memcpy(result->data()->data(), m_ptr, length); 2280 IntSize imageSize(width, height); 2281 RELEASE_ASSERT(!length || (imageSize.area() * 4).unsafeGet() <= length); 2282 RefPtr<ImageData> result = ImageData::create(imageSize); 2283 if (!result) { 2284 fail(); 2285 return JSValue(); 2286 } 2287 if (length) 2288 memcpy(result->data()->data(), m_ptr, length); 2289 else 2290 result->data()->zeroFill(); 2282 2291 m_ptr += length; 2283 2292 return getJSValue(result.get());
Note: See TracChangeset
for help on using the changeset viewer.