Web Inspector: Fix multiple console.assert stripping issues
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 00:26:17 +0000 (00:26 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Mar 2014 00:26:17 +0000 (00:26 +0000)
commit5ae249f673192378ae08bf0f9d30ee93362eb6f2
treed776a5d517e5782e8cd8ac9beb314dde8f28da2c
parent81351f0f0541c492d4c3b08f41226cbef52b3698
Web Inspector: Fix multiple console.assert stripping issues
https://bugs.webkit.org/show_bug.cgi?id=130166

Reviewed by Timothy Hatcher.

There were a couple console.assert stripping issues in production.
One line required a semicolon so was avoiding getting stripped.
One resulted in a logic change, when stripping the only statement
of a control flow block. Add a warning for such cases.

* Scripts/remove-console-asserts.pl:
Add warning for a console.assert being the only statement in a control flow block
without braces. When it is stripped it may change the flow of the function.

* Scripts/remove-console-asserts-dryrun.rb: Added.
Add a script to quickly test running remove console asserts on our files, to
help catch errors not in a production build and in the original non-combined
files, so you can more easily fix issues.

* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
Convert the for loop into a single console.assert statement.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.removeChild):
Add missing semicolon.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Scripts/remove-console-asserts-dryrun.rb [new file with mode: 0755]
Source/WebInspectorUI/Scripts/remove-console-asserts.pl
Source/WebInspectorUI/UserInterface/Controllers/DOMTreeManager.js
Source/WebInspectorUI/UserInterface/Views/DataGrid.js