WebKit Bugzilla
Attachment 370547 Details for
Bug 198207
: Web Inspector: prevent stripping `console.assert` if it's used inside a string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198207-20190523192616.patch (text/plain), 2.85 KB, created by
Devin Rousso
on 2019-05-23 19:26:16 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-23 19:26:16 PDT
Size:
2.85 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index e3aa85b0222c695a87a1c48fc8c5653d815906a6..40a2c2e6624a0457de00b4039ad7651d617d90b4 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,17 @@ >+2019-05-23 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: prevent stripping `console.assert` if it's used inside a string >+ https://bugs.webkit.org/show_bug.cgi?id=198207 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/remove-console-asserts.pl: >+ (removeConsoleAssertsInFile): >+ >+ * UserInterface/Views/TableColumn.js: >+ (WI.TableColumn.prototype.set width): >+ Remove some commented out `console.assert`. >+ > 2019-05-23 Devin Rousso <drousso@apple.com> > > Web Inspector: Overlay: rulers/guides should be shown whenever element selection is enabled >diff --git a/Source/WebInspectorUI/Scripts/remove-console-asserts.pl b/Source/WebInspectorUI/Scripts/remove-console-asserts.pl >index cb20608d6859ab2d044ef4c07337e6e46df83cff..cb8fa2b4344bf3180cef21d3265d7af16fc1e69a 100755 >--- a/Source/WebInspectorUI/Scripts/remove-console-asserts.pl >+++ b/Source/WebInspectorUI/Scripts/remove-console-asserts.pl >@@ -49,12 +49,15 @@ sub removeConsoleAssertsInFile($$) > } > } > >- s/\s*console\.assert\(.*\);\s*//g; >+ s/^\s*console\.assert\(.*\);\s*//g; > print $out $_; > $previousLine = $_ if $_ !~ /^\s*$/; > > # If console.assert is still on the line, either we missed a semicolon or it is multi-line. These did not get stripped. > if ($_ =~ /\s*console\.assert\(/) { >+ # Allow "console.assert()" to be used as part of a string. >+ next if /^["'`]*console\.assert/; >+ > if ($_ =~ /\)\s*$/) { > print "WARNING: console.assert missing trailing semicolon on line $.: $_" ; > } else { >diff --git a/Source/WebInspectorUI/UserInterface/Views/TableColumn.js b/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >index 385a3cbef0628142d77f3f8bbeb69e78feb14c37..e6cb5ee944985a787b1eccaaa3df87ca150714e7 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TableColumn.js >@@ -80,11 +80,6 @@ WI.TableColumn = class TableColumn extends WI.Object > > set width(width) > { >- // NOTE: We can't assert this because we resize past the minimum and maximum sizes. >- // If we support horizontal scrolling in the Table then we could assert these. >- // console.assert(isNaN(width) || !this._minWidth || width >= this._minWidth, "New width was less than midWidth.", width, this._minWidth); >- // console.assert(isNaN(width) || !this._maxWidth || width <= this._maxWidth, "New width was greater than maxWidth.", width, this._maxWidth); >- > if (this._width === width) > return; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198207
:
370546
|
370547
|
370548
|
370553