Skip to content

Commit 9dca152

Browse files
pgorszkowski-igaliaspenap
authored andcommitted
Add webkit_web_context_garbage_collect_javascript_objects method
1 parent 6ffed06 commit 9dca152

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
@@ -2021,6 +2021,21 @@ const gchar* webkit_web_context_get_time_zone_override(WebKitWebContext* context
20212021
return context->priv->timeZoneOverride.data();
20222022
}
20232023

2024+
/**
2025+
* webkit_web_context_garbage_collect_javascript_objects:
2026+
* @context: the #WebKitWebContext
2027+
*
2028+
* Requests a garbage collection of the javascript objects to all processes.
2029+
*
2030+
* Since: 2.28
2031+
*/
2032+
void webkit_web_context_garbage_collect_javascript_objects(WebKitWebContext* context)
2033+
{
2034+
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
2035+
2036+
context->priv->processPool->garbageCollectJavaScriptObjects();
2037+
}
2038+
20242039
void webkitWebContextInitializeNotificationPermissions(WebKitWebContext* context)
20252040
{
20262041
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)