| Index: Source/WebCore/html/HTMLTitleElement.cpp
|
| ===================================================================
|
| --- Source/WebCore/html/HTMLTitleElement.cpp (revision 109461)
|
| +++ Source/WebCore/html/HTMLTitleElement.cpp (working copy)
|
| @@ -88,12 +88,14 @@
|
|
|
| void HTMLTitleElement::setText(const String &value)
|
| {
|
| + RefPtr<Node> protectFromMutationEvents(this);
|
| +
|
| ExceptionCode ec = 0;
|
| int numChildren = childNodeCount();
|
|
|
| if (numChildren == 1 && firstChild()->isTextNode())
|
| static_cast<Text*>(firstChild())->setData(value, ec);
|
| - else {
|
| + else {
|
| // We make a copy here because entity of "value" argument can be Document::m_title,
|
| // which goes empty during removeChildren() invocation below,
|
| // which causes HTMLTitleElement::childrenChanged(), which ends up Document::setTitle().
|
|
|