| OLD | NEW |
| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 return idbAnyToScriptValue(scriptState, IDBAny::create(intVersion)); | 196 return idbAnyToScriptValue(scriptState, IDBAny::create(intVersion)); |
| 197 } | 197 } |
| 198 | 198 |
| 199 IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const Diction
ary& options, ExceptionState& exceptionState) | 199 IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const Diction
ary& options, ExceptionState& exceptionState) |
| 200 { | 200 { |
| 201 IDBKeyPath keyPath; | 201 IDBKeyPath keyPath; |
| 202 bool autoIncrement = false; | 202 bool autoIncrement = false; |
| 203 if (!options.isUndefinedOrNull()) { | 203 if (!options.isUndefinedOrNull()) { |
| 204 String keyPathString; | 204 String keyPathString; |
| 205 Vector<String> keyPathArray; | 205 Vector<String> keyPathArray; |
| 206 if (options.get("keyPath", keyPathArray)) | 206 if (DictionaryHelper::get(options, "keyPath", keyPathArray)) |
| 207 keyPath = IDBKeyPath(keyPathArray); | 207 keyPath = IDBKeyPath(keyPathArray); |
| 208 else if (options.getWithUndefinedOrNullCheck("keyPath", keyPathString)) | 208 else if (options.getWithUndefinedOrNullCheck("keyPath", keyPathString)) |
| 209 keyPath = IDBKeyPath(keyPathString); | 209 keyPath = IDBKeyPath(keyPathString); |
| 210 | 210 |
| 211 options.get("autoIncrement", autoIncrement); | 211 DictionaryHelper::get(options, "autoIncrement", autoIncrement); |
| 212 } | 212 } |
| 213 | 213 |
| 214 return createObjectStore(name, keyPath, autoIncrement, exceptionState); | 214 return createObjectStore(name, keyPath, autoIncrement, exceptionState); |
| 215 } | 215 } |
| 216 | 216 |
| 217 IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const IDBKeyP
ath& keyPath, bool autoIncrement, ExceptionState& exceptionState) | 217 IDBObjectStore* IDBDatabase::createObjectStore(const String& name, const IDBKeyP
ath& keyPath, bool autoIncrement, ExceptionState& exceptionState) |
| 218 { | 218 { |
| 219 IDB_TRACE("IDBDatabase::createObjectStore"); | 219 IDB_TRACE("IDBDatabase::createObjectStore"); |
| 220 blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEnd
APICalls", IDBCreateObjectStoreCall, IDBMethodsMax); | 220 blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEnd
APICalls", IDBCreateObjectStoreCall, IDBMethodsMax); |
| 221 if (!m_versionChangeTransaction) { | 221 if (!m_versionChangeTransaction) { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 { | 471 { |
| 472 return EventTargetNames::IDBDatabase; | 472 return EventTargetNames::IDBDatabase; |
| 473 } | 473 } |
| 474 | 474 |
| 475 ExecutionContext* IDBDatabase::executionContext() const | 475 ExecutionContext* IDBDatabase::executionContext() const |
| 476 { | 476 { |
| 477 return ActiveDOMObject::executionContext(); | 477 return ActiveDOMObject::executionContext(); |
| 478 } | 478 } |
| 479 | 479 |
| 480 } // namespace WebCore | 480 } // namespace WebCore |
| OLD | NEW |