[Webkit-unassigned] [Bug 125990] [GTK] Allow passing extra initialization data to web extensions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 19 07:07:48 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=125990





--- Comment #6 from Adrian Perez <aperez at igalia.com>  2013-12-19 07:05:51 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 219636 [details] [details])
> > So, what I understand from reading the API and the changelog is we are passing a GVariant with arbitrary initialization parameters for all extensions when we get a signal emission. I have a question and a suggestion:
> > 
> > Why do we need the signal for that, is it because of some architectural constraint/implementation difficulty? Can't we just set the data along with the path before the extensions are even loaded?
> 
> Being this a signal fixes two problems:
> 
>  - It allows you to set dynamic data, in case of multiple web processes you might want to set different data for each web process, like a unique id, for example. We might use that to make sure that the dbus names used by the web extensions are different.
> 
>  - It sets a place to initialize the web extensions directory (and this user_data).

Exactly. IMHO not having to warn in the documentation “do this before
$FOO happens” is a good thing: having the warning in the docs makes it
easy for developers to skip it, ot to have to do guesswork when they
have to decide when to call a certain function. If we provide a signal
there is an event that clearly points when.

> > I think it would be better to call this "initialization parameters" instead of extra data, so it's clearer what they are for. I thought at first that they would be something that can be sent at any point rather than just for initialization.
> 
> what about initialization_user_data? which is what wk2 uses internally?

I wasn't sure whether to let the name permeate to the public WebKitGTK API, 
but it is also true that “extra data“ or ”user data“ lacks clarity... Let's
go with “initialization user data” then.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list