projects
/
platform
/
upstream
/
qtdeclarative.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
944af86
)
Correctly set the strict mode flag when calling eval()
author
Lars Knoll
<lars.knoll@digia.com>
Tue, 4 Dec 2012 19:02:26 +0000
(11:02 -0800)
committer
Simon Hausmann
<simon.hausmann@digia.com>
Tue, 4 Dec 2012 19:09:28 +0000
(20:09 +0100)
Change-Id: I677eea907a3b79373c0784c1496ed97f0f5ee6f6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
qmljs_objects.cpp
patch
|
blob
|
history
diff --git
a/qmljs_objects.cpp
b/qmljs_objects.cpp
index
f12999b
..
12cc447
100644
(file)
--- a/
qmljs_objects.cpp
+++ b/
qmljs_objects.cpp
@@
-508,8
+508,14
@@
Value EvalFunction::call(ExecutionContext *context, Value /*thisObject*/, Value
ctx = context;
}
+ // set the correct strict mode flag on the context
+ bool cstrict = ctx->strictMode;
+ ctx->strictMode = strict;
+
Value result = f->code(ctx, f->codeData);
+ ctx->strictMode = cstrict;
+
if (strict)
ctx->leaveCallContext();