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

Unified Diff: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp

Issue 1841313003: Reject promise with InvalidStateError instead of null in createImageBitmap(Blob) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/resources/canvas-createImageBitmap-invalid-blob-in-workers.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
diff --git a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
index 08acf409fbc5e9e134c7eba0a6c7d4d1b3ba3d90..4b3964e4f9115c30ae93f942ab1f42643a8d7420 100644
--- a/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
+++ b/third_party/WebKit/Source/core/imagebitmap/ImageBitmapFactories.cpp
@@ -185,7 +185,7 @@ DEFINE_TRACE(ImageBitmapFactories)
void ImageBitmapFactories::ImageBitmapLoader::rejectPromise()
{
- m_resolver->reject(ScriptValue(m_resolver->getScriptState(), v8::Null(m_resolver->getScriptState()->isolate())));
+ m_resolver->reject(DOMException::create(InvalidStateError, "The source image cannot be decoded."));
m_factory->didFinishLoading(this);
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/canvas/resources/canvas-createImageBitmap-invalid-blob-in-workers.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698