Changeset 154741 in webkit


Ignore:
Timestamp:
Aug 28, 2013 7:03:38 AM (11 years ago)
Author:
zandobersek@gmail.com
Message:

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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154740 r154741  
     12013-08-28  Zan Dobersek  <zdobersek@igalia.com>
     2
     3        REGRESSION(r154708): It broke all plugin tests on GTK and Qt WK1
     4        https://bugs.webkit.org/show_bug.cgi?id=120398
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * bridge/c/c_class.cpp:
     9        (JSC::Bindings::CClass::methodNamed): Keep the pointer of the new CMethod object
     10        to return it after it's adopted by the new HashMap entry.
     11        (JSC::Bindings::CClass::fieldNamed): The pointer to the newly created CField object
     12        should be returned in this branch, matching the behavior before r154708.
     13
    1142013-08-28  Antti Koivisto  <antti@apple.com>
    215
  • trunk/Source/WebCore/bridge/c/c_class.cpp

    r154708 r154741  
    7979    NPObject* obj = inst->getObject();
    8080    if (m_isa->hasMethod && m_isa->hasMethod(obj, ident)) {
    81         OwnPtr<Method> method = adoptPtr(new CMethod(ident));
    82         m_methods.set(name.impl(), method.release());
    83         return method.get();
     81        Method* method = new CMethod(ident);
     82        m_methods.set(name.impl(), adoptPtr(method));
     83        return method;
    8484    }
    8585   
     
    9898    NPObject* obj = inst->getObject();
    9999    if (m_isa->hasProperty && m_isa->hasProperty(obj, ident)) {
    100         OwnPtr<Field> field = adoptPtr(new CField(ident));
    101         m_fields.set(name.impl(), field.release());
     100        Field* field = new CField(ident);
     101        m_fields.set(name.impl(), adoptPtr(field));
     102        return field;
    102103    }
    103104
Note: See TracChangeset for help on using the changeset viewer.