Bug 44728 - Adopt more uses OwnPtr/OwnArray in WebKit2
Summary: Adopt more uses OwnPtr/OwnArray in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 15:48 PDT by Sam Weinig
Modified: 2010-08-26 18:49 PDT (History)
1 user (show)

See Also:


Attachments
Patch (29.25 KB, patch)
2010-08-26 15:50 PDT, Sam Weinig
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2010-08-26 15:48:44 PDT
Adopt more uses OwnPtr/OwnArray in WebKit2
Comment 1 Sam Weinig 2010-08-26 15:50:01 PDT
Created attachment 65636 [details]
Patch
Comment 2 Early Warning System Bot 2010-08-26 16:01:47 PDT
Attachment 65636 [details] did not build on qt:
Build output: http://queues.webkit.org/results/3808087
Comment 3 Darin Adler 2010-08-26 17:48:25 PDT
Comment on attachment 65636 [details]
Patch

> -    for (size_t i = 0; i < m_size; ++i)
> -        m_entries[i]->ref();

You got rid of the ref() here. That is not right, is it?

Should this be an array of RefPtr<APIObject>?

r=me as long as you fix that ref thing
Comment 4 Sam Weinig 2010-08-26 18:34:20 PDT
(In reply to comment #3)
> (From update of attachment 65636 [details])
> > -    for (size_t i = 0; i < m_size; ++i)
> > -        m_entries[i]->ref();
> 
> You got rid of the ref() here. That is not right, is it?

It is.  I commented in the changelog that I change the semantics of this function to match the adopt function. It is currently unused.

> Should this be an array of RefPtr<APIObject>?

It can't be if we want to allow the adoption semantics to remain the same (the C API is allowed to give a buffer that is adopted by the Array).
Comment 5 Sam Weinig 2010-08-26 18:49:31 PDT
Landed in r66165.