servo/docs/COMMAND_LINE_ARGS.md
author Andrew Osmond <aosmond@mozilla.com>
Mon, 11 Sep 2017 08:39:30 -0400
changeset 424048 0b5841c7c3992c2c0a43cb77b51b3fd04b63b7d6
parent 387677 c2f4d8b69064ee3a81e3ad64286d5d2590215909
child 443484 72ee35bd086791e08bc0ee2d046f2ddda81edea4
permissions -rw-r--r--
Bug 1397223 - Gracefully handle failures in SurfaceCacheImpl::StartTracking. r=tnikkel, a=lizzard When the surface cache starts tracking an unlocked surface, it must insert it into the expiration tracker, so that it can be freed later if it is remains unused. ExpirationTrackerImpl::AddObjectLocked can fail due to out-of-memory conditions or during shutdown, which we previously ignored, and could leave us in a state where we think the surface is in the tracker but is not. When we later try to mark the surface as used in the tracker, it will hit a release assert because it doesn't exist. Now we handle the insertion failure by discarding the surface. Marking the surface as used can itself encounter a similar issue, and we handle it the same way.

Command Line Arguments
========================
# General

You can see available commands with:
```
./mach -h
./mach <sub-command> -h
```
Only arguments that need more explanation will be documented here.

# Run
## Enable Experimental Features
Use `--pref` to enable experimental features like experimental DOM API, JavaScript API and CSS properties.

e.g. To enable `flex` and `flex-direction` css properties:
```
./mach run -d -- --pref layout.flex.enabled --pref layout.flex-direction.enabled ...
```

You can find all the available preferences at [resources/prefs.json](http://mxr.mozilla.org/servo/source/resources/prefs.json).

# Debugging
## Remote Debugging
Use `--devtools 6000` to start the devtools server on port 6000.

e.g.
```
./mach run -d --devtools 6000 https://servo.org
```

To connect to the server, follow [this guide](https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Debugging_Firefox_Desktop#Connect).