Based on a patch from Mozilla bug 1598164.
Needed due to identifier collision between NSS and IDBTransaction.
Co-authored by: Simon Giesecke <simon.giesecke@gmail.com>
Co-authored by: Matt A. Tobin <email@mattatobin.com>
Since these are just interpreted comments, there's 0 impact on actual code.
This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are
a few others scattered around which will be removed manually in a second part.
Normally we wouldn't need to send any notifications if the actor was
already destroyed, but it can be a VersionChangeOp which needs to
notify its parent operation (OpenDatabaseOp) about the failure.
So SendFailureResult needs to be called even when the actor was
destroyed. Normal operations redundantly check if the actor was
destroyed in SendSuccessResult and SendFailureResult, therefore it's
ok to call it in all cases here.
CheckedInt propagates the mIsValid in each add operation so that it avoids needing a bunch of code
for the overflow check in each add operation. Additionally, it avoids mismatching parameters
between the computing result and the additional overflow check.
This patch uses CheckedInt to take advantage of those implicit features of it.