Skip to content

Commit 1dd3034

Browse files
[API] Add webkit_web_context_garbage_collect_javascript_objects method
1 parent 3fd2ed5 commit 1dd3034

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
@@ -1996,6 +1996,21 @@ const gchar* webkit_web_context_get_time_zone_override(WebKitWebContext* context
19961996
return context->priv->timeZoneOverride.data();
19971997
}
19981998

1999+
/**
2000+
* webkit_web_context_garbage_collect_javascript_objects:
2001+
* @context: the #WebKitWebContext
2002+
*
2003+
* Requests a garbage collection of the javascript objects to all processes.
2004+
*
2005+
* Since: 2.28
2006+
*/
2007+
void webkit_web_context_garbage_collect_javascript_objects(WebKitWebContext* context)
2008+
{
2009+
g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
2010+
2011+
context->priv->processPool->garbageCollectJavaScriptObjects();
2012+
}
2013+
19992014
void webkitWebContextInitializeNotificationPermissions(WebKitWebContext* context)
20002015
{
20012016
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
@@ -422,6 +422,10 @@ webkit_web_context_get_use_system_appearance_for_scrollbars (WebKitWebContext
422422
WEBKIT_API const gchar*
423423
webkit_web_context_get_time_zone_override (WebKitWebContext *context);
424424

425+
WEBKIT_API void
426+
webkit_web_context_garbage_collect_javascript_objects
427+
(WebKitWebContext *context);
428+
425429
G_END_DECLS
426430

427431
#endif

0 commit comments

Comments
 (0)