Changeset 57628 in webkit


Ignore:
Timestamp:
Apr 14, 2010 8:17:26 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-04-14 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

Fix a memory leak in QScriptValue::inherits.

[Qt] QScriptValue::inherits has a memory leak.
https://bugs.webkit.org/show_bug.cgi?id=37617

  • qt/api/qscriptvalue_p.h: (QScriptValuePrivate::inherits):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r57626 r57628  
     12010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Fix a memory leak in QScriptValue::inherits.
     6
     7        [Qt] QScriptValue::inherits has a memory leak.
     8        https://bugs.webkit.org/show_bug.cgi?id=37617
     9
     10        * qt/api/qscriptvalue_p.h:
     11        (QScriptValuePrivate::inherits):
     12
    1132010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
    214
  • trunk/JavaScriptCore/qt/api/qscriptvalue_p.h

    r55887 r57628  
    712712    Q_ASSERT(isJSBased());
    713713    JSObjectRef globalObject = JSContextGetGlobalObject(context());
    714     JSValueRef error = JSObjectGetProperty(context(), globalObject, QScriptConverter::toString(name), 0);
     714    JSStringRef errorAttrName = QScriptConverter::toString(name);
     715    JSValueRef error = JSObjectGetProperty(context(), globalObject, errorAttrName, /* exception */ 0);
     716    JSStringRelease(errorAttrName);
    715717    return JSValueIsInstanceOfConstructor(context(), value(), JSValueToObject(context(), error, /* exception */ 0), /* exception */ 0);
    716718}
Note: See TracChangeset for help on using the changeset viewer.