Commit 68c4712d authored by zandobersek@gmail.com's avatar zandobersek@gmail.com

REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1

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

Reviewed by Anders Carlsson.

* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
to return it after it's adopted by the new HashMap entry.
(JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
should be returned in this branch, matching the behavior before r154708.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cf8af613
2013-08-28 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
https://bugs.webkit.org/show_bug.cgi?id=120398
Reviewed by Anders Carlsson.
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
to return it after it's adopted by the new HashMap entry.
(JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
should be returned in this branch, matching the behavior before r154708.
2013-08-28 Antti Koivisto <antti@apple.com>
Fix Qt no-libxml2 build.
......@@ -78,9 +78,9 @@ Method* CClass::methodNamed(PropertyName propertyName, Instance* instance) const
const CInstance* inst = static_cast<const CInstance*>(instance);
NPObject* obj = inst->getObject();
if (m_isa->hasMethod && m_isa->hasMethod(obj, ident)) {
OwnPtr<Method> method = adoptPtr(new CMethod(ident));
m_methods.set(name.impl(), method.release());
return method.get();
Method* method = new CMethod(ident);
m_methods.set(name.impl(), adoptPtr(method));
return method;
}
return 0;
......@@ -97,8 +97,9 @@ Field* CClass::fieldNamed(PropertyName propertyName, Instance* instance) const
const CInstance* inst = static_cast<const CInstance*>(instance);
NPObject* obj = inst->getObject();
if (m_isa->hasProperty && m_isa->hasProperty(obj, ident)) {
OwnPtr<Field> field = adoptPtr(new CField(ident));
m_fields.set(name.impl(), field.release());
Field* field = new CField(ident);
m_fields.set(name.impl(), adoptPtr(field));
return field;
}
return 0;
......
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