This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.
MozReview-Commit-ID: 5UQVHElSpCr
If target content tab is already closed, progress dialog can't notify to content
process that cancelling the print job. So this patch will prevent send
cancelling message in this case.
MozReview-Commit-ID: 7G1LACajVha
In content process, we should set nsIPrintSettings::IsCancelled to true in order
to cancel the print job. nsPrintEngine use this flag for cancelling.
MozReview-Commit-ID: EqnNJOlIm5s
We can remove nsIPrintingPromptService::showPrinterProperties() since this
caller doesn't exist and this implementation of each platform returns
NS_ERROR_NOT_IMPLEMENTED.
MozReview-Commit-ID: 4s4ncv9U5Od
We can remove nsIPrintingPromptService::showPrinterProperties() since this
caller doesn't exist and this implementation of each platform returns
NS_ERROR_NOT_IMPLEMENTED.
MozReview-Commit-ID: 4s4ncv9U5Od
This avoids a lot of mismatches between nsAString and char16_t*, thus removing
many getter_Copies() and ToNewUnicode() and get() calls, and generally making
things simpler.
Note: the patch removes GetDefaultPrinterNameFromGlobalPrinters() by simply
inlining it at its two callsites, which is easy with the changed types.
This is straightforward, with only two notable things.
- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
throughout, because all nsXPIDLString.h did was include nsString.h. The
exception is for files which already include nsString.h, in which case the
patch just removes the nsXPIDLString.h inclusion.
- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
cover some of its ground, e.g. testing Adopt(nullptr).
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.
The patch suitably converts the remaining nsXPIDLString local variable as well.
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.