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

Unified Diff: Source/bindings/v8/ScriptProfiler.cpp

Issue 16226011: Fix r151732. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptProfiler.cpp
diff --git a/Source/bindings/v8/ScriptProfiler.cpp b/Source/bindings/v8/ScriptProfiler.cpp
index 616a0317bdd8ea51958c8d8f48e78020e595a054..6f43f1d0c26d5ffede298bc0d1a7bd431db776a9 100644
--- a/Source/bindings/v8/ScriptProfiler.cpp
+++ b/Source/bindings/v8/ScriptProfiler.cpp
@@ -279,17 +279,26 @@ void ScriptProfiler::visitNodeWrappers(WrappedNodeVisitor* visitor)
{
}
+#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS
virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE
{
+ VisitPersistentHandle(&value, classId);
+ }
+
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId)
+#else
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) OVERRIDE
+#endif
+ {
if (classId != v8DOMNodeClassId)
return;
UNUSED_PARAM(m_isolate);
- ASSERT(V8Node::HasInstance(value, m_isolate, worldType(m_isolate)));
- ASSERT(value->IsObject());
+ ASSERT(V8Node::HasInstance(*value, m_isolate, worldType(m_isolate)));
+ ASSERT((*value)->IsObject());
#ifdef V8_USE_UNSAFE_HANDLES
- v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);
+ v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(*value);
#else
- v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(value);
+ v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(*value);
#endif
m_visitor->visitNode(V8Node::toNative(wrapper));
}
@@ -316,15 +325,24 @@ void ScriptProfiler::visitExternalArrays(ExternalArrayVisitor* visitor)
{
}
+#ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS
virtual void VisitPersistentHandle(v8::Persistent<v8::Value> value, uint16_t classId) OVERRIDE
{
+ VisitPersistentHandle(&value, classId);
+ }
+
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId)
+#else
+ virtual void VisitPersistentHandle(v8::Persistent<v8::Value>* value, uint16_t classId) OVERRIDE
+#endif
+ {
if (classId != v8DOMObjectClassId)
return;
- ASSERT(value->IsObject());
+ ASSERT((*value)->IsObject());
#ifdef V8_USE_UNSAFE_HANDLES
- v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(value);
+ v8::Persistent<v8::Object> wrapper = v8::Persistent<v8::Object>::Cast(*value);
#else
- v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(value);
+ v8::Persistent<v8::Object>& wrapper = v8::Persistent<v8::Object>::Cast(*value);
#endif
if (!toWrapperTypeInfo(wrapper)->isSubclass(&V8ArrayBufferView::info))
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698