[Webkit-unassigned] [Bug 188742] New: [GLIB] Expose JavaScriptCore options in GLib public API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 20 05:09:53 PDT 2018


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

            Bug ID: 188742
           Summary: [GLIB] Expose JavaScriptCore options in GLib public
                    API
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org, mcatanzaro at igalia.com,
                    yusukesuzuki at slowstart.org

I think it would be useful to expose the JSC options in the API. Right now it's possible to change them using the env vars, but it would be better to provide some API. To ensure API/ABI stability we could use a common interface to set the options, that receive the option string identifier and the value, similar to the GtkPrintSettings API, for example. Main problem is that users don't know the options available, so we could provide names for the most important options, like we do in WebKit2 API with editing commands. We could also include API to get information about the options available (name, value type, default value and description). Applications could use that to create command line options to set them, for example.

JSCOptions* jsc_options_get (void); // Get the singleton instance
gboolean jsc_options_set_string (JSCOptions* options, const char* option, const char* value);
char* jsc_options_get_string (JSCOptions* options, const char* option);
gboolean jsc_options_set_int (JSCOptions* options, const char* option, gint value);
int jsc_options_get_int (JSCOptions* options, const char* option);
......
typedef gboolean (* JSCOptionsFunc) (JSCOptions* options, const char* option, GType type, GValue* default_value, const char* description, gpointer user_data);
void jsc_options_foreach (JSCOptions* options, JSCOptionsFunc function, gpointer user_data);

/**
 * JSC_OPTION_USE_JIT:
 *
 * Allows the executable pages to be allocated for JIT and thunks if %TRUE.
 * Type: %G_TYPE_BOOLEAN
 * Default: %TRUE
 */
#define JSC_OPTION_USE_JIT "useJIT"

It would be something like that.

-- 
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/20180820/a6d8c40b/attachment.html>


More information about the webkit-unassigned mailing list