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

Side by Side Diff: third_party/WebKit/Source/bindings/modules/v8/V8IDBObserverCallback.cpp

Issue 2031113002: IndexedDB Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Observer idl 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "bindings/modules/v8/V8IDBObserverCallback.h"
6
7 #include "bindings/core/v8/ScriptController.h"
8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/modules/v8/V8IDBObserver.h"
10 #include "core/dom/ExecutionContext.h"
11 #include "wtf/Assertions.h"
12
13 namespace blink {
14
15 V8IDBObserverCallback::V8IDBObserverCallback(v8::Local<v8::Function> callback, v 8::Local<v8::Object> owner, ScriptState* scriptState)
16 : ActiveDOMCallback(scriptState->getExecutionContext())
17 , m_callback(scriptState->isolate(), callback)
18 , m_scriptState(scriptState)
19 {
20 // has been changed for intersection observer
21 V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(sc riptState->isolate()), callback);
dmurph 2016/06/04 00:56:18 As discussed, please change to match. You'll have
palakj1 2016/06/06 19:49:30 Done
22 m_callback.setWeak(this, &setWeakCallback);
23 }
24
25 V8IDBObserverCallback::~V8IDBObserverCallback()
26 {
27 }
28
29 void V8IDBObserverCallback::setWeakCallback(const v8::WeakCallbackInfo<V8IDBObse rverCallback>& data)
30 {
31 data.GetParameter()->m_callback.clear();
32 }
33
34 DEFINE_TRACE(V8IDBObserverCallback)
35 {
36 IDBObserverCallback::trace(visitor);
37 ActiveDOMCallback::trace(visitor);
38 }
39
40 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698