Title: [94229] trunk/Source/WebCore
Revision
94229
Author
[email protected]
Date
2011-08-31 14:03:23 -0700 (Wed, 31 Aug 2011)

Log Message

Minor cleanup: remove inScriptExecution()
https://bugs.webkit.org/show_bug.cgi?id=67276

Reviewed by Adam Barth.

At one point inScriptExecution() existed as a non-virtual duplicate of isExecutingScript()
to avoid virtual method calls from a tight loop. Now we aren't calling it anywhere perf
sensitive, so remove the duplication.

No new tests because no change in functionality.

* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::isExecutingScript):
(WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
(WebCore::HTMLDocumentParser::notifyFinished):
* html/parser/HTMLDocumentParser.h:
(WebCore::HTMLDocumentParser::shouldDelayEnd):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94228 => 94229)


--- trunk/Source/WebCore/ChangeLog	2011-08-31 20:58:17 UTC (rev 94228)
+++ trunk/Source/WebCore/ChangeLog	2011-08-31 21:03:23 UTC (rev 94229)
@@ -1,3 +1,23 @@
+2011-08-31  Tony Gentilcore  <[email protected]>
+
+        Minor cleanup: remove inScriptExecution()
+        https://bugs.webkit.org/show_bug.cgi?id=67276
+
+        Reviewed by Adam Barth.
+
+        At one point inScriptExecution() existed as a non-virtual duplicate of isExecutingScript()
+        to avoid virtual method calls from a tight loop. Now we aren't calling it anywhere perf
+        sensitive, so remove the duplication.
+
+        No new tests because no change in functionality.
+
+        * html/parser/HTMLDocumentParser.cpp:
+        (WebCore::HTMLDocumentParser::isExecutingScript):
+        (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
+        (WebCore::HTMLDocumentParser::notifyFinished):
+        * html/parser/HTMLDocumentParser.h:
+        (WebCore::HTMLDocumentParser::shouldDelayEnd):
+
 2011-08-31  Tom Sepez  <[email protected]>
 
         Fix XSS filter bypass by multiply decoding both the URL and the body

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (94228 => 94229)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2011-08-31 20:58:17 UTC (rev 94228)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp	2011-08-31 21:03:23 UTC (rev 94229)
@@ -434,15 +434,8 @@
     return m_input.haveSeenEndOfFile();
 }
 
-// This function is virtual and just for the DocumentParser interface.
 bool HTMLDocumentParser::isExecutingScript() const
 {
-    return inScriptExecution();
-}
-
-// This function is non-virtual and used throughout the implementation.
-bool HTMLDocumentParser::inScriptExecution() const
-{
     if (!m_scriptRunner)
         return false;
     return m_scriptRunner->isExecutingScript();
@@ -475,7 +468,7 @@
 
 void HTMLDocumentParser::resumeParsingAfterScriptExecution()
 {
-    ASSERT(!inScriptExecution());
+    ASSERT(!isExecutingScript());
     ASSERT(!m_treeBuilder->isPaused());
 
     m_insertionPreloadScanner.clear();
@@ -511,7 +504,7 @@
     RefPtr<HTMLDocumentParser> protect(this);
 
     ASSERT(m_scriptRunner);
-    ASSERT(!inScriptExecution());
+    ASSERT(!isExecutingScript());
     if (isStopping()) {
         attemptToRunDeferredScriptsAndEnd();
         return;

Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.h (94228 => 94229)


--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.h	2011-08-31 20:58:17 UTC (rev 94228)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.h	2011-08-31 21:03:23 UTC (rev 94229)
@@ -135,9 +135,8 @@
 
     bool isParsingFragment() const;
     bool isScheduledForResume() const;
-    bool inScriptExecution() const;
     bool inPumpSession() const { return m_pumpSessionNestingLevel > 0; }
-    bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts() || inScriptExecution() || isScheduledForResume(); }
+    bool shouldDelayEnd() const { return inPumpSession() || isWaitingForScripts() || isScheduledForResume() || isExecutingScript(); }
 
     ScriptController* script() const;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to