Hmm. It might still be v8-only, though I'm surprised since the class was moved from the v8 directory to generic. If that's the case, then I suppose it'll need to be ported to JSC.
J On Thu, Jan 6, 2011 at 7:24 PM, Joe Mason <[email protected]> wrote: > Hmm, I can’t get the RuntimeEnabledFeatures class working. > > > > bool RuntimeEnabledFeatures::webSocketEnabled() > > { > > return WebSocket::isAvailable(); > > } > > > > So it looks from that like I should just be able to call > WebSocket::setIsAvailable(false), and then websockets would automatically > drop out. But when I tried that (and I’ve verified that nothings setting it > to true behind my back), JSDOMWindow::webSocket still gets called and > returns the socket prototype. I can’t seem to find any code that calls > webSocketEnabled. > > > > I notice that RuntimeEnabledFeatures is referenced in CodeGeneratorV8.pm, > but not any other code generator. Is this a V8-only thing? > > > > Joe > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Joe Mason > *Sent:* Thursday, January 06, 2011 1:52 PM > *To:* Jeremy Orlow > > *Cc:* webkit-dev Development > *Subject:* Re: [webkit-dev] Getting at Settings object from WorkerContext > > > > Aha, there is already a “websocketsEnabled” method there! Thanks, that’s > perfect. > > > > *From:* [email protected] [mailto:[email protected]] *On Behalf Of *Jeremy > Orlow > *Sent:* Thursday, January 06, 2011 1:25 PM > *To:* Joe Mason > *Cc:* webkit-dev Development > *Subject:* Re: [webkit-dev] Getting at Settings object from WorkerContext > > > > 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 <[email protected]> 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 > [email protected] > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > > > --------------------------------------------------------------------- > 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. > > --------------------------------------------------------------------- > 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 [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

