Bug 198618 - [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with non-default port number
Summary: [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when pret...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-06 12:02 PDT by Daniel Bates
Modified: 2019-06-06 12:28 PDT (History)
5 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2019-06-06 12:05 PDT, Daniel Bates
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>