Bug 6238 - make even const PassRefPtrs give transfer of ownership semantics
Summary: make even const PassRefPtrs give transfer of ownership semantics
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Maciej Stachowiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-24 22:23 PST by Maciej Stachowiak
Modified: 2005-12-25 01:23 PST (History)
1 user (show)

See Also:


Attachments
evil hack (16.84 KB, patch)
2005-12-24 22:28 PST, Maciej Stachowiak
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2005-12-24 22:23:06 PST
Make even const PassRefPtrs give transfer of ownership semantics. This is a somewhat cheesy change. 
Having to use PassRefPtr_Ref creates ambiguities in assignment and copy construction. And this makes life 
way easier and removes the need for pass(). It is not really correct, but we pretty much never need a real 
const PassRefPtr, and this takes care of things for PassRefPtr temporaries.
Comment 1 Maciej Stachowiak 2005-12-24 22:28:47 PST
Created attachment 5277 [details]
evil hack
Comment 2 Eric Seidel (no email) 2005-12-24 22:39:46 PST
Comment on attachment 5277 [details]
evil hack

Looks sane.  You should at least add a comment in the header referencing this
bug and explaining why you are specifying const on these methods and in the
constructor.

Also, I think you probably want darin to weigh in on this one.
Comment 3 Dave Hyatt 2005-12-24 23:06:13 PST
Comment on attachment 5277 [details]
evil hack

r=me, agree with Eric's suggestions.