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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 798963002: Only populate line number in case parsing synchronously. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: deleted custom mac expectation 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 610
611 if (sourceOrigin->canRequest(url)) 611 if (sourceOrigin->canRequest(url))
612 return true; 612 return true;
613 613
614 String errorDescription; 614 String errorDescription;
615 if (!resource->passesAccessControlCheck(document(), sourceOrigin, errorDescr iption)) { 615 if (!resource->passesAccessControlCheck(document(), sourceOrigin, errorDescr iption)) {
616 if (resource->type() == Resource::Font) 616 if (resource->type() == Resource::Font)
617 toFontResource(resource)->setCORSFailed(); 617 toFontResource(resource)->setCORSFailed();
618 if (frame() && frame()->document()) { 618 if (frame() && frame()->document()) {
619 String resourceType = Resource::resourceTypeToString(resource->type( ), resource->options().initiatorInfo); 619 String resourceType = Resource::resourceTypeToString(resource->type( ), resource->options().initiatorInfo);
620 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage:: create(JSMessageSource, ErrorMessageLevel, resourceType + " from origin '" + Sec urityOrigin::create(url)->toString() + "' has been blocked from loading by Cross -Origin Resource Sharing policy: " + errorDescription); 620 frame()->document()->addConsoleMessage(ConsoleMessage::create(JSMess ageSource, ErrorMessageLevel, resourceType + " from origin '" + SecurityOrigin:: create(url)->toString() + "' has been blocked from loading by Cross-Origin Resou rce Sharing policy: " + errorDescription));
621 consoleMessage->markAsAsync();
622 frame()->document()->addConsoleMessage(consoleMessage);
623 } 621 }
624 return false; 622 return false;
625 } 623 }
626 return true; 624 return true;
627 } 625 }
628 626
629 bool ResourceFetcher::isControlledByServiceWorker() const 627 bool ResourceFetcher::isControlledByServiceWorker() const
630 { 628 {
631 LocalFrame* localFrame = frame(); 629 LocalFrame* localFrame = frame();
632 if (!localFrame) 630 if (!localFrame)
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 1576
1579 void ResourceFetcher::trace(Visitor* visitor) 1577 void ResourceFetcher::trace(Visitor* visitor)
1580 { 1578 {
1581 visitor->trace(m_document); 1579 visitor->trace(m_document);
1582 visitor->trace(m_loaders); 1580 visitor->trace(m_loaders);
1583 visitor->trace(m_nonBlockingLoaders); 1581 visitor->trace(m_nonBlockingLoaders);
1584 ResourceLoaderHost::trace(visitor); 1582 ResourceLoaderHost::trace(visitor);
1585 } 1583 }
1586 1584
1587 } 1585 }
OLDNEW
« no previous file with comments | « Source/core/dom/ScriptableDocumentParser.cpp ('k') | Source/core/html/parser/HTMLDocumentParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698