diff options
author | portix <none@none> | 2012-11-22 22:36:16 +0100 |
---|---|---|
committer | portix <none@none> | 2012-11-22 22:36:16 +0100 |
commit | a018f961010258d20d174c53dcad2972f6d8a5ab (patch) | |
tree | ece787542ec3662d8905309fbc63f27babc5e7bc /src | |
parent | 85659e8488445ce7a9fd2c51c00cee1f2e848ce3 (diff) | |
download | dwb-a018f961010258d20d174c53dcad2972f6d8a5ab.zip |
Create context object for global_include
Diffstat (limited to 'src')
-rw-r--r-- | src/scripts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scripts.c b/src/scripts.c index 5d0aa418..81668260 100644 --- a/src/scripts.c +++ b/src/scripts.c @@ -888,7 +888,9 @@ global_include(JSContextRef ctx, JSObjectRef f, JSObjectRef thisObject, size_t a else { JSObjectRef function = JSObjectMakeFunction(ctx, NULL, 0, NULL, script, NULL, 0, exc); if (function != NULL) { - ret = JSObjectCallAsFunction(ctx, function, thisObject, 0, NULL, exc); + JSObjectRef this = JSObjectMake(ctx, NULL, NULL); + JSValueProtect(ctx, this); + ret = JSObjectCallAsFunction(ctx, function, this, 0, NULL, exc); } } JSStringRelease(script); |