Changeset 73633 in webkit


Ignore:
Timestamp:
Dec 9, 2010 11:35:28 AM (13 years ago)
Author:
hans@chromium.org
Message:

2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r73616.
http://trac.webkit.org/changeset/73616
https://bugs.webkit.org/show_bug.cgi?id=50772

Breaks chromium win build (Requested by hwennborg on #webkit).

  • public/WebIDBKey.h: (WebKit::WebIDBKey::WebIDBKey):
  • src/WebIDBKey.cpp: (WebKit::WebIDBKey::assign): (WebKit::WebIDBKey::number):

2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r73616.
http://trac.webkit.org/changeset/73616
https://bugs.webkit.org/show_bug.cgi?id=50772

Breaks chromium win build (Requested by hwennborg on #webkit).

  • bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromValue):
  • bindings/v8/custom/V8IDBKeyCustom.cpp: (WebCore::toV8):
  • storage/IDBFactoryBackendImpl.cpp: (WebCore::createTables): (WebCore::IDBFactoryBackendImpl::open):
  • storage/IDBKey.cpp: (WebCore::IDBKey::IDBKey): (WebCore::IDBKey::fromQuery): (WebCore::IDBKey::bind): (WebCore::IDBKey::bindWithNulls):
  • storage/IDBKey.h: (WebCore::IDBKey::create): (WebCore::IDBKey::number):

2010-12-09 Sheriff Bot <webkit.review.bot@gmail.com>

Unreviewed, rolling out r73616.
http://trac.webkit.org/changeset/73616
https://bugs.webkit.org/show_bug.cgi?id=50772

Breaks chromium win build (Requested by hwennborg on #webkit).

  • storage/indexeddb/index-basics-expected.txt:
  • storage/indexeddb/index-basics.html:
  • storage/indexeddb/index-cursor.html:
  • storage/indexeddb/keyrange-expected.txt:
  • storage/indexeddb/keyrange.html:
  • storage/indexeddb/objectstore-cursor.html:
Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73632 r73633  
     12010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r73616.
     4        http://trac.webkit.org/changeset/73616
     5        https://bugs.webkit.org/show_bug.cgi?id=50772
     6
     7        Breaks chromium win build (Requested by hwennborg on #webkit).
     8
     9        * storage/indexeddb/index-basics-expected.txt:
     10        * storage/indexeddb/index-basics.html:
     11        * storage/indexeddb/index-cursor.html:
     12        * storage/indexeddb/keyrange-expected.txt:
     13        * storage/indexeddb/keyrange.html:
     14        * storage/indexeddb/objectstore-cursor.html:
     15
    1162010-12-09  Brian Weinstein  <bweinstein@apple.com>
    217
  • trunk/LayoutTests/storage/indexeddb/index-basics-expected.txt

    r73616 r73633  
    4646store.createIndex('indexName', 'x')
    4747store.createIndex('indexName2', 'y', false)
    48 store.createIndex('zIndex', 'z', true)
    4948PASS 'name' in indexObject is true
    5049PASS indexObject.name is "indexName"
     
    5958PASS 'getKey' in indexObject is true
    6059PASS 'get' in indexObject is true
    61 store.add({x: 'value', y: 'zzz', z: 2.72}, 'key')
    62 PASS 'onsuccess' in result is true
    63 PASS 'onerror' in result is true
    64 PASS 'readyState' in result is true
    65 An event should fire shortly...
    66 
    67 Success event fired:
    68 PASS 'result' in event is true
    69 PASS 'code' in event is false
    70 PASS 'message' in event is false
    71 PASS 'source' in event is true
    72 PASS event.source != null is true
    73 PASS 'onsuccess' in event.target is true
    74 PASS 'onerror' in event.target is true
    75 PASS 'readyState' in event.target is true
    76 PASS event.target.readyState is event.target.DONE
    77 
    78 event.source.add({x: 'value2', y: 'zzz2', z: 2.71}, 'key2')
     60store.add({x: 'value', y: 'zzz'}, 'key')
     61PASS 'onsuccess' in result is true
     62PASS 'onerror' in result is true
     63PASS 'readyState' in result is true
     64An event should fire shortly...
     65
     66Success event fired:
     67PASS 'result' in event is true
     68PASS 'code' in event is false
     69PASS 'message' in event is false
     70PASS 'source' in event is true
     71PASS event.source != null is true
     72PASS 'onsuccess' in event.target is true
     73PASS 'onerror' in event.target is true
     74PASS 'readyState' in event.target is true
     75PASS event.target.readyState is event.target.DONE
     76
     77event.source.add({x: 'value2', y: 'zzz2'}, 'key2')
    7978PASS 'onsuccess' in result is true
    8079PASS 'onerror' in result is true
     
    129128
    130129PASS event.result is "key"
    131 indexObject3.get(2.71)
    132 PASS 'onsuccess' in result is true
    133 PASS 'onerror' in result is true
    134 PASS 'readyState' in result is true
    135 An event should fire shortly...
    136 
    137 Success event fired:
    138 PASS 'result' in event is true
    139 PASS 'code' in event is false
    140 PASS 'message' in event is false
    141 PASS 'source' in event is true
    142 PASS event.source != null is true
    143 PASS 'onsuccess' in event.target is true
    144 PASS 'onerror' in event.target is true
    145 PASS 'readyState' in event.target is true
    146 PASS event.target.readyState is event.target.DONE
    147 
    148 PASS event.result.x is "value2"
    149130indexObject.get('value')
    150131PASS 'onsuccess' in result is true
  • trunk/LayoutTests/storage/indexeddb/index-basics.html

    r73616 r73633  
    5050    window.indexObject = evalAndLog("store.createIndex('indexName', 'x')");
    5151    window.indexObject2 = evalAndLog("store.createIndex('indexName2', 'y', false)");
    52     window.indexObject3 = evalAndLog("store.createIndex('zIndex', 'z', true)");
    5352    addData();
    5453}
     
    6968    shouldBeTrue("'get' in indexObject");
    7069
    71     result = evalAndLog("store.add({x: 'value', y: 'zzz', z: 2.72}, 'key')");
     70    result = evalAndLog("store.add({x: 'value', y: 'zzz'}, 'key')");
    7271    verifyResult(result);
    7372    result.onsuccess = addMore;
     
    7978    verifySuccessEvent(event);
    8079
    81     result = evalAndLog("event.source.add({x: 'value2', y: 'zzz2', z: 2.71}, 'key2')");
     80    result = evalAndLog("event.source.add({x: 'value2', y: 'zzz2'}, 'key2')");
    8281    verifyResult(result);
    8382    result.onsuccess = getData;
     
    110109    verifySuccessEvent(event);
    111110    shouldBeEqualToString("event.result", "key");
    112 
    113     result = evalAndLog("indexObject3.get(2.71)");
    114     verifyResult(result);
    115     result.onsuccess = getObjectData3;
    116     result.onerror = unexpectedErrorCallback;
    117 }
    118 
    119 function getObjectData3()
    120 {
    121     verifySuccessEvent(event);
    122     shouldBeEqualToString("event.result.x", "value2");
    123111
    124112    result = evalAndLog("indexObject.get('value')");
  • trunk/LayoutTests/storage/indexeddb/index-cursor.html

    r73616 r73633  
    1919    1,
    2020    1,
    21     3.14159,
    22     3.14159,
     21    2,
     22    2,
    2323    10,
    2424    // FIXME: Dates.
  • trunk/LayoutTests/storage/indexeddb/keyrange-expected.txt

    r73616 r73633  
    2828PASS keyRange.lowerOpen is false
    2929PASS keyRange.upperOpen is false
    30 webkitIDBKeyRange.only(3.14)
    31 PASS keyRange.lower is 3.14
    32 PASS keyRange.upper is 3.14
    33 PASS keyRange.lowerOpen is false
    34 PASS keyRange.upperOpen is false
    3530webkitIDBKeyRange.only('a')
    3631PASS keyRange.lower is 'a'
     
    5045webkitIDBKeyRange.lowerBound(12,undefined)
    5146PASS keyRange.lower is 12
    52 PASS keyRange.lowerOpen is false
    53 PASS keyRange.upper is null
    54 PASS keyRange.upperOpen is false
    55 webkitIDBKeyRange.lowerBound(10.1,true)
    56 PASS keyRange.lower is 10.1
    57 PASS keyRange.lowerOpen is true
    58 PASS keyRange.upper is null
    59 PASS keyRange.upperOpen is false
    60 webkitIDBKeyRange.lowerBound(11.2,false)
    61 PASS keyRange.lower is 11.2
    62 PASS keyRange.lowerOpen is false
    63 PASS keyRange.upper is null
    64 PASS keyRange.upperOpen is false
    65 webkitIDBKeyRange.lowerBound(12.3,undefined)
    66 PASS keyRange.lower is 12.3
    6747PASS keyRange.lowerOpen is false
    6848PASS keyRange.upper is null
     
    9575webkitIDBKeyRange.upperBound(22,undefined)
    9676PASS keyRange.upper is 22
    97 PASS keyRange.upperOpen is false
    98 PASS keyRange.lower is null
    99 PASS keyRange.lowerOpen is false
    100 webkitIDBKeyRange.upperBound(20.2,true)
    101 PASS keyRange.upper is 20.2
    102 PASS keyRange.upperOpen is true
    103 PASS keyRange.lower is null
    104 PASS keyRange.lowerOpen is false
    105 webkitIDBKeyRange.upperBound(21.3,false)
    106 PASS keyRange.upper is 21.3
    107 PASS keyRange.upperOpen is false
    108 PASS keyRange.lower is null
    109 PASS keyRange.lowerOpen is false
    110 webkitIDBKeyRange.upperBound(22.4,undefined)
    111 PASS keyRange.upper is 22.4
    11277PASS keyRange.upperOpen is false
    11378PASS keyRange.lower is null
     
    150115webkitIDBKeyRange.bound(34,44, {lowerOpen: true, upperOpen:true})
    151116PASS keyRange.lower is 34
    152 PASS keyRange.upper is 44
    153 PASS keyRange.lowerOpen is true
    154 PASS keyRange.upperOpen is true
    155 webkitIDBKeyRange.bound(30.1,40.2, {lowerOpen: undefined, upperOpen:undefined})
    156 PASS keyRange.lower is 30.1
    157 PASS keyRange.upper is 40.2
    158 PASS keyRange.lowerOpen is false
    159 PASS keyRange.upperOpen is false
    160 webkitIDBKeyRange.bound(31.3,41.4, {lowerOpen: false, upperOpen:false})
    161 PASS keyRange.lower is 31.3
    162 PASS keyRange.upper is 41.4
    163 PASS keyRange.lowerOpen is false
    164 PASS keyRange.upperOpen is false
    165 webkitIDBKeyRange.bound(32.5,42.6, {lowerOpen: false, upperOpen:true})
    166 PASS keyRange.lower is 32.5
    167 PASS keyRange.upper is 42.6
    168 PASS keyRange.lowerOpen is false
    169 PASS keyRange.upperOpen is true
    170 webkitIDBKeyRange.bound(33.7,43.8, {lowerOpen: true, upperOpen:false})
    171 PASS keyRange.lower is 33.7
    172 PASS keyRange.upper is 43.8
    173 PASS keyRange.lowerOpen is true
    174 PASS keyRange.upperOpen is false
    175 webkitIDBKeyRange.bound(34.9,44, {lowerOpen: true, upperOpen:true})
    176 PASS keyRange.lower is 34.9
    177117PASS keyRange.upper is 44
    178118PASS keyRange.lowerOpen is true
  • trunk/LayoutTests/storage/indexeddb/keyrange.html

    r73616 r73633  
    8585
    8686    checkSingleKeyRange(1);
    87     checkSingleKeyRange(3.14);
    8887    checkSingleKeyRange("'a'");
    8988
     
    9190    checkLowerBoundKeyRange(11, false);
    9291    checkLowerBoundKeyRange(12);
    93     checkLowerBoundKeyRange(10.1, true);
    94     checkLowerBoundKeyRange(11.2, false);
    95     checkLowerBoundKeyRange(12.3);
    9692    checkLowerBoundKeyRange("'aa'", true);
    9793    checkLowerBoundKeyRange("'ab'", false);
     
    10197    checkUpperBoundKeyRange(21, false);
    10298    checkUpperBoundKeyRange(22);
    103     checkUpperBoundKeyRange(20.2, true);
    104     checkUpperBoundKeyRange(21.3, false);
    105     checkUpperBoundKeyRange(22.4);
    10699    checkUpperBoundKeyRange("'ba'", true);
    107100    checkUpperBoundKeyRange("'bb'", false);
     
    113106    checkBoundKeyRange(33, 43, true, false);
    114107    checkBoundKeyRange(34, 44, true, true);
    115 
    116     checkBoundKeyRange(30.1, 40.2);
    117     checkBoundKeyRange(31.3, 41.4, false, false);
    118     checkBoundKeyRange(32.5, 42.6, false, true);
    119     checkBoundKeyRange(33.7, 43.8, true, false);
    120     checkBoundKeyRange(34.9, 44.0, true, true);
    121108
    122109    checkBoundKeyRange("'aaa'", "'aba'", false, false);
  • trunk/LayoutTests/storage/indexeddb/objectstore-cursor.html

    r73616 r73633  
    1717// In order of how it should be sorted by IndexedDB.
    1818window.testData = [
    19     2.718281828459,
     19    1,
     20    2,
    2021    3,
    21     3.14159265,
    2222    10,
    2323    // FIXME: Dates.
  • trunk/WebCore/ChangeLog

    r73629 r73633  
     12010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r73616.
     4        http://trac.webkit.org/changeset/73616
     5        https://bugs.webkit.org/show_bug.cgi?id=50772
     6
     7        Breaks chromium win build (Requested by hwennborg on #webkit).
     8
     9        * bindings/v8/IDBBindingUtilities.cpp:
     10        (WebCore::createIDBKeyFromValue):
     11        * bindings/v8/custom/V8IDBKeyCustom.cpp:
     12        (WebCore::toV8):
     13        * storage/IDBFactoryBackendImpl.cpp:
     14        (WebCore::createTables):
     15        (WebCore::IDBFactoryBackendImpl::open):
     16        * storage/IDBKey.cpp:
     17        (WebCore::IDBKey::IDBKey):
     18        (WebCore::IDBKey::fromQuery):
     19        (WebCore::IDBKey::bind):
     20        (WebCore::IDBKey::bindWithNulls):
     21        * storage/IDBKey.h:
     22        (WebCore::IDBKey::create):
     23        (WebCore::IDBKey::number):
     24
    1252010-12-09  Antonio Gomes  <agomes@rim.com>
    226
  • trunk/WebCore/bindings/v8/IDBBindingUtilities.cpp

    r73616 r73633  
    4242    if (value->IsNull())
    4343        return IDBKey::create();
    44     if (value->IsNumber())
    45         return IDBKey::create(value->NumberValue());
     44    if (value->IsInt32())
     45        return IDBKey::create(value->Int32Value());
    4646    if (value->IsString())
    4747        return IDBKey::create(v8ValueToWebCoreString(value));
  • trunk/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp

    r73616 r73633  
    4646        return v8::Null();
    4747    case IDBKey::NumberType:
    48         return v8::Number::New(key->number());
     48        return v8::Integer::New(key->number());
    4949    case IDBKey::StringType:
    5050        return v8String(key->string());
  • trunk/WebCore/storage/IDBFactoryBackendImpl.cpp

    r73616 r73633  
    3636#include "IDBSQLiteDatabase.h"
    3737#include "IDBTransactionCoordinator.h"
    38 #include "SQLiteStatement.h"
    39 #include "SQLiteTransaction.h"
    4038#include "SecurityOrigin.h"
    4139#include <wtf/Threading.h>
     
    9694static bool createTables(SQLiteDatabase& sqliteDatabase)
    9795{
    98     if (sqliteDatabase.tableExists("Databases"))
    99         return true;
     96    static const char* commands[] = {
     97        "CREATE TABLE IF NOT EXISTS Databases (id INTEGER PRIMARY KEY, name TEXT NOT NULL, description TEXT NOT NULL, version TEXT NOT NULL)",
     98        "CREATE UNIQUE INDEX IF NOT EXISTS Databases_name ON Databases(name)",
    10099
    101     static const char* commands[] = {
    102         "CREATE TABLE Databases (id INTEGER PRIMARY KEY, name TEXT NOT NULL, description TEXT NOT NULL, version TEXT NOT NULL)",
    103         "CREATE UNIQUE INDEX Databases_name ON Databases(name)",
     100        "CREATE TABLE IF NOT EXISTS ObjectStores (id INTEGER PRIMARY KEY, name TEXT NOT NULL, keyPath TEXT, doAutoIncrement INTEGER NOT NULL, databaseId INTEGER NOT NULL REFERENCES Databases(id))",
     101        "CREATE UNIQUE INDEX IF NOT EXISTS ObjectStores_composit ON ObjectStores(databaseId, name)",
    104102
    105         "CREATE TABLE ObjectStores (id INTEGER PRIMARY KEY, name TEXT NOT NULL, keyPath TEXT, doAutoIncrement INTEGER NOT NULL, databaseId INTEGER NOT NULL REFERENCES Databases(id))",
    106         "CREATE UNIQUE INDEX ObjectStores_composit ON ObjectStores(databaseId, name)",
     103        "CREATE TABLE IF NOT EXISTS Indexes (id INTEGER PRIMARY KEY, objectStoreId INTEGER NOT NULL REFERENCES ObjectStore(id), name TEXT NOT NULL, keyPath TEXT, isUnique INTEGER NOT NULL)",
     104        "CREATE UNIQUE INDEX IF NOT EXISTS Indexes_composit ON Indexes(objectStoreId, name)",
    107105
    108         "CREATE TABLE Indexes (id INTEGER PRIMARY KEY, objectStoreId INTEGER NOT NULL REFERENCES ObjectStore(id), name TEXT NOT NULL, keyPath TEXT, isUnique INTEGER NOT NULL)",
    109         "CREATE UNIQUE INDEX Indexes_composit ON Indexes(objectStoreId, name)",
     106        "CREATE TABLE IF NOT EXISTS ObjectStoreData (id INTEGER PRIMARY KEY, objectStoreId INTEGER NOT NULL REFERENCES ObjectStore(id), keyString TEXT, keyDate INTEGER, keyNumber INTEGER, value TEXT NOT NULL)",
     107        "CREATE UNIQUE INDEX IF NOT EXISTS ObjectStoreData_composit ON ObjectStoreData(keyString, keyDate, keyNumber, objectStoreId)",
    110108
    111         "CREATE TABLE ObjectStoreData (id INTEGER PRIMARY KEY, objectStoreId INTEGER NOT NULL REFERENCES ObjectStore(id), keyString TEXT, keyDate INTEGER, keyNumber INTEGER, value TEXT NOT NULL)",
    112         "CREATE UNIQUE INDEX ObjectStoreData_composit ON ObjectStoreData(keyString, keyDate, keyNumber, objectStoreId)",
    113 
    114         "CREATE TABLE IndexData (id INTEGER PRIMARY KEY, indexId INTEGER NOT NULL REFERENCES Indexes(id), keyString TEXT, keyDate INTEGER, keyNumber INTEGER, objectStoreDataId INTEGER NOT NULL REFERENCES ObjectStoreData(id))",
    115         "CREATE INDEX IndexData_composit ON IndexData(keyString, keyDate, keyNumber, indexId)",
    116         "CREATE INDEX IndexData_objectStoreDataId ON IndexData(objectStoreDataId)",
    117         "CREATE INDEX IndexData_indexId ON IndexData(indexId)",
     109        "CREATE TABLE IF NOT EXISTS IndexData (id INTEGER PRIMARY KEY, indexId INTEGER NOT NULL REFERENCES Indexes(id), keyString TEXT, keyDate INTEGER, keyNumber INTEGER, objectStoreDataId INTEGER NOT NULL REFERENCES ObjectStoreData(id))",
     110        "CREATE INDEX IF NOT EXISTS IndexData_composit ON IndexData(keyString, keyDate, keyNumber, indexId)",
     111        "CREATE INDEX IF NOT EXISTS IndexData_objectStoreDataId ON IndexData(objectStoreDataId)",
     112        "CREATE INDEX IF NOT EXISTS IndexData_indexId ON IndexData(indexId)"
    118113        };
    119114
    120     SQLiteTransaction transaction(sqliteDatabase, false);
    121     transaction.begin();
    122115    for (size_t i = 0; i < arraysize(commands); ++i) {
    123116        if (!sqliteDatabase.executeCommand(commands[i])) {
     
    127120        }
    128121    }
    129     transaction.commit();
    130     return true;
    131 }
    132 
    133 static bool createMetaDataTable(SQLiteDatabase& sqliteDatabase)
    134 {
    135     static const char* commands[] = {
    136         "CREATE TABLE MetaData (name TEXT PRIMARY KEY, value NONE)",
    137         "INSERT INTO MetaData VALUES ('version', 1)",
    138     };
    139 
    140     SQLiteTransaction transaction(sqliteDatabase, false);
    141     transaction.begin();
    142     for (size_t i = 0; i < arraysize(commands); ++i) {
    143         if (!sqliteDatabase.executeCommand(commands[i]))
    144             return false;
    145     }
    146     transaction.commit();
    147     return true;
    148 }
    149 
    150 static bool getDatabaseVersion(SQLiteDatabase& sqliteDatabase, int* databaseVersion)
    151 {
    152     SQLiteStatement query(sqliteDatabase, "SELECT value FROM MetaData WHERE name = 'version'");
    153     if (query.prepare() != SQLResultOk || query.step() != SQLResultRow)
    154         return false;
    155 
    156     *databaseVersion = query.getColumnInt(0);
    157     return query.finalize() == SQLResultOk;
    158 }
    159 
    160 static bool migrateDatabase(SQLiteDatabase& sqliteDatabase)
    161 {
    162     if (!sqliteDatabase.tableExists("MetaData")) {
    163         if (!createMetaDataTable(sqliteDatabase))
    164             return false;
    165     }
    166 
    167     int databaseVersion;
    168     if (!getDatabaseVersion(sqliteDatabase, &databaseVersion))
    169         return false;
    170 
    171     if (databaseVersion == 1) {
    172         static const char* commands[] = {
    173             "DROP TABLE IF EXISTS ObjectStoreData2",
    174             "CREATE TABLE ObjectStoreData2 (id INTEGER PRIMARY KEY, objectStoreId INTEGER NOT NULL REFERENCES ObjectStore(id), keyString TEXT, keyDate REAL, keyNumber REAL, value TEXT NOT NULL)",
    175             "INSERT INTO ObjectStoreData2 SELECT * FROM ObjectStoreData",
    176             "DROP TABLE ObjectStoreData", // This depends on SQLite not enforcing referential consistency.
    177             "ALTER TABLE ObjectStoreData2 RENAME TO ObjectStoreData",
    178             "CREATE UNIQUE INDEX ObjectStoreData_composit ON ObjectStoreData(keyString, keyDate, keyNumber, objectStoreId)",
    179             "DROP TABLE IF EXISTS IndexData2", // This depends on SQLite not enforcing referential consistency.
    180             "CREATE TABLE IndexData2 (id INTEGER PRIMARY KEY, indexId INTEGER NOT NULL REFERENCES Indexes(id), keyString TEXT, keyDate REAL, keyNumber REAL, objectStoreDataId INTEGER NOT NULL REFERENCES ObjectStoreData(id))",
    181             "INSERT INTO IndexData2 SELECT * FROM IndexData",
    182             "DROP TABLE IndexData",
    183             "ALTER TABLE IndexData2 RENAME TO IndexData",
    184             "CREATE INDEX IndexData_composit ON IndexData(keyString, keyDate, keyNumber, indexId)",
    185             "CREATE INDEX IndexData_objectStoreDataId ON IndexData(objectStoreDataId)",
    186             "CREATE INDEX IndexData_indexId ON IndexData(indexId)",
    187             "UPDATE MetaData SET value = 2 WHERE name = 'version'",
    188         };
    189 
    190         SQLiteTransaction transaction(sqliteDatabase, false);
    191         transaction.begin();
    192         for (size_t i = 0; i < arraysize(commands); ++i) {
    193             if (!sqliteDatabase.executeCommand(commands[i])) {
    194                 LOG_ERROR("Failed to run the following command for IndexedDB: %s", commands[i]);
    195                 return false;
    196             }
    197         }
    198         transaction.commit();
    199 
    200         databaseVersion = 2;
    201     }
    202 
    203122    return true;
    204123}
     
    223142        sqliteDatabase = openSQLiteDatabase(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
    224143
    225         if (!sqliteDatabase || !createTables(sqliteDatabase->db()) || !migrateDatabase(sqliteDatabase->db())) {
     144        if (!sqliteDatabase || !createTables(sqliteDatabase->db())) {
    226145            callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UNKNOWN_ERR, "Internal error."));
    227             m_sqliteDatabaseMap.set(fileIdentifier, 0);
    228146            return;
    229147        }
     
    239157
    240158#endif // ENABLE(INDEXED_DATABASE)
     159
  • trunk/WebCore/storage/IDBKey.cpp

    r73616 r73633  
    3939}
    4040
    41 IDBKey::IDBKey(double number)
     41IDBKey::IDBKey(int32_t number)
    4242    : m_type(NumberType)
    4343    , m_number(number)
     
    6666
    6767    if (!query.isColumnNull(baseColumn + 2))
    68         return IDBKey::create(query.getColumnDouble(baseColumn + 2));
     68        return IDBKey::create(query.getColumnInt(baseColumn + 2));
    6969
    7070    return IDBKey::create(); // Null.
     
    148148        return 1;
    149149    case IDBKey::NumberType:
    150         query.bindDouble(column, m_number);
     150        query.bindInt(column, m_number);
    151151        return 1;
    152152    case IDBKey::NullType:
     
    169169        query.bindNull(baseColumn + 0);
    170170        query.bindNull(baseColumn + 1);
    171         query.bindDouble(baseColumn + 2, m_number);
     171        query.bindInt(baseColumn + 2, m_number);
    172172        break;
    173173    case IDBKey::NullType:
  • trunk/WebCore/storage/IDBKey.h

    r73616 r73633  
    4444        return adoptRef(new IDBKey());
    4545    }
    46     static PassRefPtr<IDBKey> create(double number)
     46    static PassRefPtr<IDBKey> create(int32_t number)
    4747    {
    4848        return adoptRef(new IDBKey(number));
     
    6969    }
    7070
    71     double number() const
     71    int32_t number() const
    7272    {
    7373        ASSERT(m_type == NumberType);
     
    8989private:
    9090    IDBKey();
    91     explicit IDBKey(double);
     91    explicit IDBKey(int32_t);
    9292    explicit IDBKey(const String&);
    9393
    9494    Type m_type;
    9595    String m_string;
    96     double m_number;
     96    int32_t m_number;
    9797};
    9898
  • trunk/WebKit/chromium/ChangeLog

    r73616 r73633  
     12010-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r73616.
     4        http://trac.webkit.org/changeset/73616
     5        https://bugs.webkit.org/show_bug.cgi?id=50772
     6
     7        Breaks chromium win build (Requested by hwennborg on #webkit).
     8
     9        * public/WebIDBKey.h:
     10        (WebKit::WebIDBKey::WebIDBKey):
     11        * src/WebIDBKey.cpp:
     12        (WebKit::WebIDBKey::assign):
     13        (WebKit::WebIDBKey::number):
     14
    1152010-12-09  Hans Wennborg  <hans@chromium.org>
    216
  • trunk/WebKit/chromium/public/WebIDBKey.h

    r73616 r73633  
    4949
    5050    WebIDBKey(const WebString& string) { assign(string); }
    51     WebIDBKey(double number) { assign(number); }
     51    WebIDBKey(int32_t number) { assign(number); }
    5252    WebIDBKey(const WebIDBKey& e) { assign(e); }
    5353    WebIDBKey& operator=(const WebIDBKey& e)
     
    6060    WEBKIT_API void assignNull();
    6161    WEBKIT_API void assign(const WebString&);
    62     WEBKIT_API void assign(double);
     62    WEBKIT_API void assign(int32_t);
    6363    WEBKIT_API void assignInvalid();
    6464    WEBKIT_API void reset();
     
    7474    WEBKIT_API Type type() const;
    7575    WEBKIT_API WebString string() const; // Only valid for StringType.
    76     WEBKIT_API double number() const; // Only valid for numberType.
     76    WEBKIT_API int32_t number() const; // Only valid for numberType.
    7777
    7878#if WEBKIT_IMPLEMENTATION
  • trunk/WebKit/chromium/src/WebIDBKey.cpp

    r73616 r73633  
    7878}
    7979
    80 void WebIDBKey::assign(double number)
     80void WebIDBKey::assign(int32_t number)
    8181{
    8282    m_private = IDBKey::create(number);
     
    105105}
    106106
    107 double WebIDBKey::number() const
     107int32_t WebIDBKey::number() const
    108108{
    109109    return m_private->number();
Note: See TracChangeset for help on using the changeset viewer.