Title: [91943] trunk/Source/WebCore
Revision
91943
Author
beid...@apple.com
Date
2011-07-28 12:27:11 -0700 (Thu, 28 Jul 2011)

Log Message

https://bugs.webkit.org/show_bug.cgi?id=65323
r91931 causes NOTREACHED to be hit via StorageTracker

Change the meaning of the "has been initialized" flag to "needs initialization", and only set it to true
if the ::initializeTracker() method has been called.

Reviewed by Sam Weinig.

* storage/StorageTracker.cpp:
(WebCore::StorageTracker::initializeTracker): Set m_needsInitialization to true since the calling WebKit port expects full
  initialization instead of a dummy tracker.
(WebCore::StorageTracker::internalInitialize):
(WebCore::StorageTracker::tracker): Only initialize the tracker if it was created in the above initializeTracker().
(WebCore::StorageTracker::StorageTracker):
* storage/StorageTracker.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91942 => 91943)


--- trunk/Source/WebCore/ChangeLog	2011-07-28 19:03:55 UTC (rev 91942)
+++ trunk/Source/WebCore/ChangeLog	2011-07-28 19:27:11 UTC (rev 91943)
@@ -1,3 +1,21 @@
+2011-07-28  Brady Eidson  <beid...@apple.com>
+
+        https://bugs.webkit.org/show_bug.cgi?id=65323
+        r91931 causes NOTREACHED to be hit via StorageTracker
+
+        Change the meaning of the "has been initialized" flag to "needs initialization", and only set it to true
+        if the ::initializeTracker() method has been called.
+
+        Reviewed by Sam Weinig.
+
+        * storage/StorageTracker.cpp:
+        (WebCore::StorageTracker::initializeTracker): Set m_needsInitialization to true since the calling WebKit port expects full
+          initialization instead of a dummy tracker.
+        (WebCore::StorageTracker::internalInitialize):
+        (WebCore::StorageTracker::tracker): Only initialize the tracker if it was created in the above initializeTracker().
+        (WebCore::StorageTracker::StorageTracker):
+        * storage/StorageTracker.h:
+
 2011-07-28  David Kilzer  <ddkil...@apple.com>
 
         <http://webkit.org/b/65289> Remove GeolocationPositionCache

Modified: trunk/Source/WebCore/storage/StorageTracker.cpp (91942 => 91943)


--- trunk/Source/WebCore/storage/StorageTracker.cpp	2011-07-28 19:03:55 UTC (rev 91942)
+++ trunk/Source/WebCore/storage/StorageTracker.cpp	2011-07-28 19:27:11 UTC (rev 91943)
@@ -57,6 +57,7 @@
         storageTracker = new StorageTracker(storagePath);
     
     storageTracker->m_client = client;
+    storageTracker->m_needsInitialization = true;
 }
 
 void StorageTracker::internalInitialize()
@@ -72,14 +73,14 @@
     storageTracker->m_thread->start();  
     storageTracker->importOriginIdentifiers();
     
-    m_isInitialized = true;
+    m_needsInitialization = false;
 }
 
 StorageTracker& StorageTracker::tracker()
 {
     if (!storageTracker)
         storageTracker = new StorageTracker("");
-    if (!storageTracker->m_isInitialized)
+    if (storageTracker->m_needsInitialization)
         storageTracker->internalInitialize();
     
     return *storageTracker;
@@ -90,7 +91,7 @@
     , m_client(0)
     , m_thread(LocalStorageThread::create())
     , m_isActive(false)
-    , m_isInitialized(false)
+    , m_needsInitialization(false)
 {
 }
 

Modified: trunk/Source/WebCore/storage/StorageTracker.h (91942 => 91943)


--- trunk/Source/WebCore/storage/StorageTracker.h	2011-07-28 19:03:55 UTC (rev 91942)
+++ trunk/Source/WebCore/storage/StorageTracker.h	2011-07-28 19:27:11 UTC (rev 91943)
@@ -112,7 +112,7 @@
     OwnPtr<LocalStorageThread> m_thread;
     
     bool m_isActive;
-    bool m_isInitialized;
+    bool m_needsInitialization;
 };
     
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to