| Index: Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| diff --git a/Source/core/imagebitmap/ImageBitmapFactories.cpp b/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| index 148046f7de8c6c71750055cbc4e183d5954cb6e2..f635ee1fceec47d47b488d71a3ca4c9b2c91b063 100644
|
| --- a/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| +++ b/Source/core/imagebitmap/ImageBitmapFactories.cpp
|
| @@ -104,7 +104,8 @@ ScriptPromise ImageBitmapFactories::createImageBitmap(ScriptState* scriptState,
|
| exceptionState.throwSecurityError("The source image contains image data from multiple origins.");
|
| return ScriptPromise();
|
| }
|
| - if (!image->cachedImage()->passesAccessControlCheck(eventTarget.toDOMWindow()->document()->securityOrigin()) && eventTarget.toDOMWindow()->document()->securityOrigin()->taintsCanvas(image->src())) {
|
| + Document* document = eventTarget.toDOMWindow()->document();
|
| + if (!image->cachedImage()->passesAccessControlCheck(document, document->securityOrigin()) && document->securityOrigin()->taintsCanvas(image->src())) {
|
| exceptionState.throwSecurityError("Cross-origin access to the source image is denied.");
|
| return ScriptPromise();
|
| }
|
|
|