Last Comment Bug 700643 - Windows power management messages shouldn't rely on hidden window
: Windows power management messages shouldn't rely on hidden window
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86 Windows 7
-- normal (vote)
: mozilla11
Assigned To: Neil Deakin
: Jim Mathies [:jimm]
Depends on:
Blocks: 71895
  Show dependency treegraph
Reported: 2011-11-08 06:01 PST by Neil Deakin
Modified: 2012-03-04 20:01 PST (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (4.38 KB, patch)
2011-11-08 06:01 PST, Neil Deakin
jmathies: review+
Details | Diff | Splinter Review

Description User image Neil Deakin 2011-11-08 06:01:40 PST
Created attachment 572793 [details] [diff] [review]

Instead, use a global to store what messages have been sent.

As an aside, the documentation for WM_POWERBROADCAST says that several messages with different PBT_APMRESUME* values for wParam can be sent in sequence, which implies the existing code could send multiple notifications. Using a global also prevents this.

I'm using a virtual machine and am not sure how to test any of this.
Comment 1 User image Jim Mathies [:jimm] 2011-11-08 07:12:10 PST
Side note, I'm working on a stand alone service that listens for these and supports observer events and a simple callback mechanism for bug 679240. I plan to move the code for this out of widget. (There's win and mac code currently that can be moved.)
Comment 2 User image Marco Bonardo [::mak] 2011-11-09 05:28:03 PST

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