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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp

Issue 2010103002: [Binding] [Refactoring] Remove redundant overloaded methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 245 }
246 if (!m_transaction->isActive()) { 246 if (!m_transaction->isActive()) {
247 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage); 247 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage);
248 return nullptr; 248 return nullptr;
249 } 249 }
250 if (m_transaction->isReadOnly()) { 250 if (m_transaction->isReadOnly()) {
251 exceptionState.throwDOMException(ReadOnlyError, IDBDatabase::transaction ReadOnlyErrorMessage); 251 exceptionState.throwDOMException(ReadOnlyError, IDBDatabase::transaction ReadOnlyErrorMessage);
252 return nullptr; 252 return nullptr;
253 } 253 }
254 254
255 v8::Isolate* isolate = scriptState->isolate();
256 DCHECK(isolate->InContext());
255 Vector<WebBlobInfo> blobInfo; 257 Vector<WebBlobInfo> blobInfo;
256 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValueFactory ::instance().create(scriptState->isolate(), value, &blobInfo, exceptionState); 258 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValueFactory ::instance().create(isolate, value.v8Value(), nullptr, &blobInfo, exceptionState );
257 if (exceptionState.hadException()) 259 if (exceptionState.hadException())
258 return nullptr; 260 return nullptr;
259 261
260 // Keys that need to be extracted must be taken from a clone so that 262 // Keys that need to be extracted must be taken from a clone so that
261 // side effects (i.e. getters) are not triggered. Construct the 263 // side effects (i.e. getters) are not triggered. Construct the
262 // clone lazily since the operation may be expensive. 264 // clone lazily since the operation may be expensive.
263 ScriptValue clone; 265 ScriptValue clone;
264 266
265 const IDBKeyPath& keyPath = m_metadata.keyPath; 267 const IDBKeyPath& keyPath = m_metadata.keyPath;
266 const bool usesInLineKeys = !keyPath.isNull(); 268 const bool usesInLineKeys = !keyPath.isNull();
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 } 758 }
757 return IDBIndexMetadata::InvalidId; 759 return IDBIndexMetadata::InvalidId;
758 } 760 }
759 761
760 WebIDBDatabase* IDBObjectStore::backendDB() const 762 WebIDBDatabase* IDBObjectStore::backendDB() const
761 { 763 {
762 return m_transaction->backendDB(); 764 return m_transaction->backendDB();
763 } 765 }
764 766
765 } // namespace blink 767 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698