aboutsummaryrefslogtreecommitdiffstats
path: root/src/xwidget.c
diff options
context:
space:
mode:
authorJoão Távora2018-06-09 15:49:04 +0100
committerJoão Távora2018-06-09 15:49:04 +0100
commit16a7bce700f4b90bd6b2d7ab4bb860a3c29cb764 (patch)
tree48b02e12d83195e21658476dfd56caa1af71c557 /src/xwidget.c
parent4aed7ee79cbea9963a84d5d925d39f7bc07aed98 (diff)
parent38111b5e98380c518aeb1bb7be52b7972a248332 (diff)
downloademacs-scratch/allow-custom-null-and-false-objects-in-jsonc.tar.gz
emacs-scratch/allow-custom-null-and-false-objects-in-jsonc.zip
Merge branch 'master' into this scratch branchscratch/allow-custom-null-and-false-objects-in-jsonc
scratch/allow-custom-null-and-false-objects-in-jsonc
Diffstat (limited to 'src/xwidget.c')
-rw-r--r--src/xwidget.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/xwidget.c b/src/xwidget.c
index 32022abf341..5f2651214e3 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -749,8 +749,10 @@ argument procedure FUN.*/)
749 /* JavaScript execution happens asynchronously. If an elisp 749 /* JavaScript execution happens asynchronously. If an elisp
750 callback function is provided we pass it to the C callback 750 callback function is provided we pass it to the C callback
751 procedure that retrieves the return value. */ 751 procedure that retrieves the return value. */
752 gchar *script_string
753 = XSAVE_POINTER (XCAR (AREF (xw->script_callbacks, idx)), 0);
752 webkit_web_view_run_javascript (WEBKIT_WEB_VIEW (xw->widget_osr), 754 webkit_web_view_run_javascript (WEBKIT_WEB_VIEW (xw->widget_osr),
753 XSAVE_POINTER (XCAR (AREF (xw->script_callbacks, idx)), 0), 755 script_string,
754 NULL, /* cancelable */ 756 NULL, /* cancelable */
755 webkit_javascript_finished_cb, 757 webkit_javascript_finished_cb,
756 (gpointer) idx); 758 (gpointer) idx);
@@ -1221,15 +1223,13 @@ kill_buffer_xwidgets (Lisp_Object buffer)
1221 gtk_widget_destroy (xw->widgetwindow_osr); 1223 gtk_widget_destroy (xw->widgetwindow_osr);
1222 } 1224 }
1223 if (!NILP (xw->script_callbacks)) 1225 if (!NILP (xw->script_callbacks))
1224 { 1226 for (ptrdiff_t idx = 0; idx < ASIZE (xw->script_callbacks); idx++)
1225 ptrdiff_t idx; 1227 {
1226 for (idx = 0; idx < ASIZE (xw->script_callbacks); idx++) 1228 Lisp_Object cb = AREF (xw->script_callbacks, idx);
1227 { 1229 if (!NILP (cb))
1228 if (!NILP (AREF (xw->script_callbacks, idx))) 1230 xfree (XSAVE_POINTER (XCAR (cb), 0));
1229 xfree (XSAVE_POINTER (XCAR (AREF (xw->script_callbacks, idx)), 0)); 1231 ASET (xw->script_callbacks, idx, Qnil);
1230 ASET (xw->script_callbacks, idx, Qnil); 1232 }
1231 }
1232 }
1233 } 1233 }
1234 } 1234 }
1235} 1235}