Bug 6238

Summary: make even const PassRefPtrs give transfer of ownership semantics
Product: WebKit Reporter: Maciej Stachowiak <mjs>
Component: WebKit Misc.Assignee: Maciej Stachowiak <mjs>
Status: RESOLVED FIXED    
Severity: Normal CC: darin
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
evil hack hyatt: review+

Maciej Stachowiak
Reported 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.
Attachments
evil hack (16.84 KB, patch)
2005-12-24 22:28 PST, Maciej Stachowiak
hyatt: review+
Maciej Stachowiak
Comment 1 2005-12-24 22:28:47 PST
Created attachment 5277 [details] evil hack
Eric Seidel (no email)
Comment 2 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.
Dave Hyatt
Comment 3 2005-12-24 23:06:13 PST
Comment on attachment 5277 [details] evil hack r=me, agree with Eric's suggestions.
Note You need to log in before you can comment on or make changes to this bug.