[Webkit-unassigned] [Bug 186431] [GTK] Crash when calling JSEvaluateScript and a JS exception is thrown

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 8 08:51:25 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=186431

--- Comment #2 from Michael Gratton <mike at vee.net> ---
Yep, point taken, and I'll get that to you.

But note the second case (segfault when exception = null) isn't a crash in free, and indeed the generated C there is no call free being made:

static JSValueRef*
geary_web_extension_execute_script (GearyWebExtension* self,
                                    JSContextRef context,
                                    const gchar* script,
                                    gint line,
                                    GError** error)
{
        JSValueRef* result = NULL;
        JSStringRef js_script = {0};
        JSStringRef _tmp0_;
        JSStringRef js_source = {0};
        JSStringRef _tmp1_;
        JSValueRef ret = {0};
        JSValueRef _tmp2_;
        JSValueRef* _tmp3_;
        g_return_val_if_fail (self != NULL, NULL);
        g_return_val_if_fail (script != NULL, NULL);
        _tmp0_ = JSStringCreateWithUTF8CString (script);
        js_script = _tmp0_;
        _tmp1_ = JSStringCreateWithUTF8CString ("__FILE__");
        js_source = _tmp1_;
        _tmp2_ = JSEvaluateScript (context, js_script, NULL, &js_source, line, NULL);
        ret = _tmp2_;
        JSStringRelease (js_script);
        JSStringRelease (js_source);
        _tmp3_ = __JS_value_dup0 (&ret);
        result = _tmp3_;
        return result;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180608/6787de06/attachment-0001.html>


More information about the webkit-unassigned mailing list