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

Unified Diff: Source/core/html/parser/HTMLDocumentParser.h

Issue 100563004: Redirect HTML resource bytes directly to parser thread (Blink side CL) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@parserthread_decodermove
Patch Set: Cache parser thread pointer in HTMLDocumentParser Created 6 years, 11 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/html/parser/HTMLDocumentParser.h
diff --git a/Source/core/html/parser/HTMLDocumentParser.h b/Source/core/html/parser/HTMLDocumentParser.h
index b07a16c4f209de0a31973134db7269a86209088e..cedad726960960aa4de572405ab8644eb94e69cc 100644
--- a/Source/core/html/parser/HTMLDocumentParser.h
+++ b/Source/core/html/parser/HTMLDocumentParser.h
@@ -49,6 +49,11 @@
#include "wtf/WeakPtr.h"
#include "wtf/text/TextPosition.h"
+namespace blink {
+class WebThreadedResourceProvider;
+class WebThread;
+}
+
namespace WebCore {
class BackgroundHTMLParser;
@@ -98,11 +103,14 @@ public:
};
void didReceiveParsedChunkFromBackgroundParser(PassOwnPtr<ParsedChunk>);
void didReceiveEncodingDataFromBackgroundParser(const DocumentEncodingData&);
+ static void destroyResourceProvider(PassOwnPtr<blink::WebThreadedResourceProvider>);
virtual void appendBytes(const char* bytes, size_t length) OVERRIDE;
virtual void flush() OVERRIDE FINAL;
virtual void setDecoder(PassOwnPtr<TextResourceDecoder>) OVERRIDE FINAL;
+ void didSwitchedToBackgroundClient();
+
UseCounter* useCounter() { return UseCounter::getFrom(contextForParsingSession()); }
protected:
@@ -206,7 +214,9 @@ private:
bool m_isPinnedToMainThread;
bool m_endWasDelayed;
bool m_haveBackgroundParser;
+ static blink::WebThread* s_parserThread;
abarth-chromium 2014/02/03 21:17:36 Why did you move this static out of its dedicated
oystein (OOO til 10th of July) 2014/02/05 00:05:00 The parser thread itself now has to be managed by
unsigned m_pumpSessionNestingLevel;
+ bool m_parserThreadIsStandalone;
};
}

Powered by Google App Engine
This is Rietveld 408576698