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

Unified Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp

Issue 2458573002: bindings: Store ScriptState in generated callback functions (Closed)
Patch Set: Created 4 years, 2 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: third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
index 95abf13fd943670ef41e1446a317e32a75b242fe..8cdcb74dcab85fe9370061c7b0b14271018ea39c 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp
@@ -18,17 +18,14 @@
namespace blink {
-IDBObserver* IDBObserver::create(ScriptState* scriptState,
- IDBObserverCallback* callback,
+IDBObserver* IDBObserver::create(IDBObserverCallback* callback,
const IDBObserverInit& options) {
- return new IDBObserver(scriptState, callback, options);
+ return new IDBObserver(callback, options);
}
-IDBObserver::IDBObserver(ScriptState* scriptState,
- IDBObserverCallback* callback,
+IDBObserver::IDBObserver(IDBObserverCallback* callback,
const IDBObserverInit& options)
- : m_scriptState(scriptState),
- m_callback(callback),
+ : m_callback(callback),
m_transaction(options.transaction()),
m_values(options.values()),
m_noRecords(options.noRecords()) {
@@ -102,9 +99,8 @@ void IDBObserver::onChange(int32_t id,
const WebVector<int32_t>& observationIndex) {
auto it = m_observerIds.find(id);
DCHECK(it != m_observerIds.end());
- m_callback->call(
- m_scriptState.get(), this,
- IDBObserverChanges::create(it->value, observations, observationIndex));
+ m_callback->call(this, IDBObserverChanges::create(it->value, observations,
+ observationIndex));
}
DEFINE_TRACE(IDBObserver) {

Powered by Google App Engine
This is Rietveld 408576698