DescriptionRemove children of title node before updating
http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document.title
Extra care must be taken because of mutation events, which may cause
just about anything to happen including m_titleElement to be removed
itself when removing its children (see
LayoutTests/fast/dom/document-set-title-mutation-crash.html
for a good example). So make sure to again check m_titleElement before
actually setting the new title text.
Also update a related code comment that had rotted a bit.
Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=28864
BUG=330140
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164228
Patch Set 1 #Patch Set 2 : remove children before updateTitle for less title update dispatches #
Messages
Total messages: 9 (0 generated)
|