Changeset 246164 in webkit


Ignore:
Timestamp:
Jun 6, 2019 12:27:12 PM (5 years ago)
Author:
dbates@webkit.org
Message:

[lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with
non-default port number
https://bugs.webkit.org/show_bug.cgi?id=198618

Reviewed by Brent Fulgham.

WebCoreSecurityOriginProvider.port() returns an int data type. We need to explicitly convert this to
a string before we concatenate it with another string when building the string representation
for the WebCore::SecurityOrigin object. Otherwise, Python complains that we are concatenating a str
with an int and we don't get a pretty-printed representation for WebCore::SecurityOrigin.

  • lldb/lldb_webkit.py:

(WebCoreSecurityOriginProvider.to_string): Call str() on the port before concatenting it.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r246161 r246164  
     12019-06-06  Daniel Bates  <dabates@apple.com>
     2
     3        [lldb-webkit] TypeError: cannot concatenate 'str' and 'int' objects when prettify SecurityOrigin with
     4        non-default port number
     5        https://bugs.webkit.org/show_bug.cgi?id=198618
     6
     7        Reviewed by Brent Fulgham.
     8
     9        WebCoreSecurityOriginProvider.port() returns an int data type. We need to explicitly convert this to
     10        a string before we concatenate it with another string when building the string representation
     11        for the WebCore::SecurityOrigin object. Otherwise, Python complains that we are concatenating a str
     12        with an int and we don't get a pretty-printed representation for WebCore::SecurityOrigin.
     13
     14        * lldb/lldb_webkit.py:
     15        (WebCoreSecurityOriginProvider.to_string): Call str() on the port before concatenting it.
     16
    1172019-06-06  Jonathan Bedard  <jbedard@apple.com>
    218
  • trunk/Tools/lldb/lldb_webkit.py

    r244934 r246164  
    692692        result = '{}://{}'.format(scheme, host)
    693693        if port:
    694             result += ':' + port
     694            result += ':' + str(port)
    695695        return result
    696696
Note: See TracChangeset for help on using the changeset viewer.