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

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

Issue 2017893002: [Binding] [Refactoring] Use SerializedScriptValue class as external interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build error 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(); 255 v8::Isolate* isolate = scriptState->isolate();
256 DCHECK(isolate->InContext()); 256 DCHECK(isolate->InContext());
257 Vector<WebBlobInfo> blobInfo; 257 Vector<WebBlobInfo> blobInfo;
258 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValueFactory ::instance().create(isolate, value.v8Value(), nullptr, &blobInfo, exceptionState ); 258 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::seria lize(isolate, value.v8Value(), nullptr, &blobInfo, exceptionState);
259 if (exceptionState.hadException()) 259 if (exceptionState.hadException())
260 return nullptr; 260 return nullptr;
261 261
262 // 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
263 // side effects (i.e. getters) are not triggered. Construct the 263 // side effects (i.e. getters) are not triggered. Construct the
264 // clone lazily since the operation may be expensive. 264 // clone lazily since the operation may be expensive.
265 ScriptValue clone; 265 ScriptValue clone;
266 266
267 const IDBKeyPath& keyPath = m_metadata.keyPath; 267 const IDBKeyPath& keyPath = m_metadata.keyPath;
268 const bool usesInLineKeys = !keyPath.isNull(); 268 const bool usesInLineKeys = !keyPath.isNull();
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 758 }
759 return IDBIndexMetadata::InvalidId; 759 return IDBIndexMetadata::InvalidId;
760 } 760 }
761 761
762 WebIDBDatabase* IDBObjectStore::backendDB() const 762 WebIDBDatabase* IDBObjectStore::backendDB() const
763 { 763 {
764 return m_transaction->backendDB(); 764 return m_transaction->backendDB();
765 } 765 }
766 766
767 } // namespace blink 767 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698