diff options
| author | Grace Kloba <klobag@google.com> | 2009-07-06 18:30:11 -0700 |
|---|---|---|
| committer | Grace Kloba <klobag@google.com> | 2009-07-06 18:30:11 -0700 |
| commit | b116c1a08412db8a748998c7e8a2ce851cbacacd (patch) | |
| tree | c96a50520261a92b4976b5679e61f53f81e1df81 /WebKit | |
| parent | 7ba1b9e1a023eac627eab4d7b3d29bf4c4c5370b (diff) | |
| download | external_webkit-b116c1a08412db8a748998c7e8a2ce851cbacacd.zip external_webkit-b116c1a08412db8a748998c7e8a2ce851cbacacd.tar.gz external_webkit-b116c1a08412db8a748998c7e8a2ce851cbacacd.tar.bz2 | |
Make deep copy of the String when use them in the UI thread as AtomicString is not thread safe.
Diffstat (limited to 'WebKit')
| -rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 8c350bf..a49c614 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1153,7 +1153,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, isTextField = input->isTextField(); isPassword = input->inputType() == HTMLInputElement::PASSWORD; maxLength = input->maxLength(); - name = String(input->name().string()); + name = input->name().string().copy(); isUnclipped = isTransparent; // can't detect if this is drawn on top (example: deviant.com login parts) } else if (node->hasTagName(HTMLNames::textareaTag)) isTextArea = true; @@ -1170,14 +1170,14 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, KURL href = anchorNode->href(); if (!href.isEmpty() && !href.protocolIs("javascript")) // Set the exported string for all non-javascript anchors. - exported = href.string(); + exported = href.string().copy(); } if (isTextField || isTextArea) { RenderTextControl* renderText = static_cast<RenderTextControl*>(nodeRenderer); if (isFocus) cachedRoot->setSelection(renderText->selectionStart(), renderText->selectionEnd()); - exported = String(renderText->text()); + exported = renderText->text().copy(); // 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(); |
