| Index: webkit/port/platform/GKURL.cpp
|
| ===================================================================
|
| --- webkit/port/platform/GKURL.cpp (revision 7051)
|
| +++ webkit/port/platform/GKURL.cpp (working copy)
|
| @@ -107,6 +107,14 @@
|
| {
|
| }
|
|
|
| +void KURL::URLString::copyTo(URLString* dest) const
|
| +{
|
| + // Don't copy the 16-bit string since that will be regenerated as needed.
|
| + dest->m_utf8 = CString(m_utf8.data(), m_utf8.length());
|
| + dest->m_stringIsValid = false;
|
| + dest->m_utf8IsASCII = m_utf8IsASCII;
|
| +}
|
| +
|
| // Setters for the data. Using the ASCII version when you know the
|
| // data is ASCII will be slightly more efficient. The UTF-8 version
|
| // will always be correct if the caller is unsure.
|
| @@ -327,9 +335,10 @@
|
|
|
| KURL KURL::copy() const
|
| {
|
| - KURL result = *this;
|
| - // TODO(brettw): http://crbug.com/4975 Make this a deep copy.
|
| - // result.m_string = result.m_string.copy();
|
| + KURL result;
|
| + m_url.copyTo(&result.m_url);
|
| + result.m_isValid = m_isValid;
|
| + result.m_parsed = m_parsed;
|
| return result;
|
| }
|
|
|
|
|