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

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

Issue 114363002: Structured cloning: improve DataCloneError reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + reset V8TestInterfaceConstructor.cpp result Created 7 years 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
« no previous file with comments | « Source/core/dom/MessagePort.cpp ('k') | Source/web/WebSerializedScriptValue.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 if (!m_transaction->isActive()) { 161 if (!m_transaction->isActive()) {
162 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage); 162 exceptionState.throwDOMException(TransactionInactiveError, IDBDatabase:: transactionInactiveErrorMessage);
163 return 0; 163 return 0;
164 } 164 }
165 if (m_transaction->isReadOnly()) { 165 if (m_transaction->isReadOnly()) {
166 exceptionState.throwUninformativeAndGenericDOMException(ReadOnlyError); 166 exceptionState.throwUninformativeAndGenericDOMException(ReadOnlyError);
167 return 0; 167 return 0;
168 } 168 }
169 169
170 // FIXME: Make SerializedScriptValue::create etc take an ExceptionState or u se ScriptState::setDOMException. 170 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::creat e(value, exceptionState, state);
171 bool didThrow = false; 171 if (exceptionState.hadException())
172 RefPtr<SerializedScriptValue> serializedValue = SerializedScriptValue::creat e(value, didThrow, state);
173 if (didThrow)
174 return 0; 172 return 0;
175 173
176 if (serializedValue->containsBlobs()) { 174 if (serializedValue->containsBlobs()) {
177 // FIXME: Add Blob/File/FileList support 175 // FIXME: Add Blob/File/FileList support
178 exceptionState.throwUninformativeAndGenericDOMException(DataCloneError); 176 exceptionState.throwUninformativeAndGenericDOMException(DataCloneError);
179 return 0; 177 return 0;
180 } 178 }
181 179
182 const IDBKeyPath& keyPath = m_metadata.keyPath; 180 const IDBKeyPath& keyPath = m_metadata.keyPath;
183 const bool usesInLineKeys = !keyPath.isNull(); 181 const bool usesInLineKeys = !keyPath.isNull();
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 617 }
620 return IDBIndexMetadata::InvalidId; 618 return IDBIndexMetadata::InvalidId;
621 } 619 }
622 620
623 WebIDBDatabase* IDBObjectStore::backendDB() const 621 WebIDBDatabase* IDBObjectStore::backendDB() const
624 { 622 {
625 return m_transaction->backendDB(); 623 return m_transaction->backendDB();
626 } 624 }
627 625
628 } // namespace WebCore 626 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/MessagePort.cpp ('k') | Source/web/WebSerializedScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698