Bug 127433

Summary: Add WKProcessClass class
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch mitz: review+

Description Anders Carlsson 2014-01-22 11:06:45 PST
Add WKProcessClass class
Comment 1 Anders Carlsson 2014-01-22 11:08:02 PST
Created attachment 221877 [details]
Patch
Comment 2 Anders Carlsson 2014-01-22 11:13:11 PST
Created attachment 221878 [details]
Patch
Comment 3 Anders Carlsson 2014-01-22 11:15:24 PST
Created attachment 221880 [details]
Patch
Comment 4 Anders Carlsson 2014-01-22 11:22:10 PST
Committed r162541: <http://trac.webkit.org/changeset/162541>
Comment 5 Darin Adler 2014-01-22 15:27:58 PST
Comment on attachment 221880 [details]
Patch

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

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm:42
> +    _configuration = adoptNS([configuration copy]);

copy

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm:51
> +    return [[_configuration copy] autorelease];

Why do we need copy/autorelease here if we did a copy in the initializer.
Comment 6 Anders Carlsson 2014-01-22 16:52:25 PST
(In reply to comment #5)
> (From update of attachment 221880 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=221880&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm:42
> > +    _configuration = adoptNS([configuration copy]);
> 
> copy

From the documentation:

        The initializer copies
        @link //apple_ref/doc/methodparam/WKProcessClass/initWithConfiguration:/configuration
        configuration@/link, so mutating it after initialization has no effect on the
        @link WKProcessClass @/link instance.

> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm:51
> > +    return [[_configuration copy] autorelease];
> 
> Why do we need copy/autorelease here if we did a copy in the initializer.

From the documentation:

/*! @abstract A copy of the configuration with which the @link WKProcessClass @/link was
        initialized.
*/