- Revision
- 116970
- Author
- [email protected]
- Date
- 2012-05-14 11:14:26 -0700 (Mon, 14 May 2012)
Log Message
Unreviewed, rolling out r116969.
http://trac.webkit.org/changeset/116969
https://bugs.webkit.org/show_bug.cgi?id=86386
i accidentally the icondatabase (Requested by kling on
#webkit).
Patch by Sheriff Bot <[email protected]> on 2012-05-14
Source/WebCore:
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousIconForPageURL):
(WebCore::IconDatabase::retainIconForPageURL):
(WebCore::IconDatabase::releaseIconForPageURL):
(WebCore::IconDatabase::retainedPageURLCount):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::syncThreadMainLoop):
* loader/icon/IconDatabase.h:
(IconDatabase):
Source/WebKit2:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (116969 => 116970)
--- trunk/Source/WebCore/ChangeLog 2012-05-14 18:04:17 UTC (rev 116969)
+++ trunk/Source/WebCore/ChangeLog 2012-05-14 18:14:26 UTC (rev 116970)
@@ -1,3 +1,22 @@
+2012-05-14 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r116969.
+ http://trac.webkit.org/changeset/116969
+ https://bugs.webkit.org/show_bug.cgi?id=86386
+
+ i accidentally the icondatabase (Requested by kling on
+ #webkit).
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::synchronousIconForPageURL):
+ (WebCore::IconDatabase::retainIconForPageURL):
+ (WebCore::IconDatabase::releaseIconForPageURL):
+ (WebCore::IconDatabase::retainedPageURLCount):
+ (WebCore::IconDatabase::performURLImport):
+ (WebCore::IconDatabase::syncThreadMainLoop):
+ * loader/icon/IconDatabase.h:
+ (IconDatabase):
+
2012-05-14 Kevin Ollivier <[email protected]>
[wx] Unreviewed build fix. Fix for wxMSW windows.h load order bug.
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.cpp (116969 => 116970)
--- trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2012-05-14 18:04:17 UTC (rev 116969)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.cpp 2012-05-14 18:14:26 UTC (rev 116970)
@@ -222,9 +222,6 @@
return 0;
MutexLocker locker(m_urlAndIconLock);
-
- if (m_retainOrReleaseIconRequested)
- performPendingRetainAndReleaseOperations();
String pageURLCopy; // Creates a null string for easy testing
@@ -392,20 +389,18 @@
return m_defaultIconRecord->image(size);
}
-void IconDatabase::retainIconForPageURL(const String& pageURL)
-{
- ASSERT_NOT_SYNC_THREAD();
- if (!isEnabled() || !documentCanHaveIcon(pageURL))
+void IconDatabase::retainIconForPageURL(const String& pageURLOriginal)
+{
+ ASSERT_NOT_SYNC_THREAD();
+
+ // Cannot do anything with pageURLOriginal that would end up storing it without deep copying first
+
+ if (!isEnabled() || !documentCanHaveIcon(pageURLOriginal))
return;
- MutexLocker locker(m_urlsToRetainOrReleaseLock);
- m_urlsToRetain.append(pageURL);
- scheduleOrDeferSyncTimer();
-}
+ MutexLocker locker(m_urlAndIconLock);
-void IconDatabase::performRetainIconForPageURL(const String& pageURLOriginal)
-{
PageURLRecord* record = m_pageURLToRecordMap.get(pageURLOriginal);
String pageURL;
@@ -439,23 +434,17 @@
}
}
-void IconDatabase::releaseIconForPageURL(const String& pageURL)
+void IconDatabase::releaseIconForPageURL(const String& pageURLOriginal)
{
ASSERT_NOT_SYNC_THREAD();
// Cannot do anything with pageURLOriginal that would end up storing it without deep copying first
- if (!isEnabled() || !documentCanHaveIcon(pageURL))
+ if (!isEnabled() || !documentCanHaveIcon(pageURLOriginal))
return;
+
+ MutexLocker locker(m_urlAndIconLock);
- MutexLocker locker(m_urlsToRetainOrReleaseLock);
- m_urlsToRelease.append(pageURL);
- m_retainOrReleaseIconRequested = true;
- scheduleOrDeferSyncTimer();
-}
-
-void IconDatabase::performReleaseIconForPageURL(const String& pageURLOriginal)
-{
// Check if this pageURL is actually retained
if (!m_retainedPageURLs.contains(pageURLOriginal)) {
LOG_ERROR("Attempting to release icon for URL %s which is not retained", urlForLogging(pageURLOriginal).ascii().data());
@@ -509,6 +498,9 @@
}
delete pageRecord;
+
+ if (isOpen())
+ scheduleOrDeferSyncTimer();
}
void IconDatabase::setIconDataForIconURL(PassRefPtr<SharedBuffer> dataOriginal, const String& iconURLOriginal)
@@ -744,10 +736,6 @@
size_t IconDatabase::retainedPageURLCount()
{
MutexLocker locker(m_urlAndIconLock);
-
- if (m_retainOrReleaseIconRequested)
- performPendingRetainAndReleaseOperations();
-
return m_retainedPageURLs.size();
}
@@ -1318,10 +1306,7 @@
// Keep a set of ones that are retained and pending notification
{
MutexLocker locker(m_urlAndIconLock);
-
- if (m_retainOrReleaseIconRequested)
- performPendingRetainAndReleaseOperations();
-
+
for (unsigned i = 0; i < urls.size(); ++i) {
if (!m_retainedPageURLs.contains(urls[i])) {
PageURLRecord* record = m_pageURLToRecordMap.get(urls[i]);
@@ -1402,11 +1387,6 @@
// Then, if the thread should be quitting, quit now!
if (m_threadTerminationRequested)
break;
-
- if (m_retainOrReleaseIconRequested) {
- MutexLocker locker(m_urlAndIconLock);
- performPendingRetainAndReleaseOperations();
- }
bool didAnyWork = true;
while (didAnyWork) {
@@ -1491,25 +1471,6 @@
}
}
-void IconDatabase::performPendingRetainAndReleaseOperations()
-{
- ASSERT(m_retainOrReleaseIconRequested);
-
- // NOTE: The caller is assumed to hold m_urlAndIconLock.
-
- MutexLocker vectorLocker(m_urlsToRetainOrReleaseLock);
-
- for (unsigned i = 0; i < m_urlsToRetain.size(); ++i)
- performRetainIconForPageURL(m_urlsToRetain[i]);
- for (unsigned i = 0; i < m_urlsToRelease.size(); ++i)
- performReleaseIconForPageURL(m_urlsToRelease[i]);
- printf("Retained %lu, released %lu\n", m_urlsToRetain.size(), m_urlsToRelease.size());
-
- m_urlsToRetain.clear();
- m_urlsToRelease.clear();
- m_retainOrReleaseIconRequested = false;
-}
-
bool IconDatabase::readFromDatabase()
{
ASSERT_ICON_SYNC_THREAD();
Modified: trunk/Source/WebCore/loader/icon/IconDatabase.h (116969 => 116970)
--- trunk/Source/WebCore/loader/icon/IconDatabase.h 2012-05-14 18:04:17 UTC (rev 116969)
+++ trunk/Source/WebCore/loader/icon/IconDatabase.h 2012-05-14 18:14:26 UTC (rev 116970)
@@ -159,7 +159,6 @@
bool m_iconURLImportComplete;
bool m_syncThreadHasWorkToDo;
bool m_disabledSuddenTerminationForSyncThread;
- bool m_retainOrReleaseIconRequested;
Mutex m_urlAndIconLock;
// Holding m_urlAndIconLock is required when accessing any of the following data structures or the objects they contain
@@ -178,11 +177,6 @@
HashSet<String> m_pageURLsInterestedInIcons;
HashSet<IconRecord*> m_iconsPendingReading;
- Mutex m_urlsToRetainOrReleaseLock;
- // Holding m_urlsToRetainOrReleaseLock is required when accessing any of the following data structures.
- Vector<String> m_urlsToRetain;
- Vector<String> m_urlsToRelease;
-
// *** Sync Thread Only ***
public:
// Should be used only on the sync thread and only by the Safari 2 Icons import procedure
@@ -208,8 +202,6 @@
void removeAllIconsOnThread();
void deleteAllPreparedStatements();
void* cleanupSyncThread();
- void performRetainIconForPageURL(const String&);
- void performReleaseIconForPageURL(const String&);
// Record (on disk) whether or not Safari 2-style icons were imported (once per dataabse)
bool imported();
@@ -228,9 +220,7 @@
PassRefPtr<SharedBuffer> getImageDataForIconURLFromSQLDatabase(const String& iconURL);
void removeIconFromSQLDatabase(const String& iconURL);
void writeIconSnapshotToSQLDatabase(const IconSnapshot&);
-
- void performPendingRetainAndReleaseOperations();
-
+
// Methods to dispatch client callbacks on the main thread
void dispatchDidImportIconURLForPageURLOnMainThread(const String&);
void dispatchDidImportIconDataForPageURLOnMainThread(const String&);
Modified: trunk/Source/WebKit2/ChangeLog (116969 => 116970)
--- trunk/Source/WebKit2/ChangeLog 2012-05-14 18:04:17 UTC (rev 116969)
+++ trunk/Source/WebKit2/ChangeLog 2012-05-14 18:14:26 UTC (rev 116970)
@@ -1,3 +1,15 @@
+2012-05-14 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r116969.
+ http://trac.webkit.org/changeset/116969
+ https://bugs.webkit.org/show_bug.cgi?id=86386
+
+ i accidentally the icondatabase (Requested by kling on
+ #webkit).
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::~WebContext):
+
2012-05-14 Andreas Kling <[email protected]>
REGRESSION(r116796): Assertion failure in API tests
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (116969 => 116970)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-05-14 18:04:17 UTC (rev 116969)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-05-14 18:14:26 UTC (rev 116970)
@@ -166,8 +166,6 @@
WebContext::~WebContext()
{
- m_pluginWorkQueue.invalidate();
-
if (m_process && m_process->isValid())
m_process->connection()->removeQueueClient(this);