void IDBDatabase::renameIndex(IDBIndex& index, const String& newName)
{
    ASSERT(&originThread() == &Thread::current());
    ASSERT(m_versionChangeTransaction);
    ASSERT(m_info.hasObjectStore(index.objectStore().info().name()));
    ASSERT(m_info.infoForExistingObjectStore(index.objectStore().info().name())->hasIndex(index.info().name()));

    m_info.infoForExistingObjectStore(index.objectStore().info().name())->infoForExistingIndex(index.info().identifier())->rename(newName);

    m_versionChangeTransaction->renameIndex(index, newName);
}
JSValue jsIDBIndexObjectStore(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSIDBIndex* castedThis = static_cast<JSIDBIndex*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    IDBIndex* imp = static_cast<IDBIndex*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->objectStore()));
    return result;
}