Sunday, March 7, 2010

Hacking V8 JavaScript engine

As many of you know, V8 is JavaScript engine for Chrome.
As every V8 embedder knows, V8 engine can not have several instances in process, or, more specifically, there could be no more than one JavaScript execution thread in the process in every moment of the time. With wider use of JavaScript as serverside language, the V8 limitation (fine for process per tab browser scenario) seems to be unfortunate, given amount of work put to V8 to have JavaScript code executed blazingly fast.
Using latest CppTools plugin version and some spare time I was managed to patch V8 to have ability to run several V8 instances in process. I will use this codebase for demonstrating configuration / usage of the c++ plugin for mentioned pretty large task.

No comments: