Bug 1574298 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Some notes for using this in the maintenance service:

* The `ProcessRuntime` should be instantiated as early as possible in the life of the process and should remain running until near the end. I'd suggest instantiating it via RAII in `main`.
* Instantiate it using the new constructor with the `ProcessCategory::Service` value.
* Remove any other `CoInitialize` or `CoInitializeEx` calls, as well as their corresponding `CoUninitialize` calls.
* Remove any other `CoInitializeSecurity` calls.
* You will need to add `ipc/mscom/ProcessRuntime.cpp` to the service's `SOURCES`.
* `ProcessRuntime` does have a dependency on `mozglue`.
Some notes for using this in the maintenance service:

* The `ProcessRuntime` should be instantiated as early as possible in the life of the process and should remain running until near the end. I'd suggest instantiating it via RAII in `main`;
* Instantiate it using the new constructor with the `ProcessCategory::Service` value;
* `ProcessRuntime` supports `operator bool`, so you can use that to check whether the init failed (extremely unlikely, but you might want to log it or something);
* Remove any other `CoInitialize` or `CoInitializeEx` calls, as well as their corresponding `CoUninitialize` calls;
* Remove any other `CoInitializeSecurity` calls;
* You will need to add `ipc/mscom/ProcessRuntime.cpp` to the service's `SOURCES`;
* `ProcessRuntime` does have a dependency on `mozglue`. We could make further changes to eliminate that, but I'm hoping that isn't necessary.

Back to Bug 1574298 Comment 4