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

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

Issue 2151933003: Change WTF::TemporaryChange to be an alias for AutoReset (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 checkpoint->unparsedInput = m_input.current().toString().isolatedCopy(); 409 checkpoint->unparsedInput = m_input.current().toString().isolatedCopy();
410 m_input.current().clear(); // FIXME: This should be passed in instead of cle ared. 410 m_input.current().clear(); // FIXME: This should be passed in instead of cle ared.
411 411
412 ASSERT(checkpoint->unparsedInput.isSafeToSendToAnotherThread()); 412 ASSERT(checkpoint->unparsedInput.isSafeToSendToAnotherThread());
413 postTaskToLookaheadParser(Asynchronous, &BackgroundHTMLParser::resumeFrom, m _backgroundParser, passed(std::move(checkpoint))); 413 postTaskToLookaheadParser(Asynchronous, &BackgroundHTMLParser::resumeFrom, m _backgroundParser, passed(std::move(checkpoint)));
414 } 414 }
415 415
416 size_t HTMLDocumentParser::processParsedChunkFromBackgroundParser(std::unique_pt r<ParsedChunk> popChunk) 416 size_t HTMLDocumentParser::processParsedChunkFromBackgroundParser(std::unique_pt r<ParsedChunk> popChunk)
417 { 417 {
418 TRACE_EVENT_WITH_FLOW0("blink,loading", "HTMLDocumentParser::processParsedCh unkFromBackgroundParser", popChunk.get(), TRACE_EVENT_FLAG_FLOW_IN); 418 TRACE_EVENT_WITH_FLOW0("blink,loading", "HTMLDocumentParser::processParsedCh unkFromBackgroundParser", popChunk.get(), TRACE_EVENT_FLAG_FLOW_IN);
419 TemporaryChange<bool> hasLineNumber(m_isParsingAtLineNumber, true); 419 TemporaryChange<bool> hasLineNumber(&m_isParsingAtLineNumber, true);
420 420
421 ASSERT_WITH_SECURITY_IMPLICATION(m_pumpSpeculationsSessionNestingLevel == 1) ; 421 ASSERT_WITH_SECURITY_IMPLICATION(m_pumpSpeculationsSessionNestingLevel == 1) ;
422 ASSERT_WITH_SECURITY_IMPLICATION(!inPumpSession()); 422 ASSERT_WITH_SECURITY_IMPLICATION(!inPumpSession());
423 ASSERT(!isParsingFragment()); 423 ASSERT(!isParsingFragment());
424 ASSERT(!isWaitingForScripts()); 424 ASSERT(!isWaitingForScripts());
425 ASSERT(!isStopped()); 425 ASSERT(!isStopped());
426 ASSERT(shouldUseThreading()); 426 ASSERT(shouldUseThreading());
427 ASSERT(!m_tokenizer); 427 ASSERT(!m_tokenizer);
428 ASSERT(!m_token); 428 ASSERT(!m_token);
429 ASSERT(!m_lastChunkBeforeScript); 429 ASSERT(!m_lastChunkBeforeScript);
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); 1150 (*WTF::bind(function, std::forward<Ps>(parameters)...))();
1151 return; 1151 return;
1152 case Asynchronous: 1152 case Asynchronous:
1153 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...)); 1153 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...));
1154 return; 1154 return;
1155 } 1155 }
1156 NOTREACHED(); 1156 NOTREACHED();
1157 } 1157 }
1158 1158
1159 } // namespace blink 1159 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698