Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Side by Side Diff: Source/WebCore/Modules/indexeddb/IDBDatabase.cpp

Issue 11348011: Revert 128789 - IndexedDB: Use ScriptValue instead of SerializedScriptValue for get/openCursor (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 objectStoreNames->append(it->first); 110 objectStoreNames->append(it->first);
111 objectStoreNames->sort(); 111 objectStoreNames->sort();
112 return objectStoreNames.release(); 112 return objectStoreNames.release();
113 } 113 }
114 114
115 PassRefPtr<IDBAny> IDBDatabase::version() const 115 PassRefPtr<IDBAny> IDBDatabase::version() const
116 { 116 {
117 int64_t intVersion = m_metadata.intVersion; 117 int64_t intVersion = m_metadata.intVersion;
118 if (intVersion == IDBDatabaseMetadata::NoIntVersion) 118 if (intVersion == IDBDatabaseMetadata::NoIntVersion)
119 return IDBAny::createString(m_metadata.version); 119 return IDBAny::createString(m_metadata.version);
120 return IDBAny::create(intVersion); 120 return IDBAny::create(SerializedScriptValue::numberValue(intVersion));
121 } 121 }
122 122
123 PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co nst Dictionary& options, ExceptionCode& ec) 123 PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co nst Dictionary& options, ExceptionCode& ec)
124 { 124 {
125 if (!m_versionChangeTransaction) { 125 if (!m_versionChangeTransaction) {
126 ec = IDBDatabaseException::IDB_INVALID_STATE_ERR; 126 ec = IDBDatabaseException::IDB_INVALID_STATE_ERR;
127 return 0; 127 return 0;
128 } 128 }
129 if (!m_versionChangeTransaction->isActive()) { 129 if (!m_versionChangeTransaction->isActive()) {
130 ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR; 130 ec = IDBDatabaseException::TRANSACTION_INACTIVE_ERR;
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 EventTargetData* IDBDatabase::ensureEventTargetData() 382 EventTargetData* IDBDatabase::ensureEventTargetData()
383 { 383 {
384 return &m_eventTargetData; 384 return &m_eventTargetData;
385 } 385 }
386 386
387 } // namespace WebCore 387 } // namespace WebCore
388 388
389 #endif // ENABLE(INDEXED_DATABASE) 389 #endif // ENABLE(INDEXED_DATABASE)
OLDNEW
« no previous file with comments | « Source/WebCore/Modules/indexeddb/IDBCursor.cpp ('k') | Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698