Index: third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp b/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp |
index 37fd6d40a01542f9166078a45dedfb3a6f525543..866be8f1a2920cc87e501750c700cab0a9c48491 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8IntersectionObserverCallback.cpp |
@@ -7,6 +7,7 @@ |
#include "bindings/core/v8/ScriptController.h" |
#include "bindings/core/v8/V8Binding.h" |
#include "bindings/core/v8/V8IntersectionObserver.h" |
+#include "bindings/core/v8/V8PrivateProperty.h" |
#include "core/dom/ExecutionContext.h" |
#include "wtf/Assertions.h" |
@@ -17,8 +18,8 @@ V8IntersectionObserverCallback::V8IntersectionObserverCallback(v8::Local<v8::Fun |
, m_callback(scriptState->isolate(), callback) |
, m_scriptState(scriptState) |
{ |
- V8HiddenValue::setHiddenValue(scriptState, owner, V8HiddenValue::callback(scriptState->isolate()), callback); |
- m_callback.setWeak(this, &setWeakCallback); |
+ V8PrivateProperty::getIntersectionObserverCallback(scriptState->isolate()).set(scriptState->context(), owner, callback); |
+ m_callback.setPhantom(); |
} |
V8IntersectionObserverCallback::~V8IntersectionObserverCallback() |
@@ -58,11 +59,6 @@ void V8IntersectionObserverCallback::handleEvent(const HeapVector<Member<Interse |
ScriptController::callFunction(m_scriptState->getExecutionContext(), m_callback.newLocal(m_scriptState->isolate()), thisObject, 2, argv, m_scriptState->isolate()); |
} |
-void V8IntersectionObserverCallback::setWeakCallback(const v8::WeakCallbackInfo<V8IntersectionObserverCallback>& data) |
-{ |
- data.GetParameter()->m_callback.clear(); |
-} |
- |
DEFINE_TRACE(V8IntersectionObserverCallback) |
{ |
IntersectionObserverCallback::trace(visitor); |