diff --git a/src/gresource/js/ThemeUtils.js b/src/gresource/js/ThemeUtils.js index 10fa3f1..e801a3e 100644 --- a/src/gresource/js/ThemeUtils.js +++ b/src/gresource/js/ThemeUtils.js @@ -30,7 +30,7 @@ /** * Provides various utility methods and can be used by greeter themes if needed. */ -class ThemeUtils extends __ThemeUtils { +class ThemeUtils { /** * Binds `this` to class, `context`, for all of the class's methods. * @@ -38,7 +38,7 @@ class ThemeUtils extends __ThemeUtils { * * @return {function(new:*): Object} `context` with `this` bound to it for all of its methods. */ - bind_this( context ) { + static bind_this( context ) { let excluded_methods = ['constructor']; function not_excluded( _method, _context ) { @@ -63,7 +63,8 @@ class ThemeUtils extends __ThemeUtils { } } -window.theme_utils = new ThemeUtils(); +window.theme_utils = new __ThemeUtils(); +window.theme_utils.bind_this = ThemeUtils.bind_this; /* -------->>> DEPRECATED! <<<-------- */ window.greeterutil = window.theme_utils; diff --git a/src/webkit2-extension.c b/src/webkit2-extension.c index 873aebc..1089973 100644 --- a/src/webkit2-extension.c +++ b/src/webkit2-extension.c @@ -1561,12 +1561,12 @@ static const JSClassDefinition config_file_definition = { }; static const JSClassDefinition theme_utils_definition = { - 0, /* Version */ - kJSClassAttributeNone, /* Attributes */ - "__ThemeUtils", /* Class name */ - NULL, /* Parent class */ - NULL, /* Static values */ - theme_utils_functions, /* Static functions */ + 0, /* Version */ + kJSClassAttributeNoAutomaticPrototype, /* Attributes */ + "__ThemeUtils", /* Class name */ + NULL, /* Parent class */ + NULL, /* Static values */ + theme_utils_functions, /* Static functions */ }; @@ -1580,7 +1580,6 @@ window_object_cleared_callback(WebKitScriptWorld *world, WebKitDOMDOMWindow *dom_window; WebKitDOMDocument *dom_document; - JSStringRef command; JSObjectRef gettext_object, lightdm_greeter_object, config_file_object,