[OS/2] Bug 351246: Load Mozilla into Highmem on OS/2. Part 1, changes to OS/2 only core code. r=abwillis1, sr=mkaply
This commit is contained in:
Родитель
aed289073e
Коммит
aae61ef7fe
2523
gc/boehm/os_dep.c
2523
gc/boehm/os_dep.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -56,8 +56,20 @@ nsMessengerOS2Integration::nsMessengerOS2Integration()
|
|||
PAG_READ | PAG_WRITE);
|
||||
|
||||
if (rc != NO_ERROR) {
|
||||
#ifdef MOZ_OS2_HIGH_MEMORY
|
||||
rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
|
||||
PAG_COMMIT | PAG_WRITE | OBJ_ANY);
|
||||
if (rc != NO_ERROR) { // Did the kernel handle OBJ_ANY?
|
||||
// Try again without OBJ_ANY and if the first failure was not caused
|
||||
// by OBJ_ANY then we will get the same failure, else we have taken
|
||||
// care of pre-FP13 systems where the kernel couldn't handle it.
|
||||
rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
|
||||
PAG_COMMIT | PAG_WRITE);
|
||||
}
|
||||
#else
|
||||
rc = DosAllocSharedMem(&pvObject, WARPCENTER_SHAREDMEM, sizeof(ULONG),
|
||||
PAG_COMMIT | PAG_WRITE);
|
||||
#endif
|
||||
pUnreadState = (PULONG)pvObject;
|
||||
}
|
||||
*pUnreadState = 0;
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef MOZ_OS2_HIGH_MEMORY
|
||||
// os2safe.h has to be included before os2.h, needed for high mem
|
||||
#include <os2safe.h>
|
||||
#endif
|
||||
|
||||
#define INCL_PM
|
||||
#define INCL_GPI
|
||||
#define INCL_DOS
|
||||
|
@ -671,9 +676,24 @@ struct MessageWindow {
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
ULONG ulSize = sizeof(COPYDATASTRUCT)+strlen(cmd)+1+CCHMAXPATH;
|
||||
#ifdef MOZ_OS2_HIGH_MEMORY
|
||||
APIRET rc = DosAllocSharedMem( &pvData, NULL, ulSize,
|
||||
PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GETTABLE | OBJ_ANY);
|
||||
if (rc != NO_ERROR) { // Did the kernel handle OBJ_ANY?
|
||||
// Try again without OBJ_ANY and if the first failure was not caused
|
||||
// by OBJ_ANY then we will get the same failure, else we have taken
|
||||
// care of pre-FP13 systems where the kernel couldn't handle it.
|
||||
rc = DosAllocSharedMem( &pvData, NULL, ulSize,
|
||||
PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GETTABLE);
|
||||
if (rc != NO_ERROR) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (DosAllocSharedMem( &pvData, NULL, ulSize,
|
||||
(PAG_COMMIT|PAG_READ|PAG_WRITE|OBJ_GETTABLE)))
|
||||
PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GETTABLE | OBJ_ANY))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
#endif
|
||||
|
||||
// We used to set dwData to zero, when we didn't send the
|
||||
// working dir. Now we're using it as a version number.
|
||||
|
|
|
@ -1472,8 +1472,22 @@ nsresult RenderToDTShare( PDRAGITEM pditem, HWND hwnd)
|
|||
nsresult rv;
|
||||
void * pMem;
|
||||
|
||||
#ifdef MOZ_OS2_HIGH_MEMORY
|
||||
APIRET rc = DosAllocSharedMem( &pMem, DTSHARE_NAME, 0x100000,
|
||||
PAG_WRITE | PAG_READ | OBJ_ANY);
|
||||
if (rc != NO_ERROR &&
|
||||
rc != ERROR_ALREADY_EXISTS) { // Did the kernel handle OBJ_ANY?
|
||||
// Try again without OBJ_ANY and if the first failure was not caused
|
||||
// by OBJ_ANY then we will get the same failure, else we have taken
|
||||
// care of pre-FP13 systems where the kernel couldn't handle it.
|
||||
rc = DosAllocSharedMem( &pMem, DTSHARE_NAME, 0x100000,
|
||||
PAG_WRITE | PAG_READ);
|
||||
}
|
||||
#else
|
||||
APIRET rc = DosAllocSharedMem( &pMem, DTSHARE_NAME, 0x100000,
|
||||
PAG_WRITE | PAG_READ);
|
||||
#endif
|
||||
|
||||
if (rc == ERROR_ALREADY_EXISTS)
|
||||
rc = DosGetNamedSharedMem( &pMem, DTSHARE_NAME,
|
||||
PAG_WRITE | PAG_READ);
|
||||
|
|
|
@ -2113,7 +2113,14 @@ nsLocalFile::IsExecutable(PRBool *_retval)
|
|||
return NS_OK;
|
||||
|
||||
// upper-case the extension, then see if it claims to be an executable
|
||||
#ifdef MOZ_OS2_HIGH_MEMORY
|
||||
// WinUpper() cannot be used because it crashes with high memory.
|
||||
// strupr() does not take into account non-ASCII characters but this is
|
||||
// irrelevant for the possible extensions below
|
||||
strupr(ext);
|
||||
#else
|
||||
WinUpper(0, 0, 0, ext);
|
||||
#endif
|
||||
if (strcmp(ext, ".EXE") == 0 ||
|
||||
strcmp(ext, ".CMD") == 0 ||
|
||||
strcmp(ext, ".COM") == 0 ||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче