Last Comment Bug 690297 - handling of boolean prefs in gfxPlatform broken by the PRBool->bool rewrite
: handling of boolean prefs in gfxPlatform broken by the PRBool->bool rewrite
: regression
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Michael Wu [:mwu]
: Milan Sreckovic [:milan]
Depends on:
Blocks: 675553
  Show dependency treegraph
Reported: 2011-09-29 03:22 PDT by Jonathan Kew (:jfkthame)
Modified: 2011-10-22 12:49 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Fix (680 bytes, patch)
2011-09-29 03:30 PDT, Michael Wu [:mwu]
no flags Details | Diff | Splinter Review
Fix v2 (1.07 KB, patch)
2011-09-29 03:39 PDT, Michael Wu [:mwu]
jfkthame: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2011-09-29 03:22:31 PDT
In gfxPlatform, we have code that relied on being able to initialize PRBool variables to a special UNINITIALIZED_VALUE (-1), which lets us defer reading the actual prefs until they're needed. It looks like the rewrite to use bool will break this and make the prefs appear to be true before we've actually read them at all.
Comment 1 Michael Wu [:mwu] 2011-09-29 03:30:58 PDT
Created attachment 563359 [details] [diff] [review]

This was actually detected by static analysis but I dropped this fix while I was cleaning up and uploading patches. :(
Comment 2 Michael Wu [:mwu] 2011-09-29 03:39:58 PDT
Created attachment 563363 [details] [diff] [review]
Fix v2

More cases fixed, switched to PRInt8.
Comment 3 Jonathan Kew (:jfkthame) 2011-09-29 03:55:35 PDT
Comment on attachment 563363 [details] [diff] [review]
Fix v2

LGTM. Let's hope that's all of them! :)
Comment 4 Michael Wu [:mwu] 2011-09-29 04:01:29 PDT

Note You need to log in before you can comment on or make changes to this bug.