| Index: third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
|
| index 17c1e8141a4f7ca44c039811abf997ab3a304a68..fc9536545f53274c6cdfb7cb46af643c6a3aece5 100644
|
| --- a/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
|
| +++ b/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.cpp
|
| @@ -60,7 +60,7 @@ CanvasRenderingContext::ContextType CanvasRenderingContext::resolveContextTypeAl
|
| return type;
|
| }
|
|
|
| -bool CanvasRenderingContext::wouldTaintOrigin(CanvasImageSource* imageSource)
|
| +bool CanvasRenderingContext::wouldTaintOrigin(CanvasImageSource* imageSource, SecurityOrigin* destinationSecurityOrigin)
|
| {
|
| const KURL& sourceURL = imageSource->sourceURL();
|
| bool hasURL = (sourceURL.isValid() && !sourceURL.isAboutBlankURL());
|
| @@ -72,7 +72,8 @@ bool CanvasRenderingContext::wouldTaintOrigin(CanvasImageSource* imageSource)
|
| return true;
|
| }
|
|
|
| - bool taintOrigin = imageSource->wouldTaintOrigin(canvas()->getSecurityOrigin());
|
| + ASSERT(!canvas() == !!destinationSecurityOrigin); // Must have one or the other
|
| + bool taintOrigin = imageSource->wouldTaintOrigin(destinationSecurityOrigin ? destinationSecurityOrigin : canvas()->getSecurityOrigin());
|
|
|
| if (hasURL) {
|
| if (taintOrigin)
|
|
|