Search code examples
javascriptmacosgoogle-chromev8chromium

How to replace V8 library for Chromium in OSX?


I am modifying V8 JavaScript engine, and planning to replace the existing one with the modified V8 library for Chromium. I was able to do in Ubuntu as the library file, libv8.so, was located at /usr/lib/chromium-browser/libs. All I had to do was finding the version of V8 compatible with the version of Chromium installed, downloading and modifying the source code of V8, and replacing the library file. I searched the entire file system for "libv8.*", but couldn't find any in my mac. I don't want to build the entire Chromium which takes too much time and disk space.


Solution

  • Your Chromium in Ubuntu is built with component build (http://www.chromium.org/developers/how-tos/component-build), so the v8 component is built to libv8.so and can be replaced directly.

    I guess your Chromium in mac does not use component build, all components are built into a single Chromium Framework, so there is no libv8.dylib to be replaced.