WebKit Bugzilla
Attachment 348303 Details for
Bug 188946
: console.log() shows (anonymous function) instead of the passed string when a certain format is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188946-20180828100518.patch (text/plain), 2.35 KB, created by
Devin Rousso
on 2018-08-28 10:05:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2018-08-28 10:05:19 PDT
Size:
2.35 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index aca81e50605fd17f184bba6c95518eab29c53ad0..f92cabbe65300802062634d615a3a712f1330515 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,22 @@ >+2018-08-28 Devin Rousso <drousso@apple.com> >+ >+ console.log() shows (anonymous function) instead of the passed string when a certain format is used >+ https://bugs.webkit.org/show_bug.cgi?id=188946 >+ <rdar://problem/43756428> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Stack trace URLs are much more likely to follow the following format: >+ >+ <protocol>://<path>:<line>:<column> >+ >+ Modify the test regexp to always require that a protocol exists and to check that there are >+ no ":" inside the protocol or path. Additionally, stack traces usually have more than one >+ frame, so return false if there isn't more than one line. >+ >+ * UserInterface/Models/StackTrace.js: >+ (WI.StackTrace.isLikelyStackTrace): >+ > 2018-08-27 Keith Rollin <krollin@apple.com> > > Unreviewed build fix -- disable LTO for production builds >diff --git a/Source/WebInspectorUI/UserInterface/Models/StackTrace.js b/Source/WebInspectorUI/UserInterface/Models/StackTrace.js >index ca72995416cc7b4625c924f6f86dd7a9ea4b9e77..1dfea88506b95ceae60583f44641df9f5616ec5a 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/StackTrace.js >+++ b/Source/WebInspectorUI/UserInterface/Models/StackTrace.js >@@ -80,11 +80,11 @@ WI.StackTrace = class StackTrace > if (/^[^a-z$_]/i.test(stack[0])) > return false; > >+ const reasonablyLongProtocolLength = 10; > const reasonablyLongLineLength = 500; > const reasonablyLongNativeMethodLength = 120; >- const stackTraceLine = `(.{1,${reasonablyLongLineLength}}:\\d+:\\d+|eval code|.{1,${reasonablyLongNativeMethodLength}}@\\[native code\\])`; >- const stackTrace = new RegExp(`^${stackTraceLine}(\\n${stackTraceLine})*$`, "g"); >- >+ const stackTraceLine = `(global code|eval code|module code|\\w+)?([^:]{1,${reasonablyLongProtocolLength}}://[^:]{1,${reasonablyLongLineLength}}:\\d+:\\d+|[^@]{1,${reasonablyLongNativeMethodLength}}@\\[native code\\])`; >+ const stackTrace = new RegExp(`^${stackTraceLine}([\\n\\r]${stackTraceLine})+$`, "g"); > return stackTrace.test(stack); > } >
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 188946
:
348079
|
348271
|
348272
|
348278
|
348282
|
348283
|
348303
|
348316
|
348356