Bug 1479650 - Redirect tzset, and avoid infinite recursion in mach_absolute_time redirection, r=froydnj.

--HG--
extra : rebase_source : 150c6fc4440cbd08bb6baf75fb601d744083a7a4
This commit is contained in:
Brian Hackett 2018-07-31 19:32:13 +00:00
Родитель 14d5ea5010
Коммит 4647908e1f
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -152,6 +152,7 @@ namespace recordreplay {
MACRO(sandbox_init_with_parameters) \
MACRO(vm_copy) \
MACRO(vm_purgable_control) \
MACRO(tzset) \
/* NSPR functions */ \
MACRO(PL_NewHashTable) \
MACRO(PL_HashTableDestroy) \
@ -1439,6 +1440,12 @@ RR_arc4random()
static uint64_t
RR_mach_absolute_time()
{
// This function might be called through OSSpinLock while setting gTlsThreadKey.
Thread* thread = Thread::GetByStackPointer(&thread);
if (!thread || thread->PassThroughEvents()) {
return OriginalCall(mach_absolute_time, uint64_t);
}
RecordReplayFunction(mach_absolute_time, uint64_t);
events.RecordOrReplayValue(&rval);
return rval;
@ -1546,6 +1553,8 @@ RR_vm_copy(vm_map_t aTarget, vm_address_t aSourceAddress,
return KERN_SUCCESS;
}
RRFunctionVoid0(tzset)
///////////////////////////////////////////////////////////////////////////////
// NSPR redirections
///////////////////////////////////////////////////////////////////////////////