Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: Source/WebCore/bindings/v8/V8DOMWindowShell.cpp

Issue 9667038: Merge 108780 - [v8] when a named item on document goes out of scope, actually remove it (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/dom/HTMLDocument/named-item-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/V8DOMWindowShell.cpp
===================================================================
--- Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (revision 110399)
+++ Source/WebCore/bindings/v8/V8DOMWindowShell.cpp (working copy)
@@ -577,6 +577,18 @@
void V8DOMWindowShell::namedItemRemoved(HTMLDocument* doc, const AtomicString& name)
{
+ if (doc->hasNamedItem(name.impl()) || doc->hasExtraNamedItem(name.impl()))
+ return;
+
+ if (!initContextIfNeeded())
+ return;
+
+ v8::HandleScope handleScope;
+ v8::Context::Scope contextScope(m_context);
+
+ ASSERT(!m_document.IsEmpty());
+ checkDocumentWrapper(m_document, doc);
+ m_document->Delete(v8String(name));
}
void V8DOMWindowShell::updateSecurityOrigin()
« no previous file with comments | « LayoutTests/fast/dom/HTMLDocument/named-item-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698