summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-10-09 17:07:41 +0100
committerSteve Block <steveblock@google.com>2009-10-20 00:45:05 +0100
commit8e1c14d2cd6633dac941b17af2bea9c045ee0140 (patch)
tree462ccf1f314221101a127d95d81a0419c8eb4301 /WebKit
parente372b0aa0721bf108058f04c43ad1365058369b2 (diff)
downloadexternal_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.zip
external_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.tar.gz
external_webkit-8e1c14d2cd6633dac941b17af2bea9c045ee0140.tar.bz2
Merge webkit.org at R49305 : Update String::copy call sites to use new copy method.
See http://trac.webkit.org/changeset/49160 Change-Id: I75e1d6701f4d16fab7513f5924abf00e958e865c
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/nav/CacheBuilder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp
index 80965d2..72dad07 100644
--- a/WebKit/android/nav/CacheBuilder.cpp
+++ b/WebKit/android/nav/CacheBuilder.cpp
@@ -1106,7 +1106,9 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
}
isPassword = input->inputType() == HTMLInputElement::PASSWORD;
maxLength = input->maxLength();
- name = input->name().string().copy();
+ // If this does not need to be threadsafe, we can use crossThreadString().
+ // See http://trac.webkit.org/changeset/49160.
+ name = input->name().string().threadsafeCopy();
isUnclipped = isTransparent; // can't detect if this is drawn on top (example: deviant.com login parts)
} else if (node->hasTagName(HTMLNames::textareaTag)) {
isTextArea = wantsKeyEvents = true;
@@ -1123,14 +1125,14 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame,
KURL href = anchorNode->href();
if (!href.isEmpty() && !WebCore::protocolIsJavaScript(href.string()))
// Set the exported string for all non-javascript anchors.
- exported = href.string().copy();
+ exported = href.string().threadsafeCopy();
}
if (isTextField || isTextArea) {
RenderTextControl* renderText =
static_cast<RenderTextControl*>(nodeRenderer);
if (isFocus)
cachedRoot->setSelection(renderText->selectionStart(), renderText->selectionEnd());
- exported = renderText->text().copy();
+ exported = renderText->text().threadsafeCopy();
// FIXME: Would it be better to use (float) size()?
// FIXME: Are we sure there will always be a style and font, and it's correct?
RenderStyle* style = nodeRenderer->style();