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

Unified Diff: webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp

Issue 16617: Chrome side of webkit merge to 40124.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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: webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp
===================================================================
--- webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp (revision 8475)
+++ webkit/port/bindings/v8/V8CanvasPixelArrayCustom.cpp (working copy)
@@ -47,11 +47,15 @@
V8Proxy::ToNativeObject<CanvasPixelArray>(
V8ClassIndex::CANVASPIXELARRAY,
info.Holder());
-
+
if ((index < 0) || (index >= pixelBuffer->length())) {
return v8::Undefined();
}
- return v8::Number::New(pixelBuffer->get(index));
+ unsigned char result;
+ if (!pixelBuffer->get(index, result)) {
+ return v8::Undefined();
+ }
+ return v8::Number::New(result);
}
« no previous file with comments | « webkit/port/bindings/v8/CanvasPixelArray.idl ('k') | webkit/tools/layout_tests/test_lists/tests_fixable.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698