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

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

Issue 19762002: [HTML Imports] Let script of imported document running. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated to ToT Created 7 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 | Annotate | Revision Log
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 ASSERT(!isStopped()); 454 ASSERT(!isStopped());
455 455
456 // FIXME: Pass in current input length. 456 // FIXME: Pass in current input length.
457 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteH TML(document(), lineNumber().zeroBasedInt()); 457 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willWriteH TML(document(), lineNumber().zeroBasedInt());
458 458
459 double startTime = currentTime(); 459 double startTime = currentTime();
460 460
461 while (!m_speculations.isEmpty()) { 461 while (!m_speculations.isEmpty()) {
462 processParsedChunkFromBackgroundParser(m_speculations.takeFirst()); 462 processParsedChunkFromBackgroundParser(m_speculations.takeFirst());
463 463
464 if (isWaitingForScripts() || isStopped()) 464 // The order matters! If this isStopped(), isWaitingForScripts() can hit and ASSERT since
465 // m_document can be null which is used to decide the readiness.
466 if (isStopped() || isWaitingForScripts())
abarth-chromium 2013/07/26 17:17:34 Can you fix the instance on line 274 as well? The
465 break; 467 break;
466 468
467 if (currentTime() - startTime > parserTimeLimit && !m_speculations.isEmp ty()) { 469 if (currentTime() - startTime > parserTimeLimit && !m_speculations.isEmp ty()) {
468 m_parserScheduler->scheduleForResume(); 470 m_parserScheduler->scheduleForResume();
469 break; 471 break;
470 } 472 }
471 } 473 }
472 474
473 InspectorInstrumentation::didWriteHTML(cookie, lineNumber().zeroBasedInt()); 475 InspectorInstrumentation::didWriteHTML(cookie, lineNumber().zeroBasedInt());
474 } 476 }
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 m_parserScheduler->suspend(); 942 m_parserScheduler->suspend();
941 } 943 }
942 944
943 void HTMLDocumentParser::resumeScheduledTasks() 945 void HTMLDocumentParser::resumeScheduledTasks()
944 { 946 {
945 if (m_parserScheduler) 947 if (m_parserScheduler)
946 m_parserScheduler->resume(); 948 m_parserScheduler->resume();
947 } 949 }
948 950
949 } 951 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698