aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4functionobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 7ef0b96f17..305efba1d6 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -450,9 +450,8 @@ ReturnedValue ScriptFunction::construct(Managed *that, CallData *callData)
SAVE_JS_STACK(f->scope);
try {
result = f->function->code(ctx, f->function->codeData);
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
CHECK_JS_STACK(f->scope);
ctx->engine->popContext();
@@ -482,9 +481,8 @@ ReturnedValue ScriptFunction::call(Managed *that, CallData *callData)
SAVE_JS_STACK(f->scope);
try {
result = f->function->code(ctx, f->function->codeData);
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
CHECK_JS_STACK(f->scope);
ctx->engine->popContext();
@@ -553,9 +551,8 @@ ReturnedValue SimpleScriptFunction::construct(Managed *that, CallData *callData)
if (!result)
return obj.asReturnedValue();
return result.asReturnedValue();
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
}
@@ -581,9 +578,8 @@ ReturnedValue SimpleScriptFunction::call(Managed *that, CallData *callData)
SAVE_JS_STACK(f->scope);
try {
result = f->function->code(ctx, f->function->codeData);
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
CHECK_JS_STACK(f->scope);
ctx->engine->popContext();
@@ -625,9 +621,8 @@ ReturnedValue BuiltinFunction::call(Managed *that, CallData *callData)
ScopedValue result(scope);
try {
result = f->code(&ctx);
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
context->engine->popContext();
@@ -650,9 +645,8 @@ ReturnedValue IndexedBuiltinFunction::call(Managed *that, CallData *callData)
ScopedValue result(scope);
try {
result = f->code(&ctx, f->index);
- } catch (Exception &ex) {
- ex.partiallyUnwindContext(context);
- throw;
+ } catch (...) {
+ context->rethrowException();
}
context->engine->popContext();