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

Unified Diff: Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 4 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/bindings/core/v8/custom/V8MutationObserverCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp b/Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp
index 9c670c67dc5bceb105d8ec7ab81e644415ec3c6e..01462b8c15f7356384422f97a0092887825676d5 100644
--- a/Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8MutationObserverCustom.cpp
@@ -67,9 +67,9 @@ void V8MutationObserver::constructorCustom(const v8::FunctionCallbackInfo<v8::Va
info.GetReturnValue().Set(wrapper);
}
-void V8MutationObserver::visitDOMWrapper(void* object, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate)
+void V8MutationObserver::visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>& wrapper, v8::Isolate* isolate)
{
- MutationObserver* observer = static_cast<MutationObserver*>(object);
+ MutationObserver* observer = fromInternalPointer(internalPointer);
WillBeHeapHashSet<RawPtrWillBeMember<Node> > observedNodes = observer->getObservedNodes();
for (WillBeHeapHashSet<RawPtrWillBeMember<Node> >::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) {
v8::UniqueId id(reinterpret_cast<intptr_t>(V8GCController::opaqueRootForGC(*it, isolate)));
« no previous file with comments | « Source/bindings/core/v8/custom/V8ArrayBufferCustom.cpp ('k') | Source/bindings/core/v8/custom/V8TypedArrayCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698