Bug 151044 - Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
Summary: Implement -[_WKRemoteObjectInterface debugDescription] and have it look like ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 12:00 PST by Anders Carlsson
Modified: 2015-11-10 08:44 PST (History)
1 user (show)

See Also:


Attachments
Patch (4.26 KB, patch)
2015-11-09 12:07 PST, Anders Carlsson
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2015-11-09 12:00:42 PST
Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
Comment 1 Anders Carlsson 2015-11-09 12:07:53 PST
Created attachment 265078 [details]
Patch
Comment 2 WebKit Commit Bot 2015-11-09 12:10:50 PST
Attachment 265078 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm:186:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
ERROR: Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm:190:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Tim Horton 2015-11-09 12:11:48 PST
Comment on attachment 265078 [details]
Patch

Should we really use NSMutableString instead of StringBuilder or something like that?
Comment 4 Anders Carlsson 2015-11-09 12:15:20 PST
(In reply to comment #3)
> Comment on attachment 265078 [details]
> Patch
> 
> Should we really use NSMutableString instead of StringBuilder or something
> like that?

Since this is debug-only code it doesn't really matter.
Comment 5 Anders Carlsson 2015-11-09 12:16:30 PST
Committed r192171: <http://trac.webkit.org/changeset/192171>
Comment 6 Darin Adler 2015-11-10 08:43:50 PST
Comment on attachment 265078 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=265078&action=review

> Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm:197
> +                return CString(class_getName(a)) < CString(class_getName(b));

Why copy these strings with the CString constructor instead of just using strcmp directly?
Comment 7 Darin Adler 2015-11-10 08:44:29 PST
Comment on attachment 265078 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=265078&action=review

>> Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectInterface.mm:197
>> +                return CString(class_getName(a)) < CString(class_getName(b));
> 
> Why copy these strings with the CString constructor instead of just using strcmp directly?

I guess the answer is “debug-only code and doesn’t matter”, but still!