MakeAndAddRef ensures that the freshly-allocated object immediately gets a refcount of 1 (before it's even passed to AddScriptRunner). This avoids several potential footguns that otherwise exist with a zero-refcount freshly-allocated object. It also makes the ownership-transfer semantics more clear (via the already_AddRefed type that it produces) - AddScriptRunner is taking ownership of the object, rather than using it temporarily while the caller maintains ownership. Differential Revision: https://phabricator.services.mozilla.com/D299039