Commit 0f9a6c1e authored by haraken@chromium.org's avatar haraken@chromium.org
Browse files

[V8] Pass Isolate to toV8Slow()

https://bugs.webkit.org/show_bug.cgi?id=84173

Reviewed by Nate Chapin.

The final objective is to pass Isolate around in V8 bindings.
This patch passes the Isolate to toV8Slow().

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::toV8Slow):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 363c3871
2012-04-17 Kentaro Hara <haraken@chromium.org>
[V8] Pass Isolate to toV8Slow()
https://bugs.webkit.org/show_bug.cgi?id=84173
Reviewed by Nate Chapin.
The final objective is to pass Isolate around in V8 bindings.
This patch passes the Isolate to toV8Slow().
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::toV8Slow):
2012-04-17 Julien Chaffraix <jchaffraix@webkit.org>
 
Fix the ACCELERATED_COMPOSITING code to not expose RenderLayer outside rendering
......@@ -456,18 +456,18 @@ END
} else {
push(@headerContent, <<END);
v8::Handle<v8::Value> toV8Slow(Node*, bool);
v8::Handle<v8::Value> toV8Slow(Node*, v8::Isolate*, bool);
inline v8::Handle<v8::Value> toV8(Node* impl, v8::Isolate* isolate = 0, bool forceNewObject = false)
{
if (UNLIKELY(!impl))
return v8::Null();
if (UNLIKELY(forceNewObject))
return toV8Slow(impl, forceNewObject);
return toV8Slow(impl, isolate, forceNewObject);
v8::Handle<v8::Value> wrapper = V8DOMWrapper::getCachedWrapper(impl);
if (!wrapper.IsEmpty())
return wrapper;
return toV8Slow(impl, false);
return toV8Slow(impl, isolate, false);
}
END
}
......
......@@ -136,7 +136,7 @@ v8::Handle<v8::Value> V8Node::appendChildCallback(const v8::Arguments& args)
return v8::Null();
}
v8::Handle<v8::Value> toV8Slow(Node* impl, bool forceNewObject)
v8::Handle<v8::Value> toV8Slow(Node* impl, v8::Isolate* isolate, bool forceNewObject)
{
if (!impl)
return v8::Null();
......@@ -149,34 +149,34 @@ v8::Handle<v8::Value> toV8Slow(Node* impl, bool forceNewObject)
switch (impl->nodeType()) {
case Node::ELEMENT_NODE:
if (impl->isHTMLElement())
return toV8(toHTMLElement(impl), 0, forceNewObject);
return toV8(toHTMLElement(impl), isolate, forceNewObject);
#if ENABLE(SVG)
if (impl->isSVGElement())
return toV8(static_cast<SVGElement*>(impl), 0, forceNewObject);
return toV8(static_cast<SVGElement*>(impl), isolate, forceNewObject);
#endif
return V8Element::wrap(static_cast<Element*>(impl), forceNewObject);
case Node::ATTRIBUTE_NODE:
return toV8(static_cast<Attr*>(impl), 0, forceNewObject);
return toV8(static_cast<Attr*>(impl), isolate, forceNewObject);
case Node::TEXT_NODE:
return toV8(toText(impl), 0, forceNewObject);
return toV8(toText(impl), isolate, forceNewObject);
case Node::CDATA_SECTION_NODE:
return toV8(static_cast<CDATASection*>(impl), 0, forceNewObject);
return toV8(static_cast<CDATASection*>(impl), isolate, forceNewObject);
case Node::ENTITY_REFERENCE_NODE:
return toV8(static_cast<EntityReference*>(impl), 0, forceNewObject);
return toV8(static_cast<EntityReference*>(impl), isolate, forceNewObject);
case Node::ENTITY_NODE:
return toV8(static_cast<Entity*>(impl), 0, forceNewObject);
return toV8(static_cast<Entity*>(impl), isolate, forceNewObject);
case Node::PROCESSING_INSTRUCTION_NODE:
return toV8(static_cast<ProcessingInstruction*>(impl), 0, forceNewObject);
return toV8(static_cast<ProcessingInstruction*>(impl), isolate, forceNewObject);
case Node::COMMENT_NODE:
return toV8(static_cast<Comment*>(impl), 0, forceNewObject);
return toV8(static_cast<Comment*>(impl), isolate, forceNewObject);
case Node::DOCUMENT_NODE:
return toV8(static_cast<Document*>(impl), 0, forceNewObject);
return toV8(static_cast<Document*>(impl), isolate, forceNewObject);
case Node::DOCUMENT_TYPE_NODE:
return toV8(static_cast<DocumentType*>(impl), 0, forceNewObject);
return toV8(static_cast<DocumentType*>(impl), isolate, forceNewObject);
case Node::DOCUMENT_FRAGMENT_NODE:
return toV8(static_cast<DocumentFragment*>(impl), 0, forceNewObject);
return toV8(static_cast<DocumentFragment*>(impl), isolate, forceNewObject);
case Node::NOTATION_NODE:
return toV8(static_cast<Notation*>(impl), 0, forceNewObject);
return toV8(static_cast<Notation*>(impl), isolate, forceNewObject);
default: break; // XPATH_NAMESPACE_NODE
}
return V8Node::wrap(impl, forceNewObject);
......
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