if EvalFunction::parseSource returns 0, it means there wasn't
anything to parse, not that the input was invalid, so simply
return undefined in this case.
Change-Id: I13aafaba40723d4aa7c0f2e7f3eddfac86239cd0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
QV4::Function *f = QV4::EvalFunction::parseSource(d->m_v4Engine->current, fileName, program, QQmlJS::Codegen::EvalCode,
d->m_v4Engine->current->strictMode, true);
if (!f)
- return new QJSValuePrivate(d->m_v4Engine, d->m_v4Engine->newSyntaxErrorObject(QString()));
+ return QJSValue();
QV4::Value result = d->m_v4Engine->run(f);
return new QJSValuePrivate(d->m_v4Engine, result);