mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 10:27:32 +09:00
Issue #1751 -- Remove XP_MACOSX conditionals from /dom
This commit is contained in:
parent
434b3269fb
commit
d29e4f8306
71 changed files with 100 additions and 5342 deletions
|
|
@ -112,14 +112,12 @@ GetPluginFile(const nsAString& aPluginPath,
|
|||
nsAutoString baseName;
|
||||
GetFileBase(aPluginPath, aLibDirectory, aLibFile, baseName);
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".dylib");
|
||||
#elif defined(OS_POSIX)
|
||||
#if defined(OS_POSIX)
|
||||
nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".so");
|
||||
#elif defined(XP_WIN)
|
||||
nsAutoString binaryName = baseName + NS_LITERAL_STRING(".dll");
|
||||
#else
|
||||
#error not defined
|
||||
#error Unsupported O.S.
|
||||
#endif
|
||||
aLibFile->AppendRelativePath(binaryName);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -32,14 +32,6 @@
|
|||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
#include <assert.h>
|
||||
#ifdef HASH_NODE_ID_WITH_DEVICE_ID
|
||||
#include <unistd.h>
|
||||
#include <mach/mach.h>
|
||||
#include <mach/mach_vm.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // HASH_NODE_ID_WITH_DEVICE_ID
|
||||
|
||||
|
|
@ -83,46 +75,6 @@ GetStackAfterCurrentFrame(uint8_t** aOutTop, uint8_t** aOutBottom)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX) && defined(HASH_NODE_ID_WITH_DEVICE_ID)
|
||||
static mach_vm_address_t
|
||||
RegionContainingAddress(mach_vm_address_t aAddress)
|
||||
{
|
||||
mach_port_t task;
|
||||
kern_return_t kr = task_for_pid(mach_task_self(), getpid(), &task);
|
||||
if (kr != KERN_SUCCESS) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
mach_vm_address_t address = aAddress;
|
||||
mach_vm_size_t size;
|
||||
vm_region_basic_info_data_64_t info;
|
||||
mach_msg_type_number_t count = VM_REGION_BASIC_INFO_COUNT_64;
|
||||
mach_port_t object_name;
|
||||
kr = mach_vm_region(task, &address, &size, VM_REGION_BASIC_INFO_64,
|
||||
reinterpret_cast<vm_region_info_t>(&info), &count,
|
||||
&object_name);
|
||||
if (kr != KERN_SUCCESS || size == 0
|
||||
|| address > aAddress || address + size <= aAddress) {
|
||||
// mach_vm_region failed, or couldn't find region at given address.
|
||||
return 0;
|
||||
}
|
||||
|
||||
return address;
|
||||
}
|
||||
|
||||
MOZ_NEVER_INLINE
|
||||
static bool
|
||||
GetStackAfterCurrentFrame(uint8_t** aOutTop, uint8_t** aOutBottom)
|
||||
{
|
||||
mach_vm_address_t stackFrame =
|
||||
reinterpret_cast<mach_vm_address_t>(__builtin_frame_address(0));
|
||||
*aOutTop = reinterpret_cast<uint8_t*>(stackFrame);
|
||||
// Kernel code shows that stack is always a single region.
|
||||
*aOutBottom = reinterpret_cast<uint8_t*>(RegionContainingAddress(stackFrame));
|
||||
return *aOutBottom && (*aOutBottom < *aOutTop);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HASH_NODE_ID_WITH_DEVICE_ID
|
||||
static void SecureMemset(void* start, uint8_t value, size_t size)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue