WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
ASSIGNED
189228
[Cocoa] Turn on ARC for WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=189228
Summary
[Cocoa] Turn on ARC for WebKitTestRunner
Darin Adler
Reported
2018-09-02 00:20:05 PDT
[Cocoa] Turn on ARC for WebKitTestRunner
Attachments
Patch
(32.58 KB, patch)
2018-09-02 00:32 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(42.20 KB, patch)
2018-09-02 12:22 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(42.14 KB, patch)
2018-09-03 10:05 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2018-09-02 00:32:55 PDT
Comment hidden (obsolete)
Created
attachment 348729
[details]
Patch
Darin Adler
Comment 2
2018-09-02 12:22:08 PDT
Created
attachment 348746
[details]
Patch
Darin Adler
Comment 3
2018-09-03 10:05:51 PDT
Created
attachment 348777
[details]
Patch
Sam Weinig
Comment 4
2018-09-03 13:30:22 PDT
Comment on
attachment 348777
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=348777&action=review
> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm:32 > + return [(__bridge id)platformTextMarker() isEqual:(__bridge id)other->platformTextMarker()];
Is there any way to make platformTextMarker() return (or rather make PlatformTextMarker) an id rather than CFTypeRef? I know in WebCore we use the trick of doing something like: #ifndef __OBJC__ typedef struct objc_object *id; #endif in the C++ class. Though I am not sure what the implications for ARC are of that.
> Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:1066 > + return AccessibilityTextMarkerRange::create((__bridge PlatformTextMarkerRange)textMarkerRange);
Same question as above, but for PlatformTextMarkerRange.
> Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:1825 > - id mutableString = [[[NSMutableString alloc] init] autorelease]; > + id mutableString = [[NSMutableString alloc] init];
Seems like this could be NSMutableString * rather than id (as long as you are changing this line).
> Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm:138 > + return JSStringCreateWithCFString((__bridge CFStringRef)webView.accessibilitySpeakSelectionContent);
There is a category in WebKitTestRunner that adds a -[NSString createJSStringRef] (and a +[NSString stringWithJSStringRef:]). It is currently in AccessibilityCommonMac.h, but seems more generally useful (could probably add ones for WKStringRef as well if we were going wild).
Darin Adler
Comment 5
2018-09-08 14:29:56 PDT
Committed
r235832
: <
https://trac.webkit.org/changeset/235832
>
Radar WebKit Bug Importer
Comment 6
2018-09-08 14:30:25 PDT
<
rdar://problem/44264628
>
Alexey Proskuryakov
Comment 7
2018-09-09 10:47:36 PDT
This patch broke WebKit2 tests, because it apparently makes system resources leak. Rolling back. EWS detected this before landing. worker/10: OSError('[Errno 35] Resource temporarily unavailable') raised: File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/message_pool.py", line 257, in run worker.handle(message.name, message.src, *message.args) File "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py", line 283, in handle ...
WebKit Commit Bot
Comment 8
2018-09-09 10:52:02 PDT
Re-opened since this is blocked by
bug 189464
Darin Adler
Comment 9
2018-09-11 19:14:58 PDT
This did not break WebKit2 tests on my computer.
Darin Adler
Comment 10
2018-09-11 19:16:27 PDT
(In reply to Alexey Proskuryakov from
comment #7
)
> This patch broke WebKit2 tests, because it apparently makes system resources > leak. Rolling back. > > EWS detected this before landing. > > > worker/10: OSError('[Errno 35] Resource temporarily unavailable') raised: > File > "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/common/message_pool.py", > line 257, in run > worker.handle(message.name, message.src, *message.args) > File > "/Volumes/Data/EWS/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/ > layout_test_runner.py", line 283, in handle > ...
I’m accustomed to seeing this on EWS when there is a server problem, which is why I didn’t realize it was a problem with the patch. I guess I can abandon this for now because I’m not sure what to do next since I don’t see any problem locally.
Alexey Proskuryakov
Comment 11
2018-09-26 09:21:44 PDT
Watching open files and processes with lsof and ps would likely be the most straightforward way to see what's going on locally. It's also possible that this is something specific to Sierra and the version of clang used there. This doesn't feel like a very likely cause to me though.
Darin Adler
Comment 12
2018-09-26 09:23:18 PDT
Thanks. I will try your suggestion next time I have an opportunity to work on this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug