Closed Bug 755336 Opened 9 years ago Closed 8 years ago

convert integer types in nsAppStartup.cpp

Categories

(Toolkit :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: espindola, Assigned: espindola)

Details

Attachments

(2 files, 1 obsolete file)

Attachment #624073 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/246f17379cb5
Assignee: nobody → respindola
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Broke the build for me on 64 bits archs :  http://buildbot.rhaalovely.net/builders/mozilla-central-amd64/builds/392/steps/build/logs/stdio

/var/buildslave-mozilla/mozilla-central-amd64/build/toolkit/components/startup/nsAppStartup.cpp:857: error: no matching function for call to 'nsIXULRuntime::GetReplacedLockTime(int64_t*)'
../../../dist/include/nsIXULRuntime.h:63: note: candidates are: virtual nsresult nsIXULRuntime::GetReplacedLockTime(PRInt64*) <near match>

All declarations of GetReplacedLockTime() i've found in mxr are declared using PRInt64*.. and a wild guess would be to fix xpcom/system/nsIXULRuntime.idl.
As it turns out that using int64_t in nsIXULRuntime.idl doesnt work, i'm trying with a static_cast<PRInt64*> in the caller.
For the record : xpidl.IDLError: error: type 'int64_t' not found, /var/buildslave-mozilla/mozilla-central-amd64/build/xpcom/system/nsIXULRuntime.idl line 124:11

From http://buildbot.rhaalovely.net/builders/mozilla-central-amd64/builds/393/steps/build/logs/stdio

Build #394 does

-  rv = xr->GetReplacedLockTime(&replacedLockTime);
+  rv = xr->GetReplacedLockTime(static_cast<PRInt64*>(&replacedLockTime));
Doesnt work, so per bug 717733 comment 2 using reinterpret_cast or declaring replacedLockTime as PRInt64 like it was previously should fix it.
Tried both, both fixes the issue. Which one should i submit ?
Attachment #625572 - Flags: review?(benjamin)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 625572 [details] [diff] [review]
cast GetReplacedLockTime arg to PRInt64

If PRInt64 and int64_t are not aliases for eachother, then "replacedLockTime" should continue to be PRInt64 until XPIDL is converted.
Attachment #625572 - Flags: review?(benjamin) → review-
Fiar enough, here's the other fix then.
Attachment #625572 - Attachment is obsolete: true
Attachment #625997 - Flags: review?(benjamin)
Attachment #625997 - Flags: review?(benjamin) → review+
https://hg.mozilla.org/mozilla-central/rev/aade4b52f10e
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.