diff --git a/build/valgrind/cross-architecture.sup b/build/valgrind/cross-architecture.sup index 891aa5be4a4..2bd6e3e001e 100644 --- a/build/valgrind/cross-architecture.sup +++ b/build/valgrind/cross-architecture.sup @@ -202,12 +202,6 @@ fun:_ZN22nsComponentManagerImpl17ManifestComponentERNS_25ManifestProcessingContextEiPKPc ... } -{ - Bug 799157 - Memcheck:Cond - fun:_ZN2js3ion5Range6updateEPKS1_ - ... -} { Bug 803386 Memcheck:Free diff --git a/content/canvas/crashtests/802926-1.html b/content/canvas/crashtests/802926-1.html new file mode 100644 index 00000000000..a42ca50c1b2 --- /dev/null +++ b/content/canvas/crashtests/802926-1.html @@ -0,0 +1,6 @@ + + diff --git a/content/canvas/crashtests/crashtests.list b/content/canvas/crashtests/crashtests.list index a6d8769ea6b..f7bae246726 100644 --- a/content/canvas/crashtests/crashtests.list +++ b/content/canvas/crashtests/crashtests.list @@ -15,3 +15,4 @@ load 743499-negative-size.html load 767337-1.html load 780392-1.html load 794463-1.html +load 802926-1.html diff --git a/content/html/content/src/nsHTMLCanvasElement.cpp b/content/html/content/src/nsHTMLCanvasElement.cpp index b290e85c974..8ecabadc062 100644 --- a/content/html/content/src/nsHTMLCanvasElement.cpp +++ b/content/html/content/src/nsHTMLCanvasElement.cpp @@ -588,6 +588,10 @@ nsHTMLCanvasElement::ToBlob(nsIFileCallback* aCallback, return NS_ERROR_DOM_SECURITY_ERR; } + if (!aCallback) { + return NS_ERROR_UNEXPECTED; + } + nsAutoString type; nsresult rv = nsContentUtils::ASCIIToLower(aType, type); if (NS_FAILED(rv)) { diff --git a/other-licenses/7zstub/firefox/7zSD.sfx b/other-licenses/7zstub/firefox/7zSD.sfx index 463aa42a2f0..872d193a3f2 100644 Binary files a/other-licenses/7zstub/firefox/7zSD.sfx and b/other-licenses/7zstub/firefox/7zSD.sfx differ diff --git a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/Main.cpp b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/Main.cpp index 21c348eda1b..5d5499c79b9 100644 --- a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/Main.cpp +++ b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/Main.cpp @@ -134,12 +134,86 @@ static inline bool IsItWindowsNT() } #endif +// Delayed load libraries are loaded when the first symbol is used. +// The following ensures that we load the delayed loaded libraries from the +// system directory. +struct AutoLoadSystemDependencies +{ + AutoLoadSystemDependencies() + { + static LPCWSTR delayDLLs[] = { L"dwmapi.dll" }; + WCHAR systemDirectory[MAX_PATH + 1] = { L'\0' }; + // If GetSystemDirectory fails we accept that we'll load the DLLs from the + // normal search path. + GetSystemDirectoryW(systemDirectory, MAX_PATH + 1); + size_t systemDirLen = wcslen(systemDirectory); + + // Make the system directory path terminate with a slash + if (systemDirectory[systemDirLen - 1] != L'\\' && systemDirLen) { + systemDirectory[systemDirLen] = L'\\'; + ++systemDirLen; + // No need to re-NULL terminate + } + + // For each known DLL ensure it is loaded from the system32 directory + for (size_t i = 0; i < sizeof(delayDLLs) / sizeof(delayDLLs[0]); ++i) { + size_t fileLen = wcslen(delayDLLs[i]); + wcsncpy(systemDirectory + systemDirLen, delayDLLs[i], + MAX_PATH - systemDirLen); + if (systemDirLen + fileLen <= MAX_PATH) { + systemDirectory[systemDirLen + fileLen] = L'\0'; + } else { + systemDirectory[MAX_PATH] = L'\0'; + } + LPCWSTR fullModulePath = systemDirectory; // just for code readability + LoadLibraryW(fullModulePath); + } + } +} loadDLLs; + +BOOL +RemoveCurrentDirFromSearchPath() +{ + // kernel32.dll is in the knownDLL list so it is safe to load without a full path + HMODULE kernel32 = LoadLibraryW(L"kernel32.dll"); + if (!kernel32) { + return FALSE; + } + + typedef BOOL (WINAPI *SetDllDirectoryType)(LPCWSTR); + SetDllDirectoryType SetDllDirectoryFn = + (SetDllDirectoryType)GetProcAddress(kernel32, "SetDllDirectoryW"); + if (!SetDllDirectoryFn) { + FreeLibrary(kernel32); + return FALSE; + } + + // If this call fails we can't do much about it, so ignore it. + // It is unlikely to fail and this is just a precaution anyway. + SetDllDirectoryFn(L""); + FreeLibrary(kernel32); + return TRUE; +} + int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + // Disable current directory from being in the search path. + // This call does not help with implicitly loaded DLLs. + if (!RemoveCurrentDirFromSearchPath()) { + WCHAR minOSTitle[512] = { '\0' }; + WCHAR minOSText[512] = { '\0' }; + LoadStringW(NULL, IDS_MIN_OS_TITLE, minOSTitle, + sizeof(minOSTitle) / sizeof(minOSTitle[0])); + LoadStringW(NULL, IDS_MIN_OS_TEXT, minOSText, + sizeof(minOSText) / sizeof(minOSText[0])); + MessageBoxW(NULL, minOSText, minOSTitle, MB_OK | MB_ICONERROR); + return 1; + } + g_hInstance = (HINSTANCE)hInstance; #ifndef _UNICODE g_IsNT = IsItWindowsNT(); diff --git a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.h b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.h index 650cb07081c..9d58c410dda 100644 --- a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.h +++ b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.h @@ -4,3 +4,5 @@ #define IDS_EXTRACTION_ERROR_MESSAGE 8 #define IDS_CANNOT_CREATE_FOLDER 9 #define IDS_PROGRESS_EXTRACTING 69 +#define IDS_MIN_OS_TITLE 70 +#define IDS_MIN_OS_TEXT 71 diff --git a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.rc b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.rc index 8b25305139d..ff1e2347cb4 100644 --- a/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.rc +++ b/other-licenses/7zstub/src/7zip/Bundles/SFXSetup-moz/resource.rc @@ -11,6 +11,8 @@ BEGIN IDS_EXTRACTION_ERROR_MESSAGE "File is corrupt" IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'" IDS_PROGRESS_EXTRACTING "Extracting" + IDS_MIN_OS_TITLE "Setup Error" + IDS_MIN_OS_TEXT "Microsoft Windows XP SP2 or newer is required." END #include "../../FileManager/Resource/ProgressDialog/resource.rc"