Opened 12 years ago
Closed 12 years ago
#9481 closed bug (fixed)
[patch] BMenuBar_Track() is not locking atomically
Reported by: | jscipione | Owned by: | axeld |
---|---|---|---|
Priority: | high | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #8539 | |
Platform: | All |
Description (last modified by )
Because the locking is not-atomic it can cause the app to crash if another thread detaches the menu bar from the window while this method is trying to use it.
The attached patch fixes the problem for me and I detect no regressions but I'd like someone to take a second look. It was discovered while I was attempting to fix #8539 and is (partially) responsible for causing that bug.
Can someone with experience with BMenuBar and BHandler/BLooper take a look at my patch and see if there are any problems with it?
Attachments (1)
Change History (5)
by , 12 years ago
Attachment: | 0001-Use-LockLooper-in-BMenuBar-_Track-which-is-atomic.patch added |
---|
comment:1 by , 12 years ago
patch: | 0 → 1 |
---|
comment:2 by , 12 years ago
Description: | modified (diff) |
---|
comment:3 by , 12 years ago
This change looks good to me.
The Window() == NULL
check on 575 can now be eliminated, as LockLooper()
accomplishes this for you.
Patch that replaces window->(Un)Lock() with (Un)LockLooper()