mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 794127 - hal::AdjustSystemClock should take a 64-bit value. r=cjones
This commit is contained in:
parent
bc17ca2619
commit
aa922bc172
@ -48,7 +48,7 @@ TimeManager::Set(const JS::Value& date, JSContext* ctx) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
hal::AdjustSystemClock(JS_DoubleToInt32(dateMSec - nowMSec));
|
||||
hal::AdjustSystemClock(dateMSec - nowMSec);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ NotifySystemTimeChange(const hal::SystemTimeChange& aReason)
|
||||
}
|
||||
|
||||
void
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
AdjustSystemClock(int64_t aDeltaMilliseconds)
|
||||
{
|
||||
AssertMainThread();
|
||||
PROXY_IF_SANDBOXED(AdjustSystemClock(aDeltaMilliseconds));
|
||||
|
@ -242,7 +242,7 @@ void NotifyNetworkChange(const hal::NetworkInformation& aNetworkInfo);
|
||||
* Adjusting system clock.
|
||||
* @param aDeltaMilliseconds The difference compared with current system clock.
|
||||
*/
|
||||
void AdjustSystemClock(int32_t aDeltaMilliseconds);
|
||||
void AdjustSystemClock(int64_t aDeltaMilliseconds);
|
||||
|
||||
/**
|
||||
* Set timezone
|
||||
|
@ -11,7 +11,7 @@ namespace mozilla {
|
||||
namespace hal_impl {
|
||||
|
||||
void
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
AdjustSystemClock(int64_t aDeltaMilliseconds)
|
||||
{}
|
||||
|
||||
void
|
||||
|
@ -615,7 +615,7 @@ sys_clock_settime(clockid_t clk_id, const struct timespec *tp)
|
||||
}
|
||||
|
||||
void
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
AdjustSystemClock(int64_t aDeltaMilliseconds)
|
||||
{
|
||||
if (aDeltaMilliseconds == 0) {
|
||||
return;
|
||||
@ -626,8 +626,8 @@ AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
// Preventing context switch before setting system clock
|
||||
sched_yield();
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
now.tv_sec += aDeltaMilliseconds/1000;
|
||||
now.tv_nsec += (aDeltaMilliseconds%1000)*NsecPerMsec;
|
||||
now.tv_sec += aDeltaMilliseconds / 1000;
|
||||
now.tv_nsec += (aDeltaMilliseconds % 1000) * NsecPerMsec;
|
||||
if (now.tv_nsec >= NsecPerSec)
|
||||
{
|
||||
now.tv_sec += 1;
|
||||
|
@ -131,7 +131,7 @@ parent:
|
||||
sync GetScreenBrightness() returns (double brightness);
|
||||
SetScreenBrightness(double brightness);
|
||||
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds);
|
||||
AdjustSystemClock(int64_t aDeltaMilliseconds);
|
||||
SetTimezone(nsCString aTimezoneSpec);
|
||||
sync GetTimezone()
|
||||
returns (nsCString aTimezoneSpec);
|
||||
|
@ -184,7 +184,7 @@ GetLight(hal::LightType light, hal::LightConfiguration* aConfig)
|
||||
}
|
||||
|
||||
void
|
||||
AdjustSystemClock(int32_t aDeltaMilliseconds)
|
||||
AdjustSystemClock(int64_t aDeltaMilliseconds)
|
||||
{
|
||||
Hal()->SendAdjustSystemClock(aDeltaMilliseconds);
|
||||
}
|
||||
@ -592,7 +592,7 @@ public:
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvAdjustSystemClock(const int32_t &aDeltaMilliseconds) MOZ_OVERRIDE
|
||||
RecvAdjustSystemClock(const int64_t &aDeltaMilliseconds) MOZ_OVERRIDE
|
||||
{
|
||||
if (!AssertAppProcessPermission(this, "time")) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user