diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2014-07-28 10:07:57 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-11-04 20:17:54 +0100 |
| commit | 486948817b26da2c62802bb93a0f671715c609d4 (patch) | |
| tree | 45cd51615a6d187ac504c18c4dee4aa31cf9a771 /src/qml/jsruntime/qv4stringobject.cpp | |
| parent | 6f6b350976ccfe959223b1fbe8c21fe71efc45bd (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/qv4stringobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index 397a6efdf8..0591a05b37 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -109,13 +109,13 @@ bool StringObject::deleteIndexedProperty(Managed *m, uint index) Scope scope(v4); Scoped<StringObject> o(scope, m->asStringObject()); if (!o) { - v4->currentContext()->throwTypeError(); + v4->throwTypeError(); return false; } if (index < static_cast<uint>(o->d()->value.stringValue()->toQString().length())) { if (v4->currentContext()->d()->strictMode) - v4->currentContext()->throwTypeError(); + v4->throwTypeError(); return false; } return true; @@ -230,7 +230,7 @@ static QString getThisString(ExecutionContext *ctx) if (StringObject *thisString = t->asStringObject()) return thisString->d()->value.stringValue()->toQString(); if (t->isUndefined() || t->isNull()) { - ctx->throwTypeError(); + ctx->engine()->throwTypeError(); return QString(); } return t->toQString(); @@ -243,7 +243,7 @@ ReturnedValue StringPrototype::method_toString(CallContext *context) StringObject *o = context->d()->callData->thisObject.asStringObject(); if (!o) - return context->throwTypeError(); + return context->engine()->throwTypeError(); return o->d()->value.asReturnedValue(); } @@ -365,7 +365,7 @@ ReturnedValue StringPrototype::method_localeCompare(CallContext *context) ReturnedValue StringPrototype::method_match(CallContext *context) { if (context->d()->callData->thisObject.isUndefined() || context->d()->callData->thisObject.isNull()) - return context->throwTypeError(); + return context->engine()->throwTypeError(); Scope scope(context); ScopedString s(scope, context->d()->callData->thisObject.toString(context)); @@ -380,7 +380,7 @@ ReturnedValue StringPrototype::method_match(CallContext *context) if (!rx) // ### CHECK - return context->throwTypeError(); + return context->engine()->throwTypeError(); bool global = rx->global(); |
