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..8ed17098c82176ac516fea0e598c69c504ea5d05 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,8 @@ 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; |
|
tyoshino (SeeGerritForStatus)
2015/03/16 08:59:28
move also this to L1581?
Mike West
2015/03/16 09:02:43
This doesn't make much sense. You're returning out
Garrett Casto
2015/03/16 17:31:55
Done.
Garrett Casto
2015/03/16 17:31:55
Should have been moved to 1581.
|
| } |
| void XMLHttpRequest::setWithCredentials(bool value, ExceptionState& exceptionState) |
| @@ -1573,6 +1578,9 @@ void XMLHttpRequest::endLoading() |
| m_loaderIdentifier = 0; |
| changeState(DONE); |
| + |
| + if (status() >= 200 && status() < 300) |
| + document()->frame()->page()->chrome().client().xhrSucceeded(document()->frame()); |
|
Mike West
2015/03/16 09:02:43
Did you mean to move them here?
|
| } |
| void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) |