+2012-01-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r105331.
+ http://trac.webkit.org/changeset/105331
+ https://bugs.webkit.org/show_bug.cgi?id=76599
+
+ May have broken Chromium InjectIDBKey browser_test (Requested
+ by rolandsteiner on #webkit).
+
+ * storage/indexeddb/objectstore-autoincrement-expected.txt:
+ * storage/indexeddb/objectstore-autoincrement.html:
+
2012-01-18 Andreas Kling <awesomekling@apple.com>
Cache and reuse the NodeList returned by Node::childNodes().
store = db.createObjectStore('StoreWithKeyPath', {keyPath: 'id', autoIncrement: true})
db.createObjectStore('StoreWithAutoIncrement', {autoIncrement: true})
db.createObjectStore('PlainOldStore', {autoIncrement: false})
-db.createObjectStore('StoreWithLongKeyPath', {keyPath: 'a.b.c.id', autoIncrement: true})
storeNames = db.objectStoreNames
PASS store.name is "StoreWithKeyPath"
PASS store.keyPath is 'id'
PASS storeNames.contains('StoreWithKeyPath') is true
PASS storeNames.contains('StoreWithAutoIncrement') is true
PASS storeNames.contains('PlainOldStore') is true
-PASS storeNames.length is 4
+PASS storeNames.length is 3
setVersionCompleted():
trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], webkitIDBTransaction.READ_WRITE)
store = trans.objectStore('StoreWithKeyPath')
store.add({name: 'Adam'}, 1)
addAdamSuccess():
PASS event.target.result is 1
-testLongKeyPath():
-trans = db.transaction('StoreWithLongKeyPath', webkitIDBTransaction.READ_WRITE)
-store = trans.objectStore('StoreWithLongKeyPath')
-store.add({foo: 'bar'})
-store.add({foo: 'bar', a: {}})
-store.add({foo: 'bar', a: {b: {}}})
-store.add({foo: 'bar', a: {b: {c: {}}}})
-store.openCursor()
-expected = null
-count = 0
-expected = cursor.value.a.b.c.id + 1
-PASS cursor.value.foo is 'bar'
-PASS cursor.value.a.b.c.id is expected
-expected = cursor.value.a.b.c.id + 1
-PASS cursor.value.foo is 'bar'
-PASS cursor.value.a.b.c.id is expected
-expected = cursor.value.a.b.c.id + 1
-PASS cursor.value.foo is 'bar'
-PASS cursor.value.a.b.c.id is expected
-expected = cursor.value.a.b.c.id + 1
-PASS count is 4
PASS successfullyParsed is true
TEST COMPLETE
window.store = evalAndLog("store = db.createObjectStore('StoreWithKeyPath', {keyPath: 'id', autoIncrement: true})");
evalAndLog("db.createObjectStore('StoreWithAutoIncrement', {autoIncrement: true})");
evalAndLog("db.createObjectStore('PlainOldStore', {autoIncrement: false})");
- evalAndLog("db.createObjectStore('StoreWithLongKeyPath', {keyPath: 'a.b.c.id', autoIncrement: true})");
var storeNames = evalAndLog("storeNames = db.objectStoreNames");
shouldBeEqualToString("store.name", "StoreWithKeyPath");
shouldBe("storeNames.contains('StoreWithKeyPath')", "true");
shouldBe("storeNames.contains('StoreWithAutoIncrement')", "true");
shouldBe("storeNames.contains('PlainOldStore')", "true");
- shouldBe("storeNames.length", "4");
+ shouldBe("storeNames.length", "3");
// Let the setVersion transaction complete.
}
window.trans = evalAndLog("trans = db.transaction(['StoreWithKeyPath', 'StoreWithAutoIncrement', 'PlainOldStore'], webkitIDBTransaction.READ_WRITE)");
trans.onabort = unexpectedAbortCallback;
- trans.oncomplete = testLongKeyPath;
+ trans.oncomplete = done;
window.store = evalAndLog("store = trans.objectStore('StoreWithKeyPath')");
shouldBe("event.target.result", "1");
}
-function testLongKeyPath()
-{
- debug("testLongKeyPath():");
- trans = evalAndLog("trans = db.transaction('StoreWithLongKeyPath', webkitIDBTransaction.READ_WRITE)");
- trans.onabort = unexpectedAbortCallback;
- trans.oncomplete = done;
-
- store = evalAndLog("store = trans.objectStore('StoreWithLongKeyPath')");
- request = evalAndLog("store.add({foo: 'bar'})");
- request.onerror = unexpectedErrorCallback;
- request = evalAndLog("store.add({foo: 'bar', a: {}})");
- request.onerror = unexpectedErrorCallback;
- request = evalAndLog("store.add({foo: 'bar', a: {b: {}}})");
- request.onerror = unexpectedErrorCallback;
- request = evalAndLog("store.add({foo: 'bar', a: {b: {c: {}}}})");
- request.onerror = unexpectedErrorCallback;
- cursorRequest = evalAndLog("store.openCursor()");
- cursorRequest.onerror = unexpectedErrorCallback;
- evalAndLog("expected = null");
- evalAndLog("count = 0");
- cursorRequest.onsuccess = function () {
- cursor = cursorRequest.result;
- if (!cursor) {
- shouldBe("count", "4");
- return;
- }
- if (expected === null) {
- evalAndLog("expected = cursor.value.a.b.c.id + 1");
- } else {
- shouldBe("cursor.value.foo", "'bar'");
- shouldBe("cursor.value.a.b.c.id", "expected");
- evalAndLog("expected = cursor.value.a.b.c.id + 1");
- }
- count++;
- cursor.continue();
- };
-}
-
-
test();
+2012-01-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r105331.
+ http://trac.webkit.org/changeset/105331
+ https://bugs.webkit.org/show_bug.cgi?id=76599
+
+ May have broken Chromium InjectIDBKey browser_test (Requested
+ by rolandsteiner on #webkit).
+
+ * bindings/v8/IDBBindingUtilities.cpp:
+ (WebCore::injectIDBKeyIntoSerializedValue):
+
2012-01-18 Raymond Liu <raymond.liu@intel.com>
Remove some unused code in AudioContext
return currentValue;
}
-v8::Handle<v8::Value> ensureNthValueOnKeyPath(v8::Handle<v8::Value>& rootValue, const Vector<String>& keyPathElements, size_t index)
-{
- v8::Handle<v8::Value> currentValue(rootValue);
-
- ASSERT(index <= keyPathElements.size());
- for (size_t i = 0; i < index; ++i) {
- v8::Handle<v8::Value> parentValue(currentValue);
- const String& keyPathElement = keyPathElements[i];
- if (!get(currentValue, keyPathElement)) {
- v8::Handle<v8::Object> object = v8::Object::New();
- if (!set(parentValue, keyPathElement, object))
- return v8::Handle<v8::Value>();
- currentValue = object;
- }
- }
-
- return currentValue;
-}
-
} // anonymous namespace
PassRefPtr<IDBKey> createIDBKeyFromSerializedValueAndKeyPath(PassRefPtr<SerializedScriptValue> value, const Vector<String>& keyPath)
return 0;
v8::Handle<v8::Value> v8Value(value->deserialize());
- v8::Handle<v8::Value> parent(ensureNthValueOnKeyPath(v8Value, keyPath, keyPath.size() - 1));
+ v8::Handle<v8::Value> parent(getNthValueOnKeyPath(v8Value, keyPath, keyPath.size() - 1));
if (parent.IsEmpty())
return 0;