Bug 76778

Summary: [Qt] Make it possible to build WebKit2 with V8
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: New BugsAssignee: Simon Hausmann <hausmann>
Status: RESOLVED WONTFIX    
Severity: Normal CC: ap, kbalazs, ossy, pvarga, sam
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 83322, 84457, 87872    
Bug Blocks: 76773    

Description Simon Hausmann 2012-01-20 23:39:50 PST
This may be ambitious, but it would be great if it was possible to build WebKit2 with V8.
The main issue AFAICS is the fact that the JSC C API is used in some APIs used by WTR
as well as for the script value serialization for evaluating JavaScript.

We need to discuss the approach for WTR in the community. One possibility would be to use
NPAPI as the interface to implement LayoutTestController and friends, similarly to Chromium's
DRT.
Comment 1 Balazs Kelemen 2012-03-28 00:42:36 PDT
What about the v8 bindings? Aren't they sufficient for WTR?
Comment 2 Simon Hausmann 2012-03-29 07:47:23 PDT
(In reply to comment #1)
> What about the v8 bindings? Aren't they sufficient for WTR?

WTR currently uses a generator that produces binding code from IDL files that uses the public JSC C API. There's "glue" code in WTR itself that combines the generated code with the actual implementations of the IDL functions and the passing of messages to the UI process, which uses the JSC C API. It would be good to re-use all of that code without introducing what is essentially a second V8 based bundle for WTR.

OTOH perhaps it is not so much effort to provide a second V8 based bundle, perhaps it is less of an effort.
Comment 3 Balazs Kelemen 2012-04-20 08:59:01 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > What about the v8 bindings? Aren't they sufficient for WTR?
> 
> WTR currently uses a generator that produces binding code from IDL files that uses the public JSC C API. There's "glue" code in WTR itself that combines the generated code with the actual implementations of the IDL functions and the passing of messages to the UI process, which uses the JSC C API. It would be good to re-use all of that code without introducing what is essentially a second V8 based bundle for WTR.
> 
> OTOH perhaps it is not so much effort to provide a second V8 based bundle, perhaps it is less of an effort.

I think the core of WebKit2 and WTR is two different story. WebKit2 use some internals of JSC such as WebCore. I think there is no good way to abstract these into a wrapper level but we would have to use bindings as in WebCore. For WTR it could be possible to wrap v8 with a JSC-like API. I created a sub-bug for introducing v8 into the core of WebKit2: #84457.
Comment 4 Alexey Proskuryakov 2012-05-31 08:49:39 PDT
This project has not been accepted per webkit-dev discussion. Shouldn't the bug be marked WONTFIX?
Comment 5 Alexey Proskuryakov 2012-06-05 00:01:08 PDT
WONTFIX per complete lack of buy-in on webkit-dev.