| Index: Source/core/loader/ImageLoader.cpp
 | 
| diff --git a/Source/core/loader/ImageLoader.cpp b/Source/core/loader/ImageLoader.cpp
 | 
| index 8659c5ad118de1f2e5344eb2615a7ea8b9740f65..5e26d16d5239550beba27d1f41686afef7884de6 100644
 | 
| --- a/Source/core/loader/ImageLoader.cpp
 | 
| +++ b/Source/core/loader/ImageLoader.cpp
 | 
| @@ -160,7 +160,7 @@ void ImageLoader::updateFromElement()
 | 
|          AtomicString crossOriginMode = m_element->fastGetAttribute(HTMLNames::crossoriginAttr);
 | 
|          if (!crossOriginMode.isNull()) {
 | 
|              StoredCredentials allowCredentials = equalIgnoringCase(crossOriginMode, "use-credentials") ? AllowStoredCredentials : DoNotAllowStoredCredentials;
 | 
| -            updateRequestForAccessControl(request.mutableResourceRequest(), document.securityOrigin(), allowCredentials);
 | 
| +            request.setCrossOriginAccessControl(document.securityOrigin(), allowCredentials);
 | 
|          }
 | 
|  
 | 
|          if (m_loadManually) {
 | 
| @@ -264,26 +264,18 @@ void ImageLoader::notifyFinished(Resource* resource)
 | 
|      if (!m_hasPendingLoadEvent)
 | 
|          return;
 | 
|  
 | 
| -    if (m_element->fastHasAttribute(HTMLNames::crossoriginAttr)
 | 
| -        && !m_element->document().securityOrigin()->canRequest(image()->response().url())
 | 
| -        && !resource->passesAccessControlCheck(m_element->document().securityOrigin())) {
 | 
| -
 | 
| -        setImageWithoutConsideringPendingLoadEvent(0);
 | 
| +    if (resource->errorOccurred()) {
 | 
| +        loadEventSender().cancelEvent(this);
 | 
| +        m_hasPendingLoadEvent = false;
 | 
|  
 | 
|          m_hasPendingErrorEvent = true;
 | 
|          errorEventSender().dispatchEventSoon(this);
 | 
|  
 | 
| -        DEFINE_STATIC_LOCAL(String, consoleMessage, ("Cross-origin image load denied by Cross-Origin Resource Sharing policy."));
 | 
| -        m_element->document().addConsoleMessage(SecurityMessageSource, ErrorMessageLevel, consoleMessage);
 | 
| -
 | 
| -        ASSERT(!m_hasPendingLoadEvent);
 | 
| -
 | 
|          // Only consider updating the protection ref-count of the Element immediately before returning
 | 
|          // from this function as doing so might result in the destruction of this ImageLoader.
 | 
|          updatedHasPendingEvent();
 | 
|          return;
 | 
|      }
 | 
| -
 | 
|      if (resource->wasCanceled()) {
 | 
|          m_hasPendingLoadEvent = false;
 | 
|          // Only consider updating the protection ref-count of the Element immediately before returning
 | 
| @@ -291,18 +283,6 @@ void ImageLoader::notifyFinished(Resource* resource)
 | 
|          updatedHasPendingEvent();
 | 
|          return;
 | 
|      }
 | 
| -    if (resource->errorOccurred()) {
 | 
| -        loadEventSender().cancelEvent(this);
 | 
| -        m_hasPendingLoadEvent = false;
 | 
| -
 | 
| -        m_hasPendingErrorEvent = true;
 | 
| -        errorEventSender().dispatchEventSoon(this);
 | 
| -
 | 
| -        // Only consider updating the protection ref-count of the Element immediately before returning
 | 
| -        // from this function as doing so might result in the destruction of this ImageLoader.
 | 
| -        updatedHasPendingEvent();
 | 
| -        return;
 | 
| -    }
 | 
|      loadEventSender().dispatchEventSoon(this);
 | 
|  }
 | 
|  
 | 
| 
 |