Changeset 27004 in webkit
- Timestamp:
- Oct 24, 2007 4:02:02 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r27000 r27004 1 2007-10-24 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders 4 5 <rdar://5554130> DatabaseTracker.o has a global initializer 6 7 Since DatabaseTracker is a singleton, it makes much more sense to keep the database path as a member variable. 8 Now constructing the shared DatabaseTracker no longer implicitly opens it - It is only opened when the databases 9 path is set. 10 11 * WebCore.vcproj/WebCore.vcproj: Copy WebCore/storage headers for WebKit build 12 13 * storage/Database.cpp: 14 (WebCore::Database::~Database): Remove bogus assertion 15 16 * storage/DatabaseTracker.cpp: 17 (WebCore::DatabaseTracker::DatabaseTracker): Does nothing now! Move this code to openTrackerDatabase 18 (WebCore::DatabaseTracker::setDatabasePath): Set the member variable, also closing/opening the database if needed 19 (WebCore::DatabaseTracker::databasePath): 20 (WebCore::DatabaseTracker::openTrackerDatabase): To open and validate the Databases db, moved from the c'tor 21 (WebCore::DatabaseTracker::fullPathForDatabase): Return the member variable 22 * storage/DatabaseTracker.h: 23 1 24 2007-10-24 David Hyatt <hyatt@apple.com> 2 25 -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r26907 r27004 233 233 <Tool 234 234 Name="VCPostBuildEventTool" 235 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\sql\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir) \..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

mkdir 2>NUL "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
xcopy /y /d /s /exclude:xcopy.excludes "$(ProjectDir)\..\page\inspector\*" "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
"235 CommandLine="mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
mkdir 2>NUL "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

xcopy /y /d "$(ProjectDir)..\config.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\loader\icon\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\history\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\html\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\graphics\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\cf\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\network\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\platform\sql\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\platform\cairo\cairo\src\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bindings\js\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y "$(ProjectDir)..\bridge\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\page\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\plugins\win\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\rendering\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\editing\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\dom\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\xml\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\css\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\events\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\misc\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\scripts\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\ksvg2\svg\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)..\storage\*.h" "$(WebKitOutputDir)\include\WebCore"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\bindings\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\kjs\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\pcre\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode"
xcopy /y /d "$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h" "$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu"

