Bug 22465 - Define KURL::copy() and use it in WorkerThread.cpp
Summary: Define KURL::copy() and use it in WorkerThread.cpp
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-24 13:20 PST by Darin Fisher (:fishd, Google)
Modified: 2008-11-24 22:51 PST (History)
2 users (show)

See Also:


Attachments
v1 patch (2.23 KB, patch)
2008-11-24 15:25 PST, Darin Fisher (:fishd, Google)
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2008-11-24 13:20:01 PST
Define KURL::copy() and use it in WorkerThread.cpp

It would be handy to have a "deep copy" function on KURL to avoid re-parsing when passing a KURL to a background thread.
Comment 1 Darin Fisher (:fishd, Google) 2008-11-24 15:25:10 PST
Created attachment 25456 [details]
v1 patch
Comment 2 Geoffrey Garen 2008-11-24 22:14:31 PST
Comment on attachment 25456 [details]
v1 patch

"deepCopy" might be a better name for conveying that you shouldn't call this function if you don't mean it. Then you can remove this part of you comment, too:

// Makes a deep copy.

r=me
Comment 3 Adam Barth 2008-11-24 22:19:26 PST
There is some value in being consistent with other classes.  Should we change SecurityOrigin::copy to be deepCopy as well?
Comment 4 Darin Fisher (:fishd, Google) 2008-11-24 22:31:03 PST
What about String::copy()?  I was just replicating that.  Notice that my comments are very similar to the comments above String::copy()!  Should we change them all?
Comment 5 Darin Fisher (:fishd, Google) 2008-11-24 22:48:32 PST
http://trac.webkit.org/changeset/38746

Per discussion on #webkit, I'm going to file a follow-up bug to consider renaming all of these 'copy' methods to 'deepCopy'.
Comment 6 Darin Fisher (:fishd, Google) 2008-11-24 22:51:49 PST
Please see https://bugs.webkit.org/show_bug.cgi?id=22479 for the follow-up bug.