Chromium Code Reviews| Index: Source/modules/fetch/FetchManager.cpp |
| diff --git a/Source/modules/fetch/FetchManager.cpp b/Source/modules/fetch/FetchManager.cpp |
| index e746bc53289498fa74207e17d4e5c6d82d427f3d..ad248f9fd716fd894f20242f24eeead2ec157611 100644 |
| --- a/Source/modules/fetch/FetchManager.cpp |
| +++ b/Source/modules/fetch/FetchManager.cpp |
| @@ -17,6 +17,7 @@ |
| #include "core/frame/Frame.h" |
| #include "core/frame/csp/ContentSecurityPolicy.h" |
| #include "core/inspector/ConsoleMessage.h" |
| +#include "core/inspector/InspectorInstrumentation.h" |
| #include "core/loader/ThreadableLoader.h" |
| #include "core/loader/ThreadableLoaderClient.h" |
| #include "core/page/ChromeClient.h" |
| @@ -156,7 +157,7 @@ void FetchManager::Loader::didFinishLoading(unsigned long, double) |
| && m_responseHttpStatusCode >= 200 && m_responseHttpStatusCode < 300) { |
| document()->frame()->page()->chromeClient().ajaxSucceeded(document()->frame()); |
| } |
| - |
| + InspectorInstrumentation::didFinishFetch(executionContext(), this, m_request->method(), m_request->url().string()); |
| notifyFinished(); |
| } |
| @@ -381,9 +382,12 @@ void FetchManager::Loader::performHTTPFetch(bool corsFlag, bool corsPreflightFla |
| threadableLoaderOptions.crossOriginRequestPolicy = UseAccessControl; |
| break; |
| } |
| + InspectorInstrumentation::willStartFetch(executionContext(), this); |
| m_loader = ThreadableLoader::create(*executionContext(), this, request, threadableLoaderOptions, resourceLoaderOptions); |
| - if (!m_loader) |
| + if (!m_loader) { |
| + InspectorInstrumentation::didFailFetch(executionContext(), this); |
| performNetworkError("Can't create ThreadableLoader"); |
|
dgozman
2015/07/31 06:50:38
This method calls |failed| which in turn calls |di
|
| + } |
| } |
| void FetchManager::Loader::failed(const String& message) |
| @@ -400,6 +404,7 @@ void FetchManager::Loader::failed(const String& message) |
| ScriptState::Scope scope(state); |
| m_resolver->reject(V8ThrowException::createTypeError(state->isolate(), "Failed to fetch")); |
| } |
| + InspectorInstrumentation::didFailFetch(executionContext(), this); |
| notifyFinished(); |
| } |