Chromium Code Reviews| Index: Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| diff --git a/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| index d6f6a8febc07499a256572964ff432e70266b222..530106fe900fb3ca5e9e1469f85642f8129d71ae 100644 |
| --- a/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| +++ b/Source/core/xmlhttprequest/XMLHttpRequest.cpp |
| @@ -51,6 +51,9 @@ |
| #include "core/inspector/InspectorInstrumentation.h" |
| #include "core/inspector/InspectorTraceEvents.h" |
| #include "core/loader/ThreadableLoader.h" |
| +#include "core/page/Chrome.h" |
| +#include "core/page/ChromeClient.h" |
| +#include "core/page/Page.h" |
| #include "core/streams/ReadableStream.h" |
| #include "core/streams/ReadableStreamImpl.h" |
| #include "core/streams/Stream.h" |
| @@ -665,6 +668,11 @@ void XMLHttpRequest::dispatchReadyStateChangeEvent() |
| dispatchProgressEventFromSnapshot(EventTypeNames::loadend); |
| TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateCounters", "data", InspectorUpdateCountersEvent::data()); |
| } |
| + if (!document() || !document()->frame() || !document()->frame()->page()) |
| + return; |
| + |
| + if (status() == 200) |
|
kouhei (in TOK)
2015/03/13 07:22:32
May be allow all 2xx?
Garrett Casto
2015/03/13 18:37:07
Done
|
| + document()->frame()->page()->chrome().client().xhrSucceeded(document()->frame()); |
|
kouhei (in TOK)
2015/03/13 07:22:33
I think the better place for this would be in endL
Garrett Casto
2015/03/13 18:37:07
Done.
|
| } |
| void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionState) |