Bug 1164717 - Flatten storage/src/ directory. r=mak
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Tue, 19 May 2015 10:47:33 -0700
changeset 244697 dd79977a3286d947aff8e270245d05c05e676964
parent 244696 ad01543457e739b4eee7a245e16734a3ecfd10ad
child 244698 9d969a0677da2db7caae67f492ad19b99235f754
push id13044
push usercbook@mozilla.com
push dateWed, 20 May 2015 14:10:38 +0000
treeherderfx-team@32382625e449 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1164717
milestone41.0a1
Bug 1164717 - Flatten storage/src/ directory. r=mak
storage/FileSystemModule.cpp
storage/FileSystemModule.h
storage/IStorageBindingParamsInternal.h
storage/SQLCollations.cpp
storage/SQLCollations.h
storage/SQLiteMutex.h
storage/StorageBaseStatementInternal.cpp
storage/StorageBaseStatementInternal.h
storage/TelemetryVFS.cpp
storage/VacuumManager.cpp
storage/VacuumManager.h
storage/Variant.h
storage/Variant_inl.h
storage/build/moz.build
storage/moz.build
storage/mozStorageArgValueArray.cpp
storage/mozStorageArgValueArray.h
storage/mozStorageAsyncStatement.cpp
storage/mozStorageAsyncStatement.h
storage/mozStorageAsyncStatementExecution.cpp
storage/mozStorageAsyncStatementExecution.h
storage/mozStorageAsyncStatementJSHelper.cpp
storage/mozStorageAsyncStatementJSHelper.h
storage/mozStorageAsyncStatementParams.cpp
storage/mozStorageAsyncStatementParams.h
storage/mozStorageBindingParams.cpp
storage/mozStorageBindingParams.h
storage/mozStorageBindingParamsArray.cpp
storage/mozStorageBindingParamsArray.h
storage/mozStorageConnection.cpp
storage/mozStorageConnection.h
storage/mozStorageError.cpp
storage/mozStorageError.h
storage/mozStoragePrivateHelpers.cpp
storage/mozStoragePrivateHelpers.h
storage/mozStorageResultSet.cpp
storage/mozStorageResultSet.h
storage/mozStorageRow.cpp
storage/mozStorageRow.h
storage/mozStorageSQLFunctions.cpp
storage/mozStorageSQLFunctions.h
storage/mozStorageService.cpp
storage/mozStorageService.h
storage/mozStorageStatement.cpp
storage/mozStorageStatement.h
storage/mozStorageStatementData.h
storage/mozStorageStatementJSHelper.cpp
storage/mozStorageStatementJSHelper.h
storage/mozStorageStatementParams.cpp
storage/mozStorageStatementParams.h
storage/mozStorageStatementRow.cpp
storage/mozStorageStatementRow.h
storage/src/FileSystemModule.cpp
storage/src/FileSystemModule.h
storage/src/IStorageBindingParamsInternal.h
storage/src/SQLCollations.cpp
storage/src/SQLCollations.h
storage/src/SQLiteMutex.h
storage/src/StorageBaseStatementInternal.cpp
storage/src/StorageBaseStatementInternal.h
storage/src/TelemetryVFS.cpp
storage/src/VacuumManager.cpp
storage/src/VacuumManager.h
storage/src/Variant.h
storage/src/Variant_inl.h
storage/src/moz.build
storage/src/mozStorageArgValueArray.cpp
storage/src/mozStorageArgValueArray.h
storage/src/mozStorageAsyncStatement.cpp
storage/src/mozStorageAsyncStatement.h
storage/src/mozStorageAsyncStatementExecution.cpp
storage/src/mozStorageAsyncStatementExecution.h
storage/src/mozStorageAsyncStatementJSHelper.cpp
storage/src/mozStorageAsyncStatementJSHelper.h
storage/src/mozStorageAsyncStatementParams.cpp
storage/src/mozStorageAsyncStatementParams.h
storage/src/mozStorageBindingParams.cpp
storage/src/mozStorageBindingParams.h
storage/src/mozStorageBindingParamsArray.cpp
storage/src/mozStorageBindingParamsArray.h
storage/src/mozStorageConnection.cpp
storage/src/mozStorageConnection.h
storage/src/mozStorageError.cpp
storage/src/mozStorageError.h
storage/src/mozStoragePrivateHelpers.cpp
storage/src/mozStoragePrivateHelpers.h
storage/src/mozStorageResultSet.cpp
storage/src/mozStorageResultSet.h
storage/src/mozStorageRow.cpp
storage/src/mozStorageRow.h
storage/src/mozStorageSQLFunctions.cpp
storage/src/mozStorageSQLFunctions.h
storage/src/mozStorageService.cpp
storage/src/mozStorageService.h
storage/src/mozStorageStatement.cpp
storage/src/mozStorageStatement.h
storage/src/mozStorageStatementData.h
storage/src/mozStorageStatementJSHelper.cpp
storage/src/mozStorageStatementJSHelper.h
storage/src/mozStorageStatementParams.cpp
storage/src/mozStorageStatementParams.h
storage/src/mozStorageStatementRow.cpp
storage/src/mozStorageStatementRow.h
storage/src/variantToSQLiteT_impl.h
storage/test/moz.build
storage/test/unit/test_statement_wrapper_automatically.js
storage/variantToSQLiteT_impl.h
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/nsPlacesAutoComplete.js
rename from storage/src/FileSystemModule.cpp
rename to storage/FileSystemModule.cpp
rename from storage/src/FileSystemModule.h
rename to storage/FileSystemModule.h
rename from storage/src/IStorageBindingParamsInternal.h
rename to storage/IStorageBindingParamsInternal.h
rename from storage/src/SQLCollations.cpp
rename to storage/SQLCollations.cpp
rename from storage/src/SQLCollations.h
rename to storage/SQLCollations.h
rename from storage/src/SQLiteMutex.h
rename to storage/SQLiteMutex.h
rename from storage/src/StorageBaseStatementInternal.cpp
rename to storage/StorageBaseStatementInternal.cpp
rename from storage/src/StorageBaseStatementInternal.h
rename to storage/StorageBaseStatementInternal.h
rename from storage/src/TelemetryVFS.cpp
rename to storage/TelemetryVFS.cpp
rename from storage/src/VacuumManager.cpp
rename to storage/VacuumManager.cpp
rename from storage/src/VacuumManager.h
rename to storage/VacuumManager.h
rename from storage/src/Variant.h
rename to storage/Variant.h
rename from storage/src/Variant_inl.h
rename to storage/Variant_inl.h
--- a/storage/build/moz.build
+++ b/storage/build/moz.build
@@ -11,11 +11,13 @@ EXPORTS += [
 SOURCES += [
     'mozStorageModule.cpp',
 ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 
-LOCAL_INCLUDES += ['../src']
+LOCAL_INCLUDES += [
+    '..',
+]
 
 CXXFLAGS += CONFIG['SQLITE_CFLAGS']
--- a/storage/moz.build
+++ b/storage/moz.build
@@ -1,15 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-DIRS += ['src', 'build']
+DIRS += ['build']
 
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'mozIStorageAggregateFunction.idl',
     'mozIStorageAsyncConnection.idl',
     'mozIStorageAsyncStatement.idl',
     'mozIStorageBaseStatement.idl',
@@ -41,10 +41,75 @@ EXPORTS += [
 EXPORTS.mozilla += [
     'storage.h',
 ]
 
 # NOTE When adding something to this list, you probably need to add it to the
 #      storage.h file too.
 EXPORTS.mozilla.storage += [
     'StatementCache.h',
+    'Variant.h',
+    'Variant_inl.h',
 ]
 # SEE ABOVE NOTE!
+
+UNIFIED_SOURCES += [
+    'FileSystemModule.cpp',
+    'mozStorageArgValueArray.cpp',
+    'mozStorageAsyncStatement.cpp',
+    'mozStorageAsyncStatementExecution.cpp',
+    'mozStorageAsyncStatementJSHelper.cpp',
+    'mozStorageAsyncStatementParams.cpp',
+    'mozStorageBindingParamsArray.cpp',
+    'mozStorageError.cpp',
+    'mozStoragePrivateHelpers.cpp',
+    'mozStorageResultSet.cpp',
+    'mozStorageRow.cpp',
+    'mozStorageService.cpp',
+    'mozStorageSQLFunctions.cpp',
+    'mozStorageStatement.cpp',
+    'mozStorageStatementJSHelper.cpp',
+    'mozStorageStatementParams.cpp',
+    'mozStorageStatementRow.cpp',
+    'SQLCollations.cpp',
+    'StorageBaseStatementInternal.cpp',
+    'TelemetryVFS.cpp',
+    'VacuumManager.cpp',
+]
+
+# These files need to be built separately because they #include variantToSQLiteT_impl.h.
+SOURCES += [
+    'mozStorageBindingParams.cpp',
+    'mozStorageConnection.cpp',
+]
+
+FAIL_ON_WARNINGS = True
+
+FINAL_LIBRARY = 'xul'
+
+# Don't use the jemalloc allocator on Android, because we can't guarantee
+# that Gecko will configure sqlite before it is first used (bug 730495).
+#
+# Don't use the jemalloc allocator when using system sqlite. Linked in libraries
+# (such as NSS) might trigger an initialization of sqlite and allocation
+# of memory using the default allocator, prior to the storage service
+# registering its allocator, causing memory management failures (bug 938730).
+# However, this is not an issue if both the jemalloc allocator and the default
+# allocator are the same thing.
+#
+# Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
+# MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
+# MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
+if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
+                             or CONFIG['MOZ_NATIVE_JEMALLOC']):
+    if CONFIG['OS_TARGET'] != 'Android':
+        DEFINES['MOZ_STORAGE_MEMORY'] = True
+
+# This is the default value.  If we ever change it when compiling sqlite, we
+# will need to change it here as well.
+DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
+
+LOCAL_INCLUDES += [
+    '/db/sqlite3/src',
+    '/dom/base',
+]
+
+CXXFLAGS += CONFIG['SQLITE_CFLAGS']
rename from storage/src/mozStorageArgValueArray.cpp
rename to storage/mozStorageArgValueArray.cpp
rename from storage/src/mozStorageArgValueArray.h
rename to storage/mozStorageArgValueArray.h
rename from storage/src/mozStorageAsyncStatement.cpp
rename to storage/mozStorageAsyncStatement.cpp
rename from storage/src/mozStorageAsyncStatement.h
rename to storage/mozStorageAsyncStatement.h
rename from storage/src/mozStorageAsyncStatementExecution.cpp
rename to storage/mozStorageAsyncStatementExecution.cpp
rename from storage/src/mozStorageAsyncStatementExecution.h
rename to storage/mozStorageAsyncStatementExecution.h
rename from storage/src/mozStorageAsyncStatementJSHelper.cpp
rename to storage/mozStorageAsyncStatementJSHelper.cpp
rename from storage/src/mozStorageAsyncStatementJSHelper.h
rename to storage/mozStorageAsyncStatementJSHelper.h
rename from storage/src/mozStorageAsyncStatementParams.cpp
rename to storage/mozStorageAsyncStatementParams.cpp
rename from storage/src/mozStorageAsyncStatementParams.h
rename to storage/mozStorageAsyncStatementParams.h
rename from storage/src/mozStorageBindingParams.cpp
rename to storage/mozStorageBindingParams.cpp
rename from storage/src/mozStorageBindingParams.h
rename to storage/mozStorageBindingParams.h
rename from storage/src/mozStorageBindingParamsArray.cpp
rename to storage/mozStorageBindingParamsArray.cpp
rename from storage/src/mozStorageBindingParamsArray.h
rename to storage/mozStorageBindingParamsArray.h
rename from storage/src/mozStorageConnection.cpp
rename to storage/mozStorageConnection.cpp
rename from storage/src/mozStorageConnection.h
rename to storage/mozStorageConnection.h
rename from storage/src/mozStorageError.cpp
rename to storage/mozStorageError.cpp
rename from storage/src/mozStorageError.h
rename to storage/mozStorageError.h
rename from storage/src/mozStoragePrivateHelpers.cpp
rename to storage/mozStoragePrivateHelpers.cpp
rename from storage/src/mozStoragePrivateHelpers.h
rename to storage/mozStoragePrivateHelpers.h
rename from storage/src/mozStorageResultSet.cpp
rename to storage/mozStorageResultSet.cpp
rename from storage/src/mozStorageResultSet.h
rename to storage/mozStorageResultSet.h
rename from storage/src/mozStorageRow.cpp
rename to storage/mozStorageRow.cpp
rename from storage/src/mozStorageRow.h
rename to storage/mozStorageRow.h
rename from storage/src/mozStorageSQLFunctions.cpp
rename to storage/mozStorageSQLFunctions.cpp
rename from storage/src/mozStorageSQLFunctions.h
rename to storage/mozStorageSQLFunctions.h
rename from storage/src/mozStorageService.cpp
rename to storage/mozStorageService.cpp
rename from storage/src/mozStorageService.h
rename to storage/mozStorageService.h
rename from storage/src/mozStorageStatement.cpp
rename to storage/mozStorageStatement.cpp
rename from storage/src/mozStorageStatement.h
rename to storage/mozStorageStatement.h
rename from storage/src/mozStorageStatementData.h
rename to storage/mozStorageStatementData.h
rename from storage/src/mozStorageStatementJSHelper.cpp
rename to storage/mozStorageStatementJSHelper.cpp
rename from storage/src/mozStorageStatementJSHelper.h
rename to storage/mozStorageStatementJSHelper.h
rename from storage/src/mozStorageStatementParams.cpp
rename to storage/mozStorageStatementParams.cpp
rename from storage/src/mozStorageStatementParams.h
rename to storage/mozStorageStatementParams.h
rename from storage/src/mozStorageStatementRow.cpp
rename to storage/mozStorageStatementRow.cpp
rename from storage/src/mozStorageStatementRow.h
rename to storage/mozStorageStatementRow.h
deleted file mode 100644
--- a/storage/src/moz.build
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-EXPORTS.mozilla.storage += [
-    'Variant.h',
-    'Variant_inl.h',
-]
-
-UNIFIED_SOURCES += [
-    'FileSystemModule.cpp',
-    'mozStorageArgValueArray.cpp',
-    'mozStorageAsyncStatement.cpp',
-    'mozStorageAsyncStatementExecution.cpp',
-    'mozStorageAsyncStatementJSHelper.cpp',
-    'mozStorageAsyncStatementParams.cpp',
-    'mozStorageBindingParamsArray.cpp',
-    'mozStorageError.cpp',
-    'mozStoragePrivateHelpers.cpp',
-    'mozStorageResultSet.cpp',
-    'mozStorageRow.cpp',
-    'mozStorageService.cpp',
-    'mozStorageSQLFunctions.cpp',
-    'mozStorageStatement.cpp',
-    'mozStorageStatementJSHelper.cpp',
-    'mozStorageStatementParams.cpp',
-    'mozStorageStatementRow.cpp',
-    'SQLCollations.cpp',
-    'StorageBaseStatementInternal.cpp',
-    'TelemetryVFS.cpp',
-    'VacuumManager.cpp',
-]
-
-# These files need to be built separately because they #include variantToSQLiteT_impl.h.
-SOURCES += [
-    'mozStorageBindingParams.cpp',
-    'mozStorageConnection.cpp',
-]
-
-FAIL_ON_WARNINGS = True
-
-FINAL_LIBRARY = 'xul'
-
-# Don't use the jemalloc allocator on Android, because we can't guarantee
-# that Gecko will configure sqlite before it is first used (bug 730495).
-#
-# Don't use the jemalloc allocator when using system sqlite. Linked in libraries
-# (such as NSS) might trigger an initialization of sqlite and allocation
-# of memory using the default allocator, prior to the storage service
-# registering its allocator, causing memory management failures (bug 938730).
-# However, this is not an issue if both the jemalloc allocator and the default
-# allocator are the same thing.
-#
-# Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
-# MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
-# MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
-if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
-                             or CONFIG['MOZ_NATIVE_JEMALLOC']):
-    if CONFIG['OS_TARGET'] != 'Android':
-        DEFINES['MOZ_STORAGE_MEMORY'] = True
-
-# This is the default value.  If we ever change it when compiling sqlite, we
-# will need to change it here as well.
-DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
-
-LOCAL_INCLUDES += [
-    '/db/sqlite3/src',
-    '/dom/base',
-]
-
-CXXFLAGS += CONFIG['SQLITE_CFLAGS']
--- a/storage/test/moz.build
+++ b/storage/test/moz.build
@@ -24,16 +24,16 @@ GeckoCppUnitTests([
 if CONFIG['MOZ_DEBUG'] and CONFIG['OS_ARCH'] not in ('WINNT', 'Darwin'):
     # FIXME bug 523392: test_deadlock_detector doesn't like Windows
     # FIXME bug 523378: also fails on OS X
     GeckoCppUnitTests([
         'test_deadlock_detector',
     ])
 
 LOCAL_INCLUDES += [
-    '../src',
+    '..',
 ]
 
 FAIL_ON_WARNINGS = True
 
 USE_LIBS += [
     'sqlite',
 ]
--- a/storage/test/unit/test_statement_wrapper_automatically.js
+++ b/storage/test/unit/test_statement_wrapper_automatically.js
@@ -141,17 +141,17 @@ function printValDesc(aVal)
         (toSource ? " toSource=" + toSource : ""));
 }
 
 function run_test()
 {
   setup();
 
   // function JSValStorageStatementBinder in
-  // storage/src/mozStorageStatementParams.cpp tells us that the following types
+  // storage/mozStorageStatementParams.cpp tells us that the following types
   // and only the following types are valid as statement parameters:
   var vals = [
     1337,       // int
     3.1337,     // double
     "foo",      // string
     true,       // boolean
     null,       // null
     new Date(), // Date object
rename from storage/src/variantToSQLiteT_impl.h
rename to storage/variantToSQLiteT_impl.h
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -1567,17 +1567,17 @@ UnifiedComplete.prototype = {
           // It's too late to block shutdown, just close the connection.
           yield conn.close();
           throw ex;
         }
 
         // Autocomplete often fallbacks to a table scan due to lack of text
         // indices.  A larger cache helps reducing IO and improving performance.
         // The value used here is larger than the default Storage value defined
-        // as MAX_CACHE_SIZE_BYTES in storage/src/mozStorageConnection.cpp.
+        // as MAX_CACHE_SIZE_BYTES in storage/mozStorageConnection.cpp.
         yield conn.execute("PRAGMA cache_size = -6144"); // 6MiB
 
         yield SwitchToTabStorage.initDatabase(conn);
 
         return conn;
       }.bind(this)).then(null, ex => { dump("Couldn't get database handle: " + ex + "\n");
                                        Cu.reportError(ex); });
     }
--- a/toolkit/components/places/nsPlacesAutoComplete.js
+++ b/toolkit/components/places/nsPlacesAutoComplete.js
@@ -313,17 +313,17 @@ function nsPlacesAutoComplete()
     // Get a cloned, read-only version of the database.  We'll only ever write
     // to our own in-memory temp table, and having a cloned copy means we do not
     // run the risk of our queries taking longer due to the main database
     // connection performing a long-running task.
     let db = PlacesUtils.history.DBConnection.clone(true);
 
     // Autocomplete often fallbacks to a table scan due to lack of text indices.
     // In such cases a larger cache helps reducing IO.  The default Storage
-    // value is MAX_CACHE_SIZE_BYTES in storage/src/mozStorageConnection.cpp.
+    // value is MAX_CACHE_SIZE_BYTES in storage/mozStorageConnection.cpp.
     let stmt = db.createAsyncStatement("PRAGMA cache_size = -6144"); // 6MiB
     stmt.executeAsync();
     stmt.finalize();
 
     // Create our in-memory tables for tab tracking.
     initTempTable(db);
 
     // Populate the table with current open pages cache contents.