Bug 198618

Summary: [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with non-default port number
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, dino, jer.noble, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch bfulgham: review+

Description Daniel Bates 2019-06-06 12:02:04 PDT
When debugging a document whose URL contains a non-default port (e.g. example.com:8800) the LLDB pretty-printer died with the following trace:

Traceback (most recent call last):
  File "/Volumes/Data/.../Tools/lldb/lldb_webkit.py", line 231, in WebCoreSecurityOrigin_SummaryProvider
    return '{ %s, domain = %s, hasUniversalAccess = %d }' % (provider.to_string(), provider.domain(), provider.has_universal_access())
  File "/Volumes/Data/.../Tools/lldb/lldb_webkit.py", line 694, in to_string
    result += ':' + port
TypeError: cannot concatenate 'str' and 'int' objects
Comment 1 Daniel Bates 2019-06-06 12:05:10 PDT
Created attachment 371518 [details]
Patch
Comment 2 Daniel Bates 2019-06-06 12:06:05 PDT
Cannot write a test for this without building WebCore every time you run test-webkitpy. We need to land bug #187916 to be able to write such tests.
Comment 3 Brent Fulgham 2019-06-06 12:13:01 PDT
Comment on attachment 371518 [details]
Patch

Perl wouldn't make you do these manual type conversions! :-) r=me
Comment 4 Daniel Bates 2019-06-06 12:24:50 PDT
(In reply to Brent Fulgham from comment #3)
> Comment on attachment 371518 [details]
> Patch
> 
> Perl wouldn't make you do these manual type conversions! :-) r=me

I know!!! <-- That's why I like Perl so much 😀
Comment 5 Daniel Bates 2019-06-06 12:27:19 PDT
Committed r246164: <https://trac.webkit.org/changeset/246164>
Comment 6 Radar WebKit Bug Importer 2019-06-06 12:28:18 PDT
<rdar://problem/51494693>