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

Unified Diff: Source/WebCore/dom/ScriptExecutionContext.cpp

Issue 6482007: Merge 76652 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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 | « Source/WebCore/dom/ScriptExecutionContext.h ('k') | Source/WebCore/html/DOMURL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/dom/ScriptExecutionContext.cpp
===================================================================
--- Source/WebCore/dom/ScriptExecutionContext.cpp (revision 78138)
+++ Source/WebCore/dom/ScriptExecutionContext.cpp (working copy)
@@ -30,6 +30,7 @@
#include "ActiveDOMObject.h"
#include "Blob.h"
#include "BlobURL.h"
+#include "DOMURL.h"
#include "Database.h"
#include "DatabaseTask.h"
#include "DatabaseThread.h"
@@ -120,6 +121,12 @@
HashSet<String>::iterator publicBlobURLsEnd = m_publicBlobURLs.end();
for (HashSet<String>::iterator iter = m_publicBlobURLs.begin(); iter != publicBlobURLsEnd; ++iter)
ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter));
+
+ HashSet<DOMURL*>::iterator domUrlsEnd = m_domUrls.end();
+ for (HashSet<DOMURL*>::iterator iter = m_domUrls.begin(); iter != domUrlsEnd; ++iter) {
+ ASSERT((*iter)->scriptExecutionContext() == this);
+ (*iter)->contextDestroyed();
+ }
#endif
}
@@ -194,6 +201,20 @@
m_messagePorts.remove(port);
}
+#if ENABLE(BLOB)
+void ScriptExecutionContext::createdDomUrl(DOMURL* url)
+{
+ ASSERT(url);
+ m_domUrls.add(url);
+}
+
+void ScriptExecutionContext::destroyedDomUrl(DOMURL* url)
+{
+ ASSERT(url);
+ m_domUrls.remove(url);
+}
+#endif
+
bool ScriptExecutionContext::canSuspendActiveDOMObjects()
{
// No protection against m_activeDOMObjects changing during iteration: canSuspend() shouldn't execute arbitrary JS.
« no previous file with comments | « Source/WebCore/dom/ScriptExecutionContext.h ('k') | Source/WebCore/html/DOMURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698