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

Unified Diff: Source/core/xml/XMLHttpRequest.h

Issue 521363002: Make XHR use the background HTML parser (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: register before finish Created 6 years, 3 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
Index: Source/core/xml/XMLHttpRequest.h
diff --git a/Source/core/xml/XMLHttpRequest.h b/Source/core/xml/XMLHttpRequest.h
index 9639d947738e4351dbcbfe6a1e90e09c3a577bef..5344fa2fc3c1c43144123166791a0eff56f6a7bc 100644
--- a/Source/core/xml/XMLHttpRequest.h
+++ b/Source/core/xml/XMLHttpRequest.h
@@ -150,6 +150,14 @@ public:
virtual void trace(Visitor*) OVERRIDE;
+ static XMLHttpRequest* findInstancePendingDocumentParse(Document*);
+
+ // This is only to be called from |Document::finishedParsing()|.
+ // When we use the off-thread HTML parser, we don't have a complete document
+ // just after |HTMLDocumentParser::finish()|. This method is used to notify
+ // that the response document is completely built.
+ void didFinishParsingDocument();
+
private:
XMLHttpRequest(ExecutionContext*, PassRefPtr<SecurityOrigin>);
@@ -166,6 +174,8 @@ private:
virtual void didFail(const ResourceError&) OVERRIDE;
virtual void didFailRedirectCheck() OVERRIDE;
+ void endLoading();
+
// Returns the MIME type part of m_mimeTypeOverride if present and
// successfully parsed, or returns one of the "Content-Type" header value
// of the received response.
@@ -244,6 +254,7 @@ private:
PersistentWillBeMember<UnderlyingSource> m_streamSource;
RefPtr<ThreadableLoader> m_loader;
+ unsigned long m_loaderIdentifier;
State m_state;
ResourceResponse m_response;

Powered by Google App Engine
This is Rietveld 408576698