Closed Bug 525106 Opened 10 years ago Closed 10 years ago

WebGL doesn't compile on Windows with -DUNICODE

Categories

(Core :: Canvas: 2D, defect, P2)

x86
macOS
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: joe, Assigned: benjamin)

References

Details

(Whiteboard: [needs review vlad])

Attachments

(1 file)

WebGL doesn't currently compile on Windows when you define -DUNICODE. This is a blocker for Fennec+Electrolysis because we have to include the chromium makefile, which implicitly defines -DUNICODE on all the files.

The best way this should be fixed is by using e.g. CreateWindowA or CreateWindowW rather than just CreateWindow. Rob Arnold tells me that specifying which version of the function you're calling is also expected practice in Mozilla code.

You can see an instance of this failing to build at http://tinderbox.mozilla.org/showlog.cgi?log=Electrolysis/1256765510.1256767690.11138.gz
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #409113 - Flags: review?(vladimir)
I pushed bsmedberg's patch to the electrolysis branch. http://hg.mozilla.org/projects/electrolysis/rev/03c7af83160b
Priority: -- → P2
Whiteboard: [needs review vlad]
http://hg.mozilla.org/mozilla-central/rev/3bc625b1fbd6
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Probably harmless, but the patch changed this :
-    WNDCLASS wc;
+    WNDCLASSW wc;

Yet, this line has been untouched: 
     ZeroMemory(&wc, sizeof(WNDCLASS));

It should have been:
-     ZeroMemory(&wc, sizeof(WNDCLASS));
+     ZeroMemory(&wc, sizeof(WNDCLASSW)); // Or sizeof wc
You need to log in before you can comment on or make changes to this bug.