Bug 151044

Summary: Implement -[_WKRemoteObjectInterface debugDescription] and have it look like the NSXPCInterface equivalent
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

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!