Closed
Bug 409474
Opened 17 years ago
Closed 17 years ago
Round of crash fixes in a11y
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
VERIFIED
FIXED
People
(Reporter: aaronlev, Assigned: aaronlev)
References
Details
(Keywords: access, crash)
Attachments
(1 file, 1 obsolete file)
5.50 KB,
patch
|
surkov
:
review+
beltzner
:
approval1.9+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #294293 -
Flags: review?(surkov.alexander)
Comment 2•17 years ago
|
||
Comment on attachment 294293 [details] [diff] [review]
1) A null check, and 2) make sure that we hold on to doc accessible when events are fired on a delay (kung fu death grip)
>Index: accessible/src/base/nsCaretAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsCaretAccessible.cpp,v
>retrieving revision 1.56
>diff -p -u -5 -r1.56 nsCaretAccessible.cpp
>--- accessible/src/base/nsCaretAccessible.cpp 27 Nov 2007 18:08:50 -0000 1.56
>+++ accessible/src/base/nsCaretAccessible.cpp 21 Dec 2007 22:44:43 -0000
>@@ -165,10 +165,11 @@ NS_IMETHODIMP nsCaretAccessible::NotifyS
> NS_ENSURE_TRUE(mRootAccessible, NS_ERROR_FAILURE);
>
> mLastUsedSelection = do_GetWeakReference(aSel);
>
> nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
>+ NS_ENSURE_TRUE(doc, NS_OK);
If aDoc is null here I would like to add NS_ENSURE_ARG(aDoc)
>+ if (mEventsToFire.Count()) {
>+ // Doc being shut down before events fired,
>+ // so make sure we release the kung fu death grip which is always
>+ // there when there are still events left to be fired
>+ mEventsToFire.Clear();
>+ NS_RELEASE_THIS();
Your idea is to addref the object to prevent crach, nevertheless you release the object even queue is not empty and callback may be called, right?
Assignee | ||
Comment 3•17 years ago
|
||
I can do NS_ENSURE_ARG_POINTER(aDoc)
> Your idea is to addref the object to prevent crach, nevertheless you release
> the object even queue is not empty and callback may be called, right?
This is in Shutdown()
A couple of lines before we do:
if (mFireEventTimer) {
mFireEventTimer->Cancel();
mFireEventTimer = nsnull;
}
Let me combine the code a little so it's more obvious that it won't happen.
Comment 4•17 years ago
|
||
Comment on attachment 294293 [details] [diff] [review]
1) A null check, and 2) make sure that we hold on to doc accessible when events are fired on a delay (kung fu death grip)
r=me
Attachment #294293 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 5•17 years ago
|
||
Attachment #294293 -
Attachment is obsolete: true
Attachment #294320 -
Flags: review?(surkov.alexander)
Comment 6•17 years ago
|
||
Comment on attachment 294320 [details] [diff] [review]
More obvious that we won't release and event timer still fires
>+ ClearCache(mAccessNodeCache);
>+
>+ mDocument = nsnull;
>+
>+ nsHyperTextAccessibleWrap::Shutdown();
>+
> if (mFireEventTimer) {
one point now you prevent callbacks after base Shutdown, not sure if make a difference but some kind of doubts.
in any way I like this approach more and r=me, again :)
Attachment #294320 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #294320 -
Flags: approval1.9?
Assignee | ||
Comment 7•17 years ago
|
||
> not sure if make a difference but some kind of doubts.
I'm sure this patch will make a difference. I see bad doc accessible pointers used with FlushPendingEvents() in quite a few different stacks.
Comment 8•17 years ago
|
||
Comment on attachment 294320 [details] [diff] [review]
More obvious that we won't release and event timer still fires
a=beltzner for 1.9
Attachment #294320 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 9•17 years ago
|
||
Verified using Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b3) Gecko/2008020514 Firefox/3.0b3
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•