From 13650a052f910dd42e9b7936f055e15588bdc3a9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 5 Apr 2013 23:45:15 +0200 Subject: Fix scope for functions created through bind() Change-Id: I69718b2943259dc0f6d6bf2856e651bfb4fbe3a5 Reviewed-by: Simon Hausmann --- src/v4/qv4functionobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v4/qv4functionobject.cpp b/src/v4/qv4functionobject.cpp index 91bff4177d..17b9824664 100644 --- a/src/v4/qv4functionobject.cpp +++ b/src/v4/qv4functionobject.cpp @@ -301,7 +301,7 @@ Value FunctionPrototype::method_bind(CallContext *ctx) boundArgs += ctx->argument(i); - BoundFunction *f = ctx->engine->newBoundFunction(ctx, target, boundThis, boundArgs); + BoundFunction *f = ctx->engine->newBoundFunction(ctx->engine->rootContext, target, boundThis, boundArgs); return Value::fromObject(f); } -- cgit v1.2.3