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

Unified Diff: third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp

Issue 2251493003: Adding nullability support to ImageBitmapRenderingContext.transferImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/modules/imagebitmap/ImageBitmapRenderingContext.cpp
diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
index 20b6491e85010f2bf0c79c649415f7e6e0351a80..da01d05da34c31c42930c9f8750b29491e36b2aa 100644
--- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.cpp
@@ -27,6 +27,9 @@ void ImageBitmapRenderingContext::setCanvasGetContextResult(RenderingContext& re
void ImageBitmapRenderingContext::transferFromImageBitmap(ImageBitmap* imageBitmap)
{
+ if (!imageBitmap)
+ return;
Justin Novosad 2016/08/16 19:38:55 This is not the correct behavior. Passing null is
zakerinasab 2016/08/16 20:34:49 Done.
+
m_image = imageBitmap->bitmapImage();
if (!m_image)
return;

Powered by Google App Engine
This is Rietveld 408576698