mkdir 2>NUL "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
xcopy /y /d /s /exclude:xcopy.excludes "$(ProjectDir)\..\page\inspector\*" "$(WebKitOutputDir)\bin\WebKit.resources\inspector"
" 236 236 /> 237 237 </Configuration> -
trunk/WebCore/storage/Database.cpp
r26864 r27004 162 162 guidToDatabaseMap().remove(m_guid); 163 163 delete hashSet; 164 ASSERT(guidToVersionMap().contains(m_guid));165 164 guidToVersionMap().remove(m_guid); 166 165 } -
trunk/WebCore/storage/DatabaseTracker.cpp
r26797 r27004 36 36 namespace WebCore { 37 37 38 String DatabaseTracker::s_databasePath; 38 DatabaseTracker& DatabaseTracker::tracker() 39 { 40 static DatabaseTracker tracker; 41 42 return tracker; 43 } 44 45 DatabaseTracker::DatabaseTracker() 46 { 47 } 39 48 40 49 void DatabaseTracker::setDatabasePath(const String& path) 41 { 42 s_databasePath = path; 50 { 51 m_databasePath = path; 52 openTrackerDatabase(); 43 53 } 44 54 45 55 const String& DatabaseTracker::databasePath() 46 56 { 47 return s_databasePath; 48 } 49 50 DatabaseTracker& DatabaseTracker::tracker() 51 { 52 static DatabaseTracker tracker; 53 54 return tracker; 55 } 56 57 DatabaseTracker::DatabaseTracker() 58 { 59 String databasePath = DatabaseTracker::databasePath(); 60 makeAllDirectories(databasePath); 61 databasePath = pathByAppendingComponent(databasePath, "Databases.db"); 57 return m_databasePath; 58 } 59 60 void DatabaseTracker::openTrackerDatabase() 61 { 62 ASSERT(!m_database.isOpen()); 63 64 makeAllDirectories(m_databasePath); 65 String databasePath = pathByAppendingComponent(m_databasePath, "Databases.db"); 62 66 63 67 if (!m_database.open(databasePath)) { … … 77 81 } 78 82 } 79 83 80 84 String DatabaseTracker::fullPathForDatabase(const String& origin, const String& name) 81 85 { 82 String databasePath = DatabaseTracker::databasePath();83 86 SQLStatement statement(m_database, "SELECT path FROM Databases WHERE origin=? AND name=?;"); 84 87 … … 92 95 93 96 if (result == SQLResultRow) 94 return pathByAppendingComponent( databasePath, statement.getColumnText16(0));97 return pathByAppendingComponent(m_databasePath, statement.getColumnText16(0)); 95 98 if (result != SQLResultDone) { 96 99 LOG_ERROR("Failed to retrieve filename from Database Tracker for origin %s, name %s", origin.ascii().data(), name.ascii().data()); … … 116 119 do { 117 120 ++seq; 118 filename = pathByAppendingComponent( databasePath, String::format("%016llx.db", seq));121 filename = pathByAppendingComponent(m_databasePath, String::format("%016llx.db", seq)); 119 122 } while (fileExists(filename)); 120 123 -
trunk/WebCore/storage/DatabaseTracker.h
r26787 r27004 40 40 class DatabaseTracker { 41 41 public: 42 staticvoid setDatabasePath(const String&);43 staticconst String& databasePath();42 void setDatabasePath(const String&); 43 const String& databasePath(); 44 44 45 45 String fullPathForDatabase(const String& origin, const String& name); … … 56 56 DatabaseTracker(); 57 57 58 void openTrackerDatabase(); 59 58 60 bool addDatabase(const String& origin, const String& name, const String& path); 59 61 void populateOrigins(); … … 62 64 mutable OwnPtr<HashSet<String> > m_origins; 63 65 64 static String s_databasePath;66 String m_databasePath; 65 67 }; 66 68 -
trunk/WebKit/ChangeLog
r26918 r27004 1 2007-10-24 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders 4 5 <rdar://problem/5554130> DatabaseTracker.o has a global initializer 6 7 * Misc/WebDatabaseManager.mm: 8 (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one 9 1 10 2007-10-23 Mark Rowe <mrowe@apple.com> 2 11 -
trunk/WebKit/Misc/WebDatabaseManager.mm
r26787 r27004 97 97 databasesDirectory = @"~/Library/WebKit/Databases"; 98 98 99 DatabaseTracker:: setDatabasePath([databasesDirectory stringByStandardizingPath]);99 DatabaseTracker::tracker().setDatabasePath([databasesDirectory stringByStandardizingPath]); 100 100 101 101 pathSet = YES; -
trunk/WebKit/win/ChangeLog
r27003 r27004 1 2007-10-24 Brady Eidson <beidson@apple.com> 2 3 Reviewed by Anders 4 5 Windows portion of <rdar://5554130> 6 7 Slowly introduce Windows WebKit portion of the Database API that sets the 8 on-disk location for databases 9 10 * WebDatabaseManager.cpp: Added. 11 (WebKitSetWebDatabasesPathIfNecessary): 12 * WebDatabaseManager.h: Added. 13 14 * WebKit.vcproj/WebKit.vcproj: 15 16 * WebView.cpp: 17 (WebView::initWithFrame): Call WebKitSetWebDatabasesPathIfNecessary() 18 1 19 2007-10-24 Kevin McCullough <kmccullough@apple.com> 2 20 -
trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj
r26684 r27004 414 414 </File> 415 415 <File 416 RelativePath="..\WebDatabaseManager.h" 417 > 418 </File> 419 <File 416 420 RelativePath="..\WebDataSource.h" 417 421 > … … 627 631 <File 628 632 RelativePath="..\WebContextMenuClient.cpp" 633 > 634 </File> 635 <File 636 RelativePath="..\WebDatabaseManager.cpp" 629 637 > 630 638 </File> -
trunk/WebKit/win/WebView.cpp
r26928 r27004 31 31 #include "DOMCoreClasses.h" 32 32 #include "IWebNotification.h" 33 #include "WebDatabaseManager.h" 33 34 #include "WebDebugProgram.h" 34 35 #include "WebDocumentLoader.h" … … 1815 1816 m_groupName = String(groupName, SysStringLen(groupName)); 1816 1817 1818 WebKitSetWebDatabasesPathIfNecessary(); 1819 1817 1820 m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this)); 1818 1821 // FIXME: 4931464 - When we do cache pages on Windows this needs to be removed so the "should I cache this page?" check
Note: See TracChangeset
for help on using the changeset viewer.