diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-05-22 09:52:57 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-25 03:21:48 +0200 |
commit | 8c68dcd2aa98f12d4e5c731dbc04a49c05917ed8 (patch) | |
tree | c23dc23889df114478692f95ddec6185d94bc769 /src/qml/qml/v8/qv8sequencewrapper_p_p.h | |
parent | 0c6c4ffacc6e9ff57e041329e4952fd61ad0717c (diff) |
Remove exceptions support from QtQml
Previously, the sequence wrapper handled std::alloc exceptions.
This commit removes that handling, as there are many other ways
to use up all of the available address space memory which aren't
handled (eg, loading lots of large images), and exception support
causes a large overhead.
See a1151929fffc765e128d72d170342020b34dd0b3 for more information.
Change-Id: I68c9d7744e7dcece7b3112352e01ac71ead12f62
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/qml/qml/v8/qv8sequencewrapper_p_p.h')
-rw-r--r-- | src/qml/qml/v8/qv8sequencewrapper_p_p.h | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/qml/qml/v8/qv8sequencewrapper_p_p.h b/src/qml/qml/v8/qv8sequencewrapper_p_p.h index 4745b7e8a4..cf20aa39fd 100644 --- a/src/qml/qml/v8/qv8sequencewrapper_p_p.h +++ b/src/qml/qml/v8/qv8sequencewrapper_p_p.h @@ -333,13 +333,7 @@ static QString convertUrlToString(QV8Engine *, const QUrl &v) /* according to ECMA262r3 we need to insert */ \ /* undefined values increasing length to newLength. */ \ /* We cannot, so we insert default-values instead. */ \ - QT_TRY { \ - c.reserve(newCount); \ - } QT_CATCH (std::bad_alloc &exception) { \ - generateWarning(engine, QString(QLatin1String(exception.what()) \ - + QLatin1String(" during length set"))); \ - return; /* failed; don't write back any result. */ \ - } \ + c.reserve(newCount); \ while (newCount > count++) { \ c.append(DefaultValue); \ } \ @@ -381,13 +375,7 @@ static QString convertUrlToString(QV8Engine *, const QUrl &v) } else { \ /* according to ECMA262r3 we need to insert */ \ /* the value at the given index, increasing length to index+1. */ \ - QT_TRY { \ - c.reserve(signedIdx + 1); \ - } QT_CATCH (std::bad_alloc &exception) { \ - generateWarning(engine, QString(QLatin1String(exception.what()) \ - + QLatin1String(" during indexed set"))); \ - return v8::Undefined(); /* failed; don't write back any result. */ \ - } \ + c.reserve(signedIdx + 1); \ while (signedIdx > count++) { \ c.append(DefaultValue); \ } \ |