Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
Chromium=83.0.4103.97
V8=8.3.110.9
We now have two branches. One is master which only contains the instrumented files.
The other is dev which is an orphan branch of Chromium version stated at the beginning.
The structure of the master is as below. The ./src directory is exactly the same
structure of path/to/chromium/src but only has instrumented files.
.
|-- src/
|-- utils/
We don't keep the git history of Chromium in this branch, so we need a procedure to work with this branch, AKA, the working branch.
- Fetch the Chromium code by following the instruction.
- Checkout to the correct version by
git checkout tags/83.0.4103.97and rungclient sync -Dafterwards. - Then add one more remote to Chromium's repo by
git remote add github git@github.com:jallen89/JSCapsule.git. - Do a
git fetch github devto get the information of the added repo. - Now you can checkout to the
devbranch by doinggit checkout -b dev github/dev. - When you need to pull/push changes, remember to do
git pull/push dev github/dev. - If you want to work in a different branch, just branch from the
github/dev. When you finish the work, please submit a Pull Request and merge the changes intogithub/dev.
It's important that every time you need to run gclient sync -D in tags/83.0.4103.97 when you switch to other Chromium tags or master
-
The log now writes to file.
chromium/src/out/[Debug|Release|Default]/path/to/chromium --no-sandbox --forensic-log-file=/path/to/logfileto start recording./path/to/logfileshould be accessible from chromium. If--forensic-log-fileis not provided, it writes to/tmp/jscapsule.logby default. -
JSCapsule cannot be compiled using component builds. You need to update the
args.gnfile to disable component builds. Inargs.gnsetis_component_build=false.
The script record.sh is used for recording a website:
./record.sh https://www.example.com example
This would record https://www.example.com (NOTE: always used the entire URL) and store the logs in example<pid>.
To replay a website, open two terminals.
In the first terminal, run the following command:
./replay.sh example.replay &> example.logs
In the second terminal, run the following command in the forensic_utils directory:
./run.py load-logs ../example<pid>
NOTE: If the recording used multiple process (e.g., multiple tabs or iframes in w/ different origins), you will need to run the following command
./run.py load-logs --merge ../example<pid>*
