[webkit-dev] webkit2 with v8

Balazs Kelemen kbalazs at webkit.org
Fri Jun 1 07:18:38 PDT 2012

On 05/31/2012 07:06 PM, Alexey Proskuryakov wrote:
> What I'm seeing is that parts of v8 support are already leaking into 
> cross-platform WebKit2 code. WebKitTestRunner cannot just 
> use WebCoreTestSupport, it needs an ifdef for Qt:
> DumpRenderTreeSupportQt::injectInternalsObject(context);
> #else
> WebCoreTestSupport::injectInternalsObject(context);
> #endif
> This is of course something non-Qt developers have to worry about, see 
> e.g. <https://bugs.webkit.org/show_bug.cgi?id=87783#c14>.

This one could be avoided with the shim (in 
https://bugs.webkit.org/show_bug.cgi?id=87872). We could introduce a 
file called WebKitTestSupportQt.cpp that implements 
injectInternalsObject(JSContextRef). It would unbox the v8 context from 
the wrapper and call the v8 version of 
WebCoreTestSupport::injectInternalsObject. So it's a bit complicated but 
at least there would be no ifdef needed in WebKitTestRunner.

> - WBR, Alexey Proskuryakov
> 31.05.2012, ? 9:38, Balazs Kelemen ???????(?):
>> I continued to work on this, more complete patches have been sent in 
>> https://bugs.webkit.org/show_bug.cgi?id=87872 and 
>> https://bugs.webkit.org/show_bug.cgi?id=84457. It's not because I 
>> don't understand your points, but it's better to debate on an actual 
>> patch that just theoretically :) I think most of what is needed in 
>> WebKit2 to support v8 is really just boilerplate code that should not 
>> change regularly.
>> On 04/24/2012 12:23 AM, Sam Weinig wrote:
>>> Without considerable more demand, I don't think we want this.
>>> -Sam
>>> On Apr 23, 2012, at 3:20 PM, Balazs Kelemen<kbalazs at webkit.org>  wrote:
>>>> On 04/23/2012 11:53 PM, Sam Weinig wrote:
>>>>> Hi Balazs,
>>>>> This is something we don't want at this time.  Dealing with V8 in WebCore is pretty big maintenance burden and one I would rather not have in WebKit2 unless there is considerable demand for it.
>>>> Well, it's important for Qt.
>>>>> In your patch (attached tohttps://bugs.webkit.org/show_bug.cgi?id=84457), there are many intrusive changes to core WebKit2 code, making it harder to comprehend and refactor.
>>>>> Also, since a much bigger proportion of developers who develop WebKit2 don't ever compile V8, it seems more likely that the code will stop working.
>>>> The WIP patch I uploaded is just a very first step to make it possible to build with v8
>>>> without breaking the most basic features. I have just overhacked every problematic part
>>>> - instead of finding a proper solution to them - to see how many dependencies there are
>>>> on JSC as quickly as possible. It should be way better before uploaded for review.
>>>>> -Sam
>>>>> On Apr 23, 2012, at 3:28 AM, Balazs Kelemen<kbalazs at webkit.org>   wrote:
>>>>>> Hi everyone,
>>>>>> I would like to inform you about the topic I am working on, since it is something
>>>>>> that can affect WebKit2 architecturally. I would like to make WebKit2 work with v8.
>>>>>> The motivation behind this is that the long term goal of the Qt port is to switch to v8.
>>>>>> Qt already use v8 in it's Qml module, and it's better to have only one VM in the framework
>>>>>> (less code size, less memory usage, easier maintenance).
>>>>>> My goal is to achieve this with the minimal amount of changes made in WebKit2. My plan
>>>>>> for WebKitTestRunner is to wrap v8 behind the JavaScriptCore API (or, in another point of
>>>>>> view, implement the JSC API upon the v8 API). For the core of WebKit2 we will have to use
>>>>>> some bindings for things like plugins or the injected bundle but it should be not too much of
>>>>>> a maintenance burden.
>>>>>> Inform me if you have any concerns or suggestion.
>>>>>> Cheers!
>>>>>> Balazs Kelemen
>>>>>> _______________________________________________
>>>>>> webkit-dev mailing list
>>>>>> webkit-dev at lists.webkit.org
>>>>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>>>> _______________________________________________
>>>> webkit-dev mailing list
>>>> webkit-dev at lists.webkit.org
>>>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>> _______________________________________________
>> webkit-dev mailing list
>> webkit-dev at lists.webkit.org <mailto: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/20120601/1b4777ad/attachment.html>

More information about the webkit-dev mailing list