aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4argumentsobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-07-28 10:07:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-04 20:17:54 +0100
commit486948817b26da2c62802bb93a0f671715c609d4 (patch)
tree45cd51615a6d187ac504c18c4dee4aa31cf9a771 /src/qml/jsruntime/qv4argumentsobject.cpp
parent6f6b350976ccfe959223b1fbe8c21fe71efc45bd (diff)
Move the throw methods from ExecutionContext to ExecutionEngine
The methods don't require a context, and thus shouldn't be implemented there. Change-Id: If058e0c5067093a4161f2275ac4288aa2bc500f3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4argumentsobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4argumentsobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4argumentsobject.cpp b/src/qml/jsruntime/qv4argumentsobject.cpp
index 4af8927a2e..a83e20a4d3 100644
--- a/src/qml/jsruntime/qv4argumentsobject.cpp
+++ b/src/qml/jsruntime/qv4argumentsobject.cpp
@@ -134,7 +134,7 @@ bool ArgumentsObject::defineOwnProperty(ExecutionContext *ctx, uint index, const
}
if (ctx->d()->strictMode && !result)
- return ctx->throwTypeError();
+ return ctx->engine()->throwTypeError();
return result;
}
@@ -200,7 +200,7 @@ ReturnedValue ArgumentsGetterFunction::call(Managed *getter, CallData *callData)
Scoped<ArgumentsGetterFunction> g(scope, static_cast<ArgumentsGetterFunction *>(getter));
Scoped<ArgumentsObject> o(scope, callData->thisObject.as<ArgumentsObject>());
if (!o)
- return v4->currentContext()->throwTypeError();
+ return v4->throwTypeError();
Q_ASSERT(g->index() < static_cast<unsigned>(o->context()->d()->callData->argc));
return o->context()->argument(g->index());
@@ -215,7 +215,7 @@ ReturnedValue ArgumentsSetterFunction::call(Managed *setter, CallData *callData)
Scoped<ArgumentsSetterFunction> s(scope, static_cast<ArgumentsSetterFunction *>(setter));
Scoped<ArgumentsObject> o(scope, callData->thisObject.as<ArgumentsObject>());
if (!o)
- return v4->currentContext()->throwTypeError();
+ return v4->throwTypeError();
Q_ASSERT(s->index() < static_cast<unsigned>(o->context()->d()->callData->argc));
o->context()->d()->callData->args[s->index()] = callData->argc ? callData->args[0].asReturnedValue() : Encode::undefined();