[webkit-dev] Qtish API for JavaScriptCore

Oliver Hunt oliver at apple.com
Wed Aug 26 14:04:29 PDT 2009


Hi Simon,
     It would really be preferred if the Qt API were just built on top  
of the standard JSC C-API, and was kept external from the repository.   
Currently the JavaScriptoCore API is completely platform and library  
independent except for the one somewhat unfortunate API referring to  
CoreFoundation but that's only exposed in the umbrella  
JavaScriptCore.h header, the JavaScript.h header is clean of any  
platform dependency.

The C API that exists already has guaranteed API and ABI  
compatibility, and this is already proving to be difficult (and in  
some cases a hindrance) to maintain as we strive to improve JSC  
performance.  Adding an additional API would simply serve to make this  
task even more complex and difficult, and would have no benefit to the  
project while carrying substantial cost moving forward.  A further  
issue is that any API that binds directly to JSC internals  
realistically needs to be developed by the engineers working on the  
core engine as a developing such an API needs enormous care to not  
cause harmful long term problems.

Over time we have added new functionality to the C-API as the need  
developed, so if there is specific functionality the Qt API would  
depend on we would be open to any suggestions.

--Oliver

On Aug 26, 2009, at 1:12 PM, Simon Hausmann wrote:

> Hi fellow WebKit contributors!
>
> Currently the Qt port of WebKit merely provides an API to deal with  
> rendering
> web content, and as such our interface to the underlying  
> JavaScriptCore engine
> is minimal.
>
> We, the team of Qt developers at Nokia and INdT, would like to add a  
> C++ Qt
> API to JavaScriptCore as well, to allow application developers to  
> for example
> embed the JavaScriptCore engine into their applications.
>
> We want to give developers the ability to introspect the  
> environment, inject
> custom classes and call functions using a C++ API that uses Qt types  
> and has a
> Qt-ish feel to it. Current releases of Qt come with such an API as  
> part of the
> QtScript module, which however is based on an in-house developed  
> interpreter.
>
> So we decided to combine the well-tested API with a much better  
> engine and
> spent the past few months making QtScript merely another API for
> JavaScriptCore, with only minimal changes.
>
> We would like to contribute this API to the WebKit project, actively  
> develop
> it there and therefore ask the community for opinions, thoughts or  
> objections.
>
> The API itself consists of 12 public classes. An introduction and
> overview as well as the detailed class documentation can be found at
>
>        http://doc.qt.nokia.com/4.6-snapshot/scripting.html
>
> which is based on the unchanged API on top of the old engine.
>
> If the community agrees, we would like to begin the process of
> contribution in Bugzilla with patches for review that populate a
> sub-folder in JavaScriptCore, for example JavaScriptCore/qt or
> JavaScriptCore/API/qt.
>
>
> On behalf of the Qt developers,
> Simon
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



More information about the webkit-dev mailing list