Bug 187515

Summary: [GLIB] Add jsc_context_get_global_object() to GLib API
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, calvaris, ews-watchlist, keith_miller, mark.lam, mcatanzaro, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: Gtk, InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mcatanzaro: review+

Description Carlos Garcia Campos 2018-07-10 04:04:30 PDT
This isn't exposed because we have convenient methods in JSCContext to get and set properties on the global object. However, getting the global object could be useful in some cases, for example to give it a well known name like 'window' in browsers and GJS.
Comment 1 Carlos Garcia Campos 2018-07-10 04:06:37 PDT
Created attachment 344687 [details]
Patch
Comment 2 Michael Catanzaro 2018-07-10 06:13:30 PDT
Comment on attachment 344687 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=344687&action=review

> Source/JavaScriptCore/ChangeLog:10
> +        This wasn't exposed because we have convenient methods in JSCContext to get and set properties on the global
> +        object. However, getting the global object could be useful in some cases, for example to give it a well known
> +        name like 'window' in browsers and GJS.

What specifically are you planning to use it for?

Surely it's not required to give it the name "window" in Epiphany?
Comment 3 Carlos Garcia Campos 2018-07-11 22:14:11 PDT
Committed r233759: <https://trac.webkit.org/changeset/233759>
Comment 4 Radar WebKit Bug Importer 2018-07-11 22:18:01 PDT
<rdar://problem/42104161>