Bug 107838 - Objective-C API: testapi.mm should use ARC
Summary: Objective-C API: testapi.mm should use ARC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords: InRadar
Depends on: 108860
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-24 09:21 PST by Mark Hahnenberg
Modified: 2013-02-07 15:13 PST (History)
3 users (show)

See Also:


Attachments
Patch (16.20 KB, patch)
2013-02-04 14:01 PST, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (16.66 KB, patch)
2013-02-04 15:53 PST, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Patch (3.62 KB, patch)
2013-02-07 14:30 PST, Mark Hahnenberg
mrowe: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2013-01-24 09:21:44 PST
In ToT testapi.mm uses the Obj-C garbage collector, which hides a lot of our object lifetime bugs. We should enable ARC, since that is what most of our clients will be using.
Comment 1 Radar WebKit Bug Importer 2013-01-24 11:48:07 PST
<rdar://problem/13079712>
Comment 2 Mark Hahnenberg 2013-02-04 14:01:31 PST
Created attachment 186456 [details]
Patch
Comment 3 Mark Hahnenberg 2013-02-04 15:53:40 PST
Created attachment 186483 [details]
Patch
Comment 4 Mark Hahnenberg 2013-02-04 15:55:46 PST
New patch that disables building with ARC on 32-bit.
Comment 5 Oliver Hunt 2013-02-04 16:14:35 PST
Comment on attachment 186483 [details]
Patch

Does this compile on 32bit?  You've disabled arc but still have @autoreleasepool
Comment 6 Mark Hahnenberg 2013-02-04 16:18:06 PST
(In reply to comment #5)
> (From update of attachment 186483 [details])
> Does this compile on 32bit?  You've disabled arc but still have @autoreleasepool

Yes, it builds. @autoreleasepools are unrelated to ARC.
Comment 7 WebKit Review Bot 2013-02-05 12:40:22 PST
Comment on attachment 186483 [details]
Patch

Clearing flags on attachment: 186483

Committed r141914: <http://trac.webkit.org/changeset/141914>
Comment 8 WebKit Review Bot 2013-02-05 12:40:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Mark Hahnenberg 2013-02-07 11:37:52 PST
Reopening because we should fix the build files so that all of the settings are in the relevant xcconfig files.
Comment 10 Mark Hahnenberg 2013-02-07 14:30:10 PST
Created attachment 187177 [details]
Patch
Comment 11 Mark Rowe (bdash) 2013-02-07 14:38:54 PST
Comment on attachment 187177 [details]
Patch

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

r=me with those changes.  Thanks for cleaning this up!

> Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig:36
> +CLANG_ENABLE_OBJC_ARC = $(CLANG_ENABLE_OBJC_ARC_$(CURRENT_ARCH))

This should have a trailing ; for consistency.

> Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig:39
> +CLANG_ENABLE_OBJC_ARC_ = NO;
> +CLANG_ENABLE_OBJC_ARC_i386 = NO;
> +CLANG_ENABLE_OBJC_ARC_ppc = NO;

Since ARC defaults to off, you can omit all of these lines that explicitly set it to NO.
Comment 12 Mark Hahnenberg 2013-02-07 15:13:15 PST
Committed r142184: <http://trac.webkit.org/changeset/142184>