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

Unified Diff: Source/modules/indexeddb/IDBDatabase.cpp

Issue 177633006: Implement IDBVersionChangeEvent ctor w/ IDBVersionChangeEventInit dict (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/indexeddb/IDBDatabase.cpp
diff --git a/Source/modules/indexeddb/IDBDatabase.cpp b/Source/modules/indexeddb/IDBDatabase.cpp
index d7a9084632969c4735a2f00f877de65d41d87eb4..de6baf57d8fff609e7bf71f7066ce3cd7bcd4b4b 100644
--- a/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/Source/modules/indexeddb/IDBDatabase.cpp
@@ -29,6 +29,7 @@
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "bindings/v8/IDBBindingUtilities.h"
+#include "bindings/v8/SerializedScriptValue.h"
#include "core/dom/ExecutionContext.h"
#include "core/events/EventQueue.h"
#include "core/inspector/ScriptCallStack.h"
@@ -360,8 +361,8 @@ void IDBDatabase::onVersionChange(int64_t oldVersion, int64_t newVersion)
if (m_closePending)
return;
- RefPtr<IDBAny> newVersionAny = newVersion == IDBDatabaseMetadata::NoIntVersion ? IDBAny::createNull() : IDBAny::create(newVersion);
- enqueueEvent(IDBVersionChangeEvent::create(IDBAny::create(oldVersion), newVersionAny.release(), EventTypeNames::versionchange));
+ RefPtr<SerializedScriptValue> newVersionSSV = (newVersion == IDBDatabaseMetadata::NoIntVersion) ? SerializedScriptValue::nullValue() : SerializedScriptValue::numberValue(newVersion);
+ enqueueEvent(IDBVersionChangeEvent::create(EventTypeNames::versionchange, SerializedScriptValue::numberValue(oldVersion), newVersionSSV.release()));
}
void IDBDatabase::enqueueEvent(PassRefPtr<Event> event)

Powered by Google App Engine
This is Rietveld 408576698