diff options
author | portix <portix@gmx.net> | 2012-03-19 12:30:39 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-03-19 12:30:39 +0100 |
commit | 0b9d58b9e1168828e26deba5c643eb8a84805f1c (patch) | |
tree | e9ba724ec11756453796409f9350906163f5702e /src/js.c | |
parent | ac5731ab3a4e659230427500cc12f0395e2a510c (diff) | |
download | dwb-0b9d58b9e1168828e26deba5c643eb8a84805f1c.zip |
Rename name -> js_name and release js_name in js_call_as_function
Diffstat (limited to 'src/js.c')
-rw-r--r-- | src/js.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -120,19 +120,19 @@ js_call_as_function(WebKitWebFrame *frame, JSObjectRef obj, char *string, char * char *ret = NULL; JSValueRef js_ret, function, v = NULL; JSObjectRef function_object; - JSStringRef js_json, name; + JSStringRef js_json, js_name; JSContextRef ctx; if (obj == NULL) goto error_out; ctx = webkit_web_frame_get_global_context(frame); - name = JSStringCreateWithUTF8CString(string); + js_name = JSStringCreateWithUTF8CString(string); - if (!JSObjectHasProperty(ctx, obj, name)) { + if (!JSObjectHasProperty(ctx, obj, js_name)) { goto error_out; } - function = JSObjectGetProperty(ctx, obj, name, NULL); + function = JSObjectGetProperty(ctx, obj, js_name, NULL); function_object = JSValueToObject(ctx, function, NULL); if (json != NULL) { js_json = JSStringCreateWithUTF8CString(json); @@ -150,6 +150,7 @@ js_call_as_function(WebKitWebFrame *frame, JSObjectRef obj, char *string, char * ret = js_value_to_char(ctx, js_ret); } error_out: + JSStringRelease(js_name); if (char_ret != NULL) *char_ret = ret; return ret; |