Index: third_party/WebKit/Source/core/clipboard/DataTransfer.cpp |
diff --git a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp |
index 687b1a7a590cee7fdf19f10757d0d8db866788f0..3688ab421d272ba5ee317c11a00061c807e8532d 100644 |
--- a/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp |
+++ b/third_party/WebKit/Source/core/clipboard/DataTransfer.cpp |
@@ -212,15 +212,13 @@ FileList* DataTransfer::files() const |
return files; |
} |
-void DataTransfer::setDragImage(Element* image, int x, int y, ExceptionState& exceptionState) |
+void DataTransfer::setDragImage(Element* image, int x, int y) |
{ |
+ ASSERT(image); |
+ |
if (!isForDragAndDrop()) |
return; |
- if (!image) { |
- exceptionState.throwTypeError("setDragImage: Invalid first argument"); |
- return; |
- } |
IntPoint location(x, y); |
if (isHTMLImageElement(*image) && !image->inDocument()) |
setDragImageResource(toHTMLImageElement(*image).cachedImage(), location); |