2010-07-19 Robin Burchell <robin.burchell@collabora.co.uk>

        Reviewed by Antonio Gomes

        [Qt] Use memcpy() instead of qMemCopy()
        This is supposed to be more efficient, as the compiler is able to
        optimise more.

        Additionally,  qMemCopy() is only strictly supposed to be used in
        headers (see Qt's src/corelib/qglobal.h for reference)
        See: https://bugs.webkit.org/show_bug.cgi?id=42392

        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::convertQVariantToValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6f139499
2010-07-19 Robin Burchell <robin.burchell@collabora.co.uk>
Reviewed by Antonio Gomes
[Qt] Use memcpy() instead of qMemCopy()
This is supposed to be more efficient, as the compiler is able to
optimise more.
Additionally, qMemCopy() is only strictly supposed to be used in
headers (see Qt's src/corelib/qglobal.h for reference)
See: https://bugs.webkit.org/show_bug.cgi?id=42392
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertQVariantToValue):
2010-07-14 Andreas Kling <andreas.kling@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
......@@ -869,7 +869,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
if (type == QMetaType::QByteArray) {
QByteArray qtByteArray = variant.value<QByteArray>();
WTF::RefPtr<WTF::ByteArray> wtfByteArray = WTF::ByteArray::create(qtByteArray.length());
qMemCopy(wtfByteArray->data(), qtByteArray.constData(), qtByteArray.length());
memcpy(wtfByteArray->data(), qtByteArray.constData(), qtByteArray.length());
return new (exec) JSC::JSByteArray(exec, JSC::JSByteArray::createStructure(jsNull()), wtfByteArray.get());
}
......
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