Fix an ASSERT on launch on Windows
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2007 00:10:18 +0000 (00:10 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2007 00:10:18 +0000 (00:10 +0000)
        Fix dictated to me by Brady.

        * loader/icon/IconDatabase.cpp:
        (WebCore::IconDatabase::syncThreadMainLoop): Make sure we hold
        m_syncLock before going into the loop.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@26726 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/icon/IconDatabase.cpp

index 59cedf086f42adb4f20f3e94f85aec1e0e7cfbd7..24ce1d7a305b96ced88fb8298d089150082b873c 100644 (file)
@@ -4,6 +4,16 @@
 
         * Configurations/WebCore.xcconfig:  Make it possible to include CoreGraphics header files.
 
+2007-10-17  Adam Roben  <aroben@apple.com>
+
+        Fix an ASSERT on launch on Windows
+
+        Fix dictated to me by Brady.
+
+        * loader/icon/IconDatabase.cpp:
+        (WebCore::IconDatabase::syncThreadMainLoop): Make sure we hold
+        m_syncLock before going into the loop.
+
 2007-10-17  Adam Roben  <aroben@apple.com>
 
         Windows build fix
index d89090eee0effd57038a41fb61f35f5b851a875b..a8820038cc873b1238983d38519666b9fd98b98d 100644 (file)
@@ -1348,6 +1348,8 @@ void* IconDatabase::syncThreadMainLoop()
     ASSERT_ICON_SYNC_THREAD();
     static bool prunedUnretainedIcons = false;
 
+    m_syncLock.lock();
+
     // It's possible thread termination is requested before the main loop even starts - in that case, just skip straight to cleanup
     while (!m_threadTerminationRequested) {
         m_syncLock.unlock();