Skip to content

Commit ce9cfb2

Browse files
pgorszkowski-igaliamagomez
authored andcommitted
Add webkit_web_context_garbage_collect_javascript_objects method
1 parent b9550c2 commit ce9cfb2

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,6 +2028,21 @@ const gchar* webkit_web_context_get_time_zone_override(WebKitWebContext* context
20282028
return context->priv->timeZoneOverride.data();
20292029
}
20302030

2031+
/**
2032+
* webkit_web_context_garbage_collect_javascript_objects:
2033+
* @context: the #WebKitWebContext
2034+
*
2035+
* Requests a garbage collection of the javascript objects to all processes.
2036+
*
2037+
* Since: 2.28
2038+
*/
2039+
void webkit_web_context_garbage_collect_javascript_objects(WebKitWebContext* context)
2040+
{
2041+
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
2042+
2043+
context->priv->processPool->garbageCollectJavaScriptObjects();
2044+
}
2045+
20312046
void webkitWebContextInitializeNotificationPermissions(WebKitWebContext* context)
20322047
{
20332048
g_signal_emit(context, signals[INITIALIZE_NOTIFICATION_PERMISSIONS], 0);

Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@ webkit_web_context_get_use_system_appearance_for_scrollbars (WebKitWebContext
425425
WEBKIT_API const gchar*
426426
webkit_web_context_get_time_zone_override (WebKitWebContext *context);
427427

428+
WEBKIT_API void
429+
webkit_web_context_garbage_collect_javascript_objects
430+
(WebKitWebContext *context);
431+
428432
G_END_DECLS
429433

430434
#endif

0 commit comments

Comments
 (0)