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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp

Issue 2065163005: ParseHTMLOnMainThread: notify main thread of chunks less frequently (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a setting to the experiment Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 config->xssAuditor = wrapUnique(new XSSAuditor); 734 config->xssAuditor = wrapUnique(new XSSAuditor);
735 config->xssAuditor->init(document(), &m_xssAuditorDelegate); 735 config->xssAuditor->init(document(), &m_xssAuditorDelegate);
736 736
737 config->decoder = takeDecoder(); 737 config->decoder = takeDecoder();
738 config->tokenizedChunkQueue = m_tokenizedChunkQueue.get(); 738 config->tokenizedChunkQueue = m_tokenizedChunkQueue.get();
739 if (document()->settings()) { 739 if (document()->settings()) {
740 if (document()->settings()->backgroundHtmlParserOutstandingTokenLimit()) 740 if (document()->settings()->backgroundHtmlParserOutstandingTokenLimit())
741 config->outstandingTokenLimit = document()->settings()->backgroundHt mlParserOutstandingTokenLimit(); 741 config->outstandingTokenLimit = document()->settings()->backgroundHt mlParserOutstandingTokenLimit();
742 if (document()->settings()->backgroundHtmlParserPendingTokenLimit()) 742 if (document()->settings()->backgroundHtmlParserPendingTokenLimit())
743 config->pendingTokenLimit = document()->settings()->backgroundHtmlPa rserPendingTokenLimit(); 743 config->pendingTokenLimit = document()->settings()->backgroundHtmlPa rserPendingTokenLimit();
744 config->shouldCoalesceChunks = document()->settings()->parseHTMLOnMainTh readCoalesceChunks();
744 } 745 }
745 746
746 ASSERT(config->xssAuditor->isSafeToSendToAnotherThread()); 747 ASSERT(config->xssAuditor->isSafeToSendToAnotherThread());
747 postTaskToLookaheadParser( 748 postTaskToLookaheadParser(
748 Synchronous, 749 Synchronous,
749 &BackgroundHTMLParser::start, 750 &BackgroundHTMLParser::start,
750 reference.release(), 751 reference.release(),
751 passed(std::move(config)), 752 passed(std::move(config)),
752 document()->url(), 753 document()->url(),
753 passed(CachedDocumentParameters::create(document())), 754 passed(CachedDocumentParameters::create(document())),
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); 1156 (*WTF::bind(function, std::forward<Ps>(parameters)...))();
1156 return; 1157 return;
1157 case Asynchronous: 1158 case Asynchronous:
1158 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...)); 1159 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...));
1159 return; 1160 return;
1160 } 1161 }
1161 NOTREACHED(); 1162 NOTREACHED();
1162 } 1163 }
1163 1164
1164 } // namespace blink 1165 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/parser/BackgroundHTMLParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698