Web Inspector: Clear Log on Reload clears some logs that were after reload
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Feb 2015 04:08:24 +0000 (04:08 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Feb 2015 04:08:24 +0000 (04:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142070

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-02-26
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
We can bail after calling clearLog, since that will already start
a new session for us.

(WebInspector.LogContentView.prototype._clearLog):
Don't trigger a backend clear messages, since that will cause us to
clear messages received between the request and response.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180721 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/LogContentView.js

index 7db7006..8a3060e 100644 (file)
@@ -1,5 +1,21 @@
 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
 
+        Web Inspector: Clear Log on Reload clears some logs that were after reload
+        https://bugs.webkit.org/show_bug.cgi?id=142070
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/LogContentView.js:
+        (WebInspector.LogContentView.prototype._sessionStarted):
+        We can bail after calling clearLog, since that will already start
+        a new session for us.
+
+        (WebInspector.LogContentView.prototype._clearLog):
+        Don't trigger a backend clear messages, since that will cause us to
+        clear messages received between the request and response.
+
+2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
+
         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
         https://bugs.webkit.org/show_bug.cgi?id=142061
 
index 0b651dd..333c202 100644 (file)
@@ -303,8 +303,10 @@ WebInspector.LogContentView.prototype = {
 
     _sessionStarted: function(event)
     {
-        if (this._clearLogOnReloadSetting.value) 
+        if (this._clearLogOnReloadSetting.value)  {
             this._clearLog();
+            return;
+        }
 
         this._logViewController.startNewSession();
     },
@@ -638,7 +640,9 @@ WebInspector.LogContentView.prototype = {
 
     _clearLog: function()
     {
+        this._ignoreDidClearMessages = true;
         this._logViewController.clear();
+        this._ignoreDidClearMessages = false;
     },
 
     _scopeBarSelectionDidChange: function(event)