diff options
Diffstat (limited to 'src/qml/qml/v8/qqmlbuiltinfunctions.cpp')
-rw-r--r-- | src/qml/qml/v8/qqmlbuiltinfunctions.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 9d8498f6ed..8fc048b5f3 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -1326,8 +1326,8 @@ void Heap::QQmlBindingFunction::init(const QV4::FunctionObject *originalFunction QQmlSourceLocation QQmlBindingFunction::currentLocation() const { - QV4::StackFrame frame = engine()->currentStackFrame(); - return QQmlSourceLocation(frame.source, frame.line, 0); + QV4::StackFrame *frame = engine()->currentStackFrame; + return QQmlSourceLocation(frame->source(), frame->line, 0); } DEFINE_OBJECT_VTABLE(QQmlBindingFunction); @@ -1475,13 +1475,13 @@ static QString jsStack(QV4::ExecutionEngine *engine) { QString stackFrame; if (frame.column >= 0) - stackFrame = QStringLiteral("%1 (%2:%3:%4)").arg(frame.function, - frame.source, + stackFrame = QStringLiteral("%1 (%2:%3:%4)").arg(frame.function(), + frame.source(), QString::number(frame.line), QString::number(frame.column)); else - stackFrame = QStringLiteral("%1 (%2:%3)").arg(frame.function, - frame.source, + stackFrame = QStringLiteral("%1 (%2:%3)").arg(frame.function(), + frame.source(), QString::number(frame.line)); if (i) @@ -1530,10 +1530,10 @@ static void writeToConsole(const BuiltinFunction *, Scope &scope, CallData *call if (!loggingCategory) loggingCategory = v4->qmlEngine() ? &qmlLoggingCategory : &jsLoggingCategory; - QV4::StackFrame frame = v4->currentStackFrame(); - const QByteArray baSource = frame.source.toUtf8(); - const QByteArray baFunction = frame.function.toUtf8(); - QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData(), loggingCategory->categoryName()); + QV4::StackFrame *frame = v4->currentStackFrame; + const QByteArray baSource = frame->source().toUtf8(); + const QByteArray baFunction = frame->function().toUtf8(); + QMessageLogger logger(baSource.constData(), frame->line, baFunction.constData(), loggingCategory->categoryName()); switch (logType) { case Log: @@ -1583,10 +1583,10 @@ void ConsoleObject::method_profile(const BuiltinFunction *, Scope &scope, CallDa { QV4::ExecutionEngine *v4 = scope.engine; - QV4::StackFrame frame = v4->currentStackFrame(); - const QByteArray baSource = frame.source.toUtf8(); - const QByteArray baFunction = frame.function.toUtf8(); - QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); + QV4::StackFrame *frame = v4->currentStackFrame; + const QByteArray baSource = frame->source().toUtf8(); + const QByteArray baFunction = frame->function().toUtf8(); + QMessageLogger logger(baSource.constData(), frame->line, baFunction.constData()); QQmlProfilerService *service = QQmlDebugConnector::service<QQmlProfilerService>(); if (!service) { logger.warning("Cannot start profiling because debug service is disabled. Start with -qmljsdebugger=port:XXXXX."); @@ -1602,10 +1602,10 @@ void ConsoleObject::method_profileEnd(const BuiltinFunction *, Scope &scope, Cal { QV4::ExecutionEngine *v4 = scope.engine; - QV4::StackFrame frame = v4->currentStackFrame(); - const QByteArray baSource = frame.source.toUtf8(); - const QByteArray baFunction = frame.function.toUtf8(); - QMessageLogger logger(baSource.constData(), frame.line, baFunction.constData()); + QV4::StackFrame *frame = v4->currentStackFrame; + const QByteArray baSource = frame->source().toUtf8(); + const QByteArray baFunction = frame->function().toUtf8(); + QMessageLogger logger(baSource.constData(), frame->line, baFunction.constData()); QQmlProfilerService *service = QQmlDebugConnector::service<QQmlProfilerService>(); if (!service) { @@ -1656,15 +1656,15 @@ void ConsoleObject::method_count(const BuiltinFunction *, Scope &scope, CallData QV4::ExecutionEngine *v4 = scope.engine; QV8Engine *v8engine = scope.engine->v8Engine; - QV4::StackFrame frame = v4->currentStackFrame(); + QV4::StackFrame *frame = v4->currentStackFrame; - QString scriptName = frame.source; + QString scriptName = frame->source(); - int value = v8engine->consoleCountHelper(scriptName, frame.line, frame.column); + int value = v8engine->consoleCountHelper(scriptName, frame->line, frame->column); QString message = name + QLatin1String(": ") + QString::number(value); - QMessageLogger(qPrintable(scriptName), frame.line, - qPrintable(frame.function)) + QMessageLogger(qPrintable(scriptName), frame->line, + qPrintable(frame->function())) .debug("%s", qPrintable(message)); scope.result = QV4::Encode::undefined(); @@ -1679,9 +1679,9 @@ void ConsoleObject::method_trace(const BuiltinFunction *, Scope &scope, CallData QString stack = jsStack(v4); - QV4::StackFrame frame = v4->currentStackFrame(); - QMessageLogger(frame.source.toUtf8().constData(), frame.line, - frame.function.toUtf8().constData()) + QV4::StackFrame *frame = v4->currentStackFrame; + QMessageLogger(frame->source().toUtf8().constData(), frame->line, + frame->function().toUtf8().constData()) .debug("%s", qPrintable(stack)); scope.result = QV4::Encode::undefined(); @@ -1710,9 +1710,9 @@ void ConsoleObject::method_assert(const BuiltinFunction *, Scope &scope, CallDat QString stack = jsStack(v4); - QV4::StackFrame frame = v4->currentStackFrame(); - QMessageLogger(frame.source.toUtf8().constData(), frame.line, - frame.function.toUtf8().constData()) + QV4::StackFrame *frame = v4->currentStackFrame; + QMessageLogger(frame->source().toUtf8().constData(), frame->line, + frame->function().toUtf8().constData()) .critical("%s\n%s",qPrintable(message), qPrintable(stack)); } |