Make the Windows sandbox code compiles without the Win8 SDK

RESOLVED FIXED in mozilla30

Status

()

Core
Security
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bbondy, Assigned: bbondy)

Tracking

unspecified
mozilla30
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
[13:29:39] <keeler> bbondy: ping - does the sandbox for windows compile on windows 7? I'm getting lots of undefined structures that appear to only be defined on windows 8...
[13:30:14] <bbondy> keeler: I haven't tried, and my machine does have the win8 sdk, so possibly not.
[13:30:28] <bbondy> I'll file a bug to fix
[13:30:37] <keeler> bbondy: great - thanks!
[13:30:39] <bbondy> you can install the win8 sdk to fix locally though
[13:30:44] <keeler> I see
(Assignee)

Comment 2

4 years ago
Created attachment 8385667 [details] [diff] [review]
rev2
Attachment #8385542 - Attachment is obsolete: true
(Assignee)

Comment 3

4 years ago
Comment on attachment 8385667 [details] [diff] [review]
rev2

Note: Checking _WIN32_WINNT < 0x0602 isn't enough here because it doesn't tell us which SDK was included, just what we were targeting.

Also checking _MSC_VER isn't correct here since this is independent of VS 2010 vs 2012.  

I think the correct thing to do is just to see if NTDDI_WIN8 is defined. I tested this on a machine with VS2012 and 2010 and win8 SDK, as well as a machine with just 2010 without win8 sdk.
Attachment #8385667 - Flags: review?(jmathies)

Comment 4

4 years ago
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> Comment on attachment 8385667 [details] [diff] [review]
> rev2
> 
> Note: Checking _WIN32_WINNT < 0x0602 isn't enough here because it doesn't
> tell us which SDK was included, just what we were targeting.
> 
> Also checking _MSC_VER isn't correct here since this is independent of VS
> 2010 vs 2012.  
> 
> I think the correct thing to do is just to see if NTDDI_WIN8 is defined. I
> tested this on a machine with VS2012 and 2010 and win8 SDK, as well as a
> machine with just 2010 without win8 sdk.

Are we using these structs and enums? I'm guessing yes since they aren't defined and that causes an error. Normally what we would do is ifndef out the code that leverages the stuff the sdk doesn't provide, vs. inject the sdk gunk into our code base. Can we do that instead?
(Assignee)

Comment 5

4 years ago
We use them in dynamically loaded functions if they are avsilable.

Comment 6

4 years ago
Comment on attachment 8385667 [details] [diff] [review]
rev2

ah ok, guess we need this stuff then. you might want to add a comment giving some detail about the situation.
Attachment #8385667 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/b1cb8672809f
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.