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

Unified Diff: Source/WebCore/loader/DocumentThreadableLoader.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months 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/WebCore/inspector/WorkerRuntimeAgent.cpp ('k') | Source/WebCore/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/loader/DocumentThreadableLoader.cpp
diff --git a/Source/WebCore/loader/DocumentThreadableLoader.cpp b/Source/WebCore/loader/DocumentThreadableLoader.cpp
index 9b5f00fb8ae56a85b012c85de7fc2211e2d423ac..df15d7a9aeeef1186be0ce7ccd061c345ae13d98 100644
--- a/Source/WebCore/loader/DocumentThreadableLoader.cpp
+++ b/Source/WebCore/loader/DocumentThreadableLoader.cpp
@@ -50,9 +50,7 @@
#include <wtf/Assertions.h>
#include <wtf/UnusedParam.h>
-#if ENABLE(INSPECTOR)
#include "ProgressTracker.h"
yurys 2013/04/05 12:11:20 Please move it above to keep alphabetical order.
-#endif
namespace WebCore {
@@ -247,11 +245,9 @@ void DocumentThreadableLoader::didReceiveResponse(unsigned long identifier, cons
String accessControlErrorDescription;
if (m_actualRequest) {
-#if ENABLE(INSPECTOR)
DocumentLoader* loader = m_document->frame()->loader()->documentLoader();
InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiveResourceResponse(m_document->frame(), identifier, response);
InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, loader, response, 0);
-#endif
if (!passesAccessControlCheck(response, m_options.allowCredentials, securityOrigin(), accessControlErrorDescription)) {
preflightFailure(identifier, response.url(), accessControlErrorDescription);
@@ -291,9 +287,7 @@ void DocumentThreadableLoader::didReceiveData(unsigned long identifier, const ch
// Preflight data should be invisible to clients.
if (m_actualRequest) {
-#if ENABLE(INSPECTOR)
InspectorInstrumentation::didReceiveData(m_document->frame(), identifier, 0, 0, dataLength);
-#endif
return;
}
@@ -314,9 +308,7 @@ void DocumentThreadableLoader::notifyFinished(CachedResource* resource)
void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double finishTime)
{
if (m_actualRequest) {
-#if ENABLE(INSPECTOR)
InspectorInstrumentation::didFinishLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, finishTime);
-#endif
ASSERT(!m_sameOriginRequest);
ASSERT(m_options.crossOriginRequestPolicy == UseAccessControl);
preflightSuccess();
@@ -326,10 +318,8 @@ void DocumentThreadableLoader::didFinishLoading(unsigned long identifier, double
void DocumentThreadableLoader::didFail(unsigned long identifier, const ResourceError& error)
{
-#if ENABLE(INSPECTOR)
if (m_actualRequest)
InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error);
-#endif
m_client->didFail(error);
}
@@ -350,10 +340,8 @@ void DocumentThreadableLoader::preflightSuccess()
void DocumentThreadableLoader::preflightFailure(unsigned long identifier, const String& url, const String& errorDescription)
{
ResourceError error(errorDomainWebKitInternal, 0, url, errorDescription);
-#if ENABLE(INSPECTOR)
if (m_actualRequest)
InspectorInstrumentation::didFailLoading(m_document->frame(), m_document->frame()->loader()->documentLoader(), identifier, error);
-#endif
m_actualRequest = nullptr; // Prevent didFinishLoading() from bypassing access check.
m_client->didFailAccessControlCheck(error);
}
@@ -384,12 +372,10 @@ void DocumentThreadableLoader::loadRequest(const ResourceRequest& request, Secur
ASSERT(!m_resource);
m_resource = m_document->cachedResourceLoader()->requestRawResource(newRequest);
if (m_resource) {
-#if ENABLE(INSPECTOR)
if (m_resource->loader()) {
unsigned long identifier = m_resource->loader()->identifier();
InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient(m_document, identifier, m_client);
}
-#endif
m_resource->addClient(this);
}
return;
« no previous file with comments | « Source/WebCore/inspector/WorkerRuntimeAgent.cpp ('k') | Source/WebCore/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698