Bug 160938 - [Cocoa] -[NSString isEqualToString:] returns NO for any WKNSString argument
Summary: [Cocoa] -[NSString isEqualToString:] returns NO for any WKNSString argument
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords: InRadar
Depends on: 174736
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-17 00:46 PDT by mitz
Modified: 2017-07-21 16:28 PDT (History)
2 users (show)

See Also:


Attachments
Make WKObject not inherit from NSObject (6.59 KB, patch)
2016-08-17 01:13 PDT, mitz
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2 (764.70 KB, application/zip)
2016-08-17 05:01 PDT, Build Bot
no flags Details
Make WKObject not inherit from NSObject (12.51 KB, patch)
2016-08-17 11:06 PDT, mitz
no flags Details | Formatted Diff | Diff
Make WKObject not inherit from NSObject (19.31 KB, patch)
2016-08-17 12:08 PDT, mitz
no flags Details | Formatted Diff | Diff
Make WKObject not inherit from NSObject (19.39 KB, patch)
2016-08-17 12:17 PDT, mitz
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2016-08-17 00:46:56 PDT
Patch forthcoming.
Comment 1 mitz 2016-08-17 00:47:10 PDT
<rdar://problem/27876652>
Comment 2 mitz 2016-08-17 01:13:08 PDT
Created attachment 286290 [details]
Make WKObject not inherit from NSObject

Unfortunately, even NSProxy implements some NSObject methods, so we can’t inherit from NSProxy.
Comment 3 Build Bot 2016-08-17 05:01:12 PDT
Comment on attachment 286290 [details]
Make WKObject not inherit from NSObject

Attachment 286290 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1886580

New failing tests:
ietestcenter/css3/flexbox/flexbox-flex-001.htm
Comment 4 Build Bot 2016-08-17 05:01:15 PDT
Created attachment 286296 [details]
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.5
Comment 5 mitz 2016-08-17 11:06:49 PDT
Created attachment 286308 [details]
Make WKObject not inherit from NSObject
Comment 6 WebKit Commit Bot 2016-08-17 11:08:05 PDT
Attachment 286308 [details] did not pass style-queue:


ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:32:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:33:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:34:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:35:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:36:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:37:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:38:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 7 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Anders Carlsson 2016-08-17 11:22:23 PDT
Comment on attachment 286308 [details]
Make WKObject not inherit from NSObject

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

I really think we need tests for this - both for isEqualToString: and testing that weak pointers work.

> Source/WebKit2/Shared/Cocoa/WKObject.mm:117
> +    return selector ? ((id(*)(id, SEL))objc_msgSend)(self, selector) : nil;

Can use wtfObjcMsgSend here.

> Source/WebKit2/Shared/Cocoa/WKObject.mm:122
> +    return selector ? ((id(*)(id, SEL, id))objc_msgSend)(self, selector, object) : nil;

Can use wtfObjcMsgSend here.

> Source/WebKit2/Shared/Cocoa/WKObject.mm:127
> +    return selector ? ((id(*)(id, SEL, id, id))objc_msgSend)(self, selector, object1, object2) : nil;

Can use wtfObjcMsgSend here.
Comment 8 mitz 2016-08-17 12:08:26 PDT
Created attachment 286313 [details]
Make WKObject not inherit from NSObject
Comment 9 WebKit Commit Bot 2016-08-17 12:11:26 PDT
Attachment 286313 [details] did not pass style-queue:


ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:32:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:33:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:34:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:35:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:36:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:37:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:38:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 7 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 mitz 2016-08-17 12:17:03 PDT
Created attachment 286314 [details]
Make WKObject not inherit from NSObject
Comment 11 WebKit Commit Bot 2016-08-17 12:18:24 PDT
Attachment 286314 [details] did not pass style-queue:


ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:32:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:33:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:34:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:35:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:36:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:37:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
ERROR: Source/WebKit2/Platform/spi/Cocoa/objcSPI.h:38:  The parameter name "obj" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 7 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Anders Carlsson 2016-08-17 12:19:42 PDT
Comment on attachment 286314 [details]
Make WKObject not inherit from NSObject

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

> Source/WebKit2/Shared/Cocoa/WKObject.mm:188
> +    if (_objc_rootReleaseWasZero(self)) {

Maybe make this an early return?
Comment 13 mitz 2016-08-17 12:20:53 PDT
Fixed in <https://trac.webkit.org/r204565>.