Commit 5b43fa04 authored by r.nagaraj@samsung.com's avatar r.nagaraj@samsung.com

Move the v8::Isolate* parameter to the first parameter of various binding...

Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings

This step is to move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/WebKit/Source/bindings
(Ref: method changed: Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*))

BUG=424446

Review URL: https://codereview.chromium.org/645063004

git-svn-id: svn://svn.chromium.org/blink/trunk@183977 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent aaa1cca3
...@@ -73,7 +73,7 @@ static void addReferencesForNodeWithEventListeners(v8::Isolate* isolate, Node* n ...@@ -73,7 +73,7 @@ static void addReferencesForNodeWithEventListeners(v8::Isolate* isolate, Node* n
} }
} }
Node* V8GCController::opaqueRootForGC(Node* node, v8::Isolate*) Node* V8GCController::opaqueRootForGC(v8::Isolate*, Node* node)
{ {
ASSERT(node); ASSERT(node);
// FIXME: Remove the special handling for image elements. // FIXME: Remove the special handling for image elements.
...@@ -277,7 +277,7 @@ public: ...@@ -277,7 +277,7 @@ public:
Node* node = V8Node::toImpl(*wrapper); Node* node = V8Node::toImpl(*wrapper);
if (node->hasEventListeners()) if (node->hasEventListeners())
addReferencesForNodeWithEventListeners(m_isolate, node, v8::Persistent<v8::Object>::Cast(*value)); addReferencesForNodeWithEventListeners(m_isolate, node, v8::Persistent<v8::Object>::Cast(*value));
Node* root = V8GCController::opaqueRootForGC(node, m_isolate); Node* root = V8GCController::opaqueRootForGC(m_isolate, node);
m_isolate->SetObjectGroupId(*value, v8::UniqueId(reinterpret_cast<intptr_t>(root))); m_isolate->SetObjectGroupId(*value, v8::UniqueId(reinterpret_cast<intptr_t>(root)));
if (m_constructRetainedObjectInfos) if (m_constructRetainedObjectInfos)
m_groupsWhichNeedRetainerInfo.append(root); m_groupsWhichNeedRetainerInfo.append(root);
......
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
static void collectGarbage(v8::Isolate*); static void collectGarbage(v8::Isolate*);
static Node* opaqueRootForGC(Node*, v8::Isolate*); static Node* opaqueRootForGC(v8::Isolate*, Node*);
static void reportDOMMemoryUsageToV8(v8::Isolate*); static void reportDOMMemoryUsageToV8(v8::Isolate*);
......
...@@ -72,7 +72,7 @@ void V8MutationObserver::visitDOMWrapper(ScriptWrappableBase* internalPointer, c ...@@ -72,7 +72,7 @@ void V8MutationObserver::visitDOMWrapper(ScriptWrappableBase* internalPointer, c
MutationObserver* observer = internalPointer->toImpl<MutationObserver>(); MutationObserver* observer = internalPointer->toImpl<MutationObserver>();
WillBeHeapHashSet<RawPtrWillBeMember<Node> > observedNodes = observer->getObservedNodes(); WillBeHeapHashSet<RawPtrWillBeMember<Node> > observedNodes = observer->getObservedNodes();
for (WillBeHeapHashSet<RawPtrWillBeMember<Node> >::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) { for (WillBeHeapHashSet<RawPtrWillBeMember<Node> >::iterator it = observedNodes.begin(); it != observedNodes.end(); ++it) {
v8::UniqueId id(reinterpret_cast<intptr_t>(V8GCController::opaqueRootForGC(*it, isolate))); v8::UniqueId id(reinterpret_cast<intptr_t>(V8GCController::opaqueRootForGC(isolate, *it)));
isolate->SetReferenceFromGroup(id, wrapper); isolate->SetReferenceFromGroup(id, wrapper);
} }
} }
......
...@@ -588,7 +588,7 @@ void {{v8_class}}::visitDOMWrapper(ScriptWrappableBase* internalPointer, const v ...@@ -588,7 +588,7 @@ void {{v8_class}}::visitDOMWrapper(ScriptWrappableBase* internalPointer, const v
{% if reachable_node_function %} {% if reachable_node_function %}
// The {{reachable_node_function}}() method may return a reference or a pointer. // The {{reachable_node_function}}() method may return a reference or a pointer.
if (Node* owner = WTF::getPtr(impl->{{reachable_node_function}}())) { if (Node* owner = WTF::getPtr(impl->{{reachable_node_function}}())) {
Node* root = V8GCController::opaqueRootForGC(owner, isolate); Node* root = V8GCController::opaqueRootForGC(isolate, owner);
isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper); isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper);
return; return;
} }
......
...@@ -417,7 +417,7 @@ void V8TestInterface2::visitDOMWrapper(ScriptWrappableBase* internalPointer, con ...@@ -417,7 +417,7 @@ void V8TestInterface2::visitDOMWrapper(ScriptWrappableBase* internalPointer, con
TestInterface2* impl = internalPointer->toImpl<TestInterface2>(); TestInterface2* impl = internalPointer->toImpl<TestInterface2>();
// The ownerNode() method may return a reference or a pointer. // The ownerNode() method may return a reference or a pointer.
if (Node* owner = WTF::getPtr(impl->ownerNode())) { if (Node* owner = WTF::getPtr(impl->ownerNode())) {
Node* root = V8GCController::opaqueRootForGC(owner, isolate); Node* root = V8GCController::opaqueRootForGC(isolate, owner);
isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper); isolate->SetReferenceFromGroup(v8::UniqueId(reinterpret_cast<intptr_t>(root)), wrapper);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment