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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp

Issue 1773813007: blink: Rename modules/ method to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-modules: rebase-fixes Created 4 years, 9 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 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "bindings/core/v8/V8IntersectionObserverCallback.h" 5 #include "bindings/core/v8/V8IntersectionObserverCallback.h"
6 6
7 #include "bindings/core/v8/ScriptController.h" 7 #include "bindings/core/v8/ScriptController.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/core/v8/V8IntersectionObserver.h" 9 #include "bindings/core/v8/V8IntersectionObserver.h"
10 #include "core/dom/ExecutionContext.h" 10 #include "core/dom/ExecutionContext.h"
11 #include "wtf/Assertions.h" 11 #include "wtf/Assertions.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 V8IntersectionObserverCallback::V8IntersectionObserverCallback(v8::Local<v8::Fun ction> callback, v8::Local<v8::Object> owner, ScriptState* scriptState) 15 V8IntersectionObserverCallback::V8IntersectionObserverCallback(v8::Local<v8::Fun ction> callback, v8::Local<v8::Object> owner, ScriptState* scriptState)
16 : ActiveDOMCallback(scriptState->executionContext()) 16 : ActiveDOMCallback(scriptState->getExecutionContext())
17 , m_callback(scriptState->isolate(), callback) 17 , m_callback(scriptState->isolate(), callback)
18 , m_scriptState(scriptState) 18 , m_scriptState(scriptState)
19 { 19 {
20 V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(sc riptState->isolate()), callback); 20 V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(sc riptState->isolate()), callback);
21 m_callback.setWeak(this, &setWeakCallback); 21 m_callback.setWeak(this, &setWeakCallback);
22 } 22 }
23 23
24 V8IntersectionObserverCallback::~V8IntersectionObserverCallback() 24 V8IntersectionObserverCallback::~V8IntersectionObserverCallback()
25 { 25 {
26 } 26 }
(...skipping 21 matching lines...) Expand all
48 48
49 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(observerHandl e); 49 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(observerHandl e);
50 v8::Local<v8::Value> entriesHandle = toV8(entries, m_scriptState->context()- >Global(), m_scriptState->isolate()); 50 v8::Local<v8::Value> entriesHandle = toV8(entries, m_scriptState->context()- >Global(), m_scriptState->isolate());
51 if (entriesHandle.IsEmpty()) { 51 if (entriesHandle.IsEmpty()) {
52 return; 52 return;
53 } 53 }
54 v8::Local<v8::Value> argv[] = { entriesHandle, observerHandle }; 54 v8::Local<v8::Value> argv[] = { entriesHandle, observerHandle };
55 55
56 v8::TryCatch exceptionCatcher(m_scriptState->isolate()); 56 v8::TryCatch exceptionCatcher(m_scriptState->isolate());
57 exceptionCatcher.SetVerbose(true); 57 exceptionCatcher.SetVerbose(true);
58 ScriptController::callFunction(m_scriptState->executionContext(), m_callback .newLocal(m_scriptState->isolate()), thisObject, 2, argv, m_scriptState->isolate ()); 58 ScriptController::callFunction(m_scriptState->getExecutionContext(), m_callb ack.newLocal(m_scriptState->isolate()), thisObject, 2, argv, m_scriptState->isol ate());
59 } 59 }
60 60
61 void V8IntersectionObserverCallback::setWeakCallback(const v8::WeakCallbackInfo< V8IntersectionObserverCallback>& data) 61 void V8IntersectionObserverCallback::setWeakCallback(const v8::WeakCallbackInfo< V8IntersectionObserverCallback>& data)
62 { 62 {
63 data.GetParameter()->m_callback.clear(); 63 data.GetParameter()->m_callback.clear();
64 } 64 }
65 65
66 DEFINE_TRACE(V8IntersectionObserverCallback) 66 DEFINE_TRACE(V8IntersectionObserverCallback)
67 { 67 {
68 IntersectionObserverCallback::trace(visitor); 68 IntersectionObserverCallback::trace(visitor);
69 ActiveDOMCallback::trace(visitor); 69 ActiveDOMCallback::trace(visitor);
70 } 70 }
71 71
72 } // namespace blink 72 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698