Bug 171989 - REGRESSION(r216217): lldb_webkit.py no longer prints out a WTFString, StringImpl needs to handle StringImplShape change
Summary: REGRESSION(r216217): lldb_webkit.py no longer prints out a WTFString, StringI...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-11 14:27 PDT by Joseph Pecoraro
Modified: 2017-05-11 16:34 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.63 KB, patch)
2017-05-11 14:29 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (1.63 KB, patch)
2017-05-11 14:30 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-05-11 14:27:15 PDT
Attempting to print out a WTF::String results in lldb produces:

    (lldb) p selectorText
    Traceback (most recent call last):
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 53, in WTFString_SummaryProvider
        return "{ length = %d, contents = '%s' }" % (provider.get_length(), provider.to_string())
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 275, in to_string
        return impl.to_string()
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 245, in to_string
        return lstring_to_string(self.get_data8(), error, self.get_length())
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 219, in lstring_to_string
        string = contents.decode('utf8')
    AttributeError: 'NoneType' object has no attribute 'decode'
    Traceback (most recent call last):
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 60, in WTFStringImpl_SummaryProvider
        return "{ length = %d, is8bit = %d, contents = '%s' }" % (provider.get_length(), provider.is_8bit(), provider.to_string())
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 245, in to_string
        return lstring_to_string(self.get_data8(), error, self.get_length())
      File "/Users/pecoraro/Code/safari/OpenSource/Tools/lldb/lldb_webkit.py", line 219, in lstring_to_string
        string = contents.decode('utf8')
    AttributeError: 'NoneType' object has no attribute 'decode'
    (WTF::String) $1 = {
      m_impl = {
        m_ptr = 0x0000000123034980
      }
    }

Expected:

    (lldb) p selectorText
    (WTF::String) $0 = { length = 38, contents = 'head, link, meta, script, style, title' } {
      m_impl = {
        m_ptr = 0x0000000123034980 { length = 38, is8bit = 1, contents = 'head, link, meta, script, style, title' }
      }
    }
Comment 1 Joseph Pecoraro 2017-05-11 14:29:51 PDT
Created attachment 309786 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2017-05-11 14:30:54 PDT
Created attachment 309787 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2017-05-11 14:39:21 PDT
Comment on attachment 309787 [details]
[PATCH] Proposed Fix

r=me
Comment 4 Mark Lam 2017-05-11 14:40:23 PDT
r=me too.
Comment 5 Simon Fraser (smfr) 2017-05-11 14:55:39 PDT
Very nice.
Comment 6 WebKit Commit Bot 2017-05-11 15:32:33 PDT
The commit-queue encountered the following flaky tests while processing attachment 309787 [details]:

workers/bomb.html bug 171985 (author: fpizlo@apple.com)
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2017-05-11 15:33:01 PDT
Comment on attachment 309787 [details]
[PATCH] Proposed Fix

Rejecting attachment 309787 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 309787, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ingContext should implement WebGLRenderingContextBase
The copy of the patch that failed is found in:
   /Volumes/Data/EWS/WebKit/.git/rebase-apply/patch

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at /Volumes/Data/EWS/WebKit/Tools/Scripts/webkitdirs.pm line 2719.

Full output: http://webkit-queues.webkit.org/results/3721293
Comment 8 BJ Burg 2017-05-11 15:43:03 PDT
(In reply to WebKit Commit Bot from comment #7)
> Comment on attachment 309787 [details]
> [PATCH] Proposed Fix
> 
> Rejecting attachment 309787 [details] from commit-queue.
> 
> Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch',
> '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03',
> 'land-attachment', '--force-clean', '--non-interactive',
> '--parent-command=commit-queue', 309787, '--port=mac']" exit_code: 2 cwd:
> /Volumes/Data/EWS/WebKit
> 
> Last 500 characters of output:
> ingContext should implement WebGLRenderingContextBase
> The copy of the patch that failed is found in:
>    /Volumes/Data/EWS/WebKit/.git/rebase-apply/patch
> 
> When you have resolved this problem, run "git rebase --continue".
> If you prefer to skip this patch, run "git rebase --skip" instead.
> To check out the original branch and stop rebasing, run "git rebase --abort".
> 
> rebase refs/remotes/origin/master: command returned error: 1
> 
> Died at /Volumes/Data/EWS/WebKit/Tools/Scripts/webkitdirs.pm line 2719.
> 
> Full output: http://webkit-queues.webkit.org/results/3721293

You had one job, commit-queue bot.. you are fired.
Comment 9 Joseph Pecoraro 2017-05-11 16:04:43 PDT
Comment on attachment 309787 [details]
[PATCH] Proposed Fix

Lets try setting the flag again. I really don't want to do an entire clean build to land this.
Comment 10 WebKit Commit Bot 2017-05-11 16:34:22 PDT
Comment on attachment 309787 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 309787

Committed r216701: <http://trac.webkit.org/changeset/216701>
Comment 11 WebKit Commit Bot 2017-05-11 16:34:24 PDT
All reviewed patches have been landed.  Closing bug.