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

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

Issue 732323004: Add use counter for credentialed CORS access from null origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tweak spelling Created 6 years 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 | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698