Bug 784739 - Switch from NULL to nullptr in browser/; r=ehsan
This commit is contained in:
@@ -223,8 +223,8 @@ LaunchHelper(nsAutoString& aPath)
|
||||
STARTUPINFOW si = {sizeof(si), 0};
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
|
||||
if (!CreateProcessW(NULL, (LPWSTR)aPath.get(), NULL, NULL, FALSE, 0, NULL,
|
||||
NULL, &si, &pi)) {
|
||||
if (!CreateProcessW(nullptr, (LPWSTR)aPath.get(), nullptr, nullptr, FALSE, 0, nullptr,
|
||||
nullptr, &si, &pi)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ nsWindowsShellService::IsDefaultBrowserVista(bool aCheckAllTypes,
|
||||
{
|
||||
IApplicationAssociationRegistration* pAAR;
|
||||
HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
|
||||
NULL,
|
||||
nullptr,
|
||||
CLSCTX_INPROC,
|
||||
IID_IApplicationAssociationRegistration,
|
||||
(void**)&pAAR);
|
||||
@@ -447,7 +447,7 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||
|
||||
::ZeroMemory(currValue, sizeof(currValue));
|
||||
DWORD len = sizeof currValue;
|
||||
res = ::RegQueryValueExW(theKey, L"", NULL, NULL, (LPBYTE)currValue, &len);
|
||||
res = ::RegQueryValueExW(theKey, L"", nullptr, nullptr, (LPBYTE)currValue, &len);
|
||||
// Close the key that was opened.
|
||||
::RegCloseKey(theKey);
|
||||
if (REG_FAILED(res) ||
|
||||
@@ -516,7 +516,7 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||
|
||||
::ZeroMemory(currValue, sizeof(currValue));
|
||||
DWORD len = sizeof currValue;
|
||||
res = ::RegQueryValueExW(theKey, L"", NULL, NULL, (LPBYTE)currValue,
|
||||
res = ::RegQueryValueExW(theKey, L"", nullptr, nullptr, (LPBYTE)currValue,
|
||||
&len);
|
||||
// Close the key that was opened.
|
||||
::RegCloseKey(theKey);
|
||||
@@ -525,9 +525,9 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||
// Delete the key along with all of its childrean and then recreate it.
|
||||
const nsString &flatName = PromiseFlatString(keyName);
|
||||
::SHDeleteKeyW(HKEY_CURRENT_USER, flatName.get());
|
||||
res = ::RegCreateKeyExW(HKEY_CURRENT_USER, flatName.get(), 0, NULL,
|
||||
REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL,
|
||||
&theKey, NULL);
|
||||
res = ::RegCreateKeyExW(HKEY_CURRENT_USER, flatName.get(), 0, nullptr,
|
||||
REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, nullptr,
|
||||
&theKey, nullptr);
|
||||
if (REG_FAILED(res)) {
|
||||
// If disabling DDE fails try to disable it using the helper
|
||||
// application when setting Firefox as the default browser.
|
||||
@@ -564,7 +564,7 @@ nsWindowsShellService::IsDefaultBrowser(bool aStartupCheck,
|
||||
|
||||
::ZeroMemory(currValue, sizeof(currValue));
|
||||
DWORD len = sizeof currValue;
|
||||
res = ::RegQueryValueExW(theKey, L"", NULL, NULL, (LPBYTE)currValue,
|
||||
res = ::RegQueryValueExW(theKey, L"", nullptr, nullptr, (LPBYTE)currValue,
|
||||
&len);
|
||||
|
||||
// Don't update the FTP protocol handler's shell open command when the
|
||||
@@ -606,7 +606,7 @@ DynSHOpenWithDialog(HWND hwndParent, const OPENASINFO *poainfo)
|
||||
{
|
||||
typedef HRESULT (WINAPI * SHOpenWithDialogPtr)(HWND hwndParent,
|
||||
const OPENASINFO *poainfo);
|
||||
static SHOpenWithDialogPtr SHOpenWithDialogFn = NULL;
|
||||
static SHOpenWithDialogPtr SHOpenWithDialogFn = nullptr;
|
||||
if (!SHOpenWithDialogFn) {
|
||||
// shell32.dll is in the knownDLLs list so will always be loaded from the
|
||||
// system32 directory.
|
||||
@@ -650,8 +650,8 @@ nsWindowsShellService::LaunchControlPanelDefaultPrograms()
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_SHOWDEFAULT;
|
||||
PROCESS_INFORMATION pi = {0};
|
||||
if (!CreateProcessW(controlEXEPath, params, NULL, NULL, FALSE, 0, NULL,
|
||||
NULL, &si, &pi)) {
|
||||
if (!CreateProcessW(controlEXEPath, params, nullptr, nullptr, FALSE, 0, nullptr,
|
||||
nullptr, &si, &pi)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
CloseHandle(pi.hProcess);
|
||||
@@ -665,11 +665,11 @@ nsWindowsShellService::LaunchHTTPHandlerPane()
|
||||
{
|
||||
OPENASINFO info;
|
||||
info.pcszFile = L"http";
|
||||
info.pcszClass = NULL;
|
||||
info.pcszClass = nullptr;
|
||||
info.oaifInFlags = OAIF_FORCE_REGISTRATION |
|
||||
OAIF_URL_PROTOCOL |
|
||||
OAIF_REGISTER_EXT;
|
||||
return DynSHOpenWithDialog(NULL, &info);
|
||||
return DynSHOpenWithDialog(nullptr, &info);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -1028,8 +1028,8 @@ nsWindowsShellService::OpenApplication(int32_t aApplication)
|
||||
::ZeroMemory(&si, sizeof(STARTUPINFOW));
|
||||
::ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
|
||||
|
||||
BOOL success = ::CreateProcessW(NULL, (LPWSTR)path.get(), NULL,
|
||||
NULL, FALSE, 0, NULL, NULL,
|
||||
BOOL success = ::CreateProcessW(nullptr, (LPWSTR)path.get(), nullptr,
|
||||
nullptr, FALSE, 0, nullptr, nullptr,
|
||||
&si, &pi);
|
||||
if (!success)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user