[webkit-dev] Getting at Settings object from WorkerContext

Jeremy Orlow jorlow at chromium.org
Thu Jan 6 10:24:37 PST 2011


The RuntimeEnabledFeatures class [1] seems like what you're looking for.

J

[1]
http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/WebKit/WebCore/bindings/generic/RuntimeEnabledFeatures.h&q=RuntimeFeature&exact_package=chromium&d=6

On Thu, Jan 6, 2011 at 6:05 PM, Joe Mason <jmason at rim.com> wrote:

> I'm trying to add a setting to enable/disable WebSockets at runtime (so
> that the browser can make websockets available as a user preference, for
> instance).  It's easy to add a flag to Settings, and check it from
> JSDOMWindowCustom::webSocket to return undefined for the websocket object
> when it's disabled.  But you can also get a websocket object from a worker,
> with JSWorkerContext::webSocket.  And since there's no frame or page
> associated here, there's no way to get a Settings object.
>
> Is it possible to get a Settings object from a WorkerContext?
>
> If not, I think I need to make the setting a static on the Settings object.
>  There's precedent for this in setMinDOMTimerInterval and
> setShouldUseHighResolutionTimer, but it doesn't feel right for a high-level
> feature like this.
>
> Joe
>
> ---------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute non-public
> information. Any use of this information by anyone other than the intended
> recipient is prohibited. If you have received this transmission in error,
> please immediately reply to the sender and delete this information from your
> system. Use, dissemination, distribution, or reproduction of this
> transmission by unintended recipients is not authorized and may be unlawful.
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110106/e469d671/attachment.html>


More information about the webkit-dev mailing list