"Downgrading" JS engine back to JSC

65 views
Skip to first unread message

Ben Stock

unread,
May 16, 2012, 9:47:20 AM5/16/12
to Chromium-discuss
Hi guys,
I am looking into modifying parts of Chromium for a project. It
involves patching parts of the DOM implementation and also
corresponding parts in the JS engine. In order to lessen the
complexity I would like to go back to JSC instead of the highly-
optimized and complex V8. When grep'ing through the code I found ./
third_party/WebKit/Source/Platform/chromium/public/WebCommon.h which
appearantly defines whether to use JSC or V8. However, when compiling,
I get errors about missing wtf/*.h files.

If anyone could help, I'd appreciate it.

Cheers,
Ben

PhistucK

unread,
May 16, 2012, 9:50:52 AM5/16/12
to sqrt...@googlemail.com, Chromium-discuss
The JavaScriptCore edition of Chrome was unofficially supported for a very short while in 2008, but since then, no one is looking into it and it is apparently pretty broken in various ways.
In short, I believe it is not a trivial task.

PhistucK




--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-discuss

Anish Patankar

unread,
May 16, 2012, 11:50:01 AM5/16/12
to sqrt...@googlemail.com, Chromium-discuss
Just wondering why do you think JSC will be any less complex than V8.
If you are interested in DOM API then, that is just a binding. Mostly
auto generated from IDL.
I suppose JSC and V8 have similar API to implement DOM API.
You do not really need to go into implementation of JS engine.
-anish

Ben Stock

unread,
May 18, 2012, 5:25:52 AM5/18/12
to Anish Patankar, Chromium-discuss
As far as I gathered from colleagues, the optimizations in V8 make it more complex. I just believed them :-)

In essence, I want to be able to see changes to the DOM tree. If you can help me out: how does V8 change anything in the DOM tree? Using which API?

Cheers,
 Ben
2012/5/16 Anish Patankar <anis...@gmail.com>

Anish Patankar

unread,
May 18, 2012, 1:55:39 PM5/18/12
to Ben Stock, Chromium-discuss
WebCore has provided API to modify DOM tree.
There are V8 bindings which allows invocation of WebCore API from JavaScript.
Have a look at: chromium/src/out/Release/obj/gen/webcore/bindings/V8Document.cpp
This is auto generated from IDL file. all Getter/Setters are JS
attribute getter/setters and callbacks are JS methods e.g.
document.getElementById method is mapped to getElementByIdCallback,
which will eventually go to Document::getElementById.
Hope this helps.
best,
anish
Reply all
Reply to author
Forward
0 new messages