Closed
Bug 561741
Opened 14 years ago
Closed 14 years ago
use nsAccessible outside an accessible module
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
26.80 KB,
patch
|
MarcoZ
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Morph nsIAccessiblityService::GetAccessibleInShell to return raw pointer to nsAccessible instance, it's safe because the object is returned from cache, util nsAccessibleEvent processing is sync then it's safe to use not addrefed nsAccessible*.
Assignee | ||
Updated•14 years ago
|
Attachment #441479 -
Attachment mime type: application/octet-stream → text/plain
Attachment #441479 -
Flags: superreview?(roc)
Attachment #441479 -
Flags: review?(smichaud)
Attachment #441479 -
Flags: review?(neil)
Attachment #441479 -
Flags: review?(bolterbugz)
Attachment #441479 -
Flags: review?(Olli.Pettay)
Assignee | ||
Comment 1•14 years ago
|
||
Comment on attachment 441479 [details] [diff] [review] patch David - a11y Olli - content Steven - widgets os x Neil - widgets windows Robert - layout, widgets
Assignee | ||
Updated•14 years ago
|
Attachment #441479 -
Attachment is patch: true
Assignee | ||
Comment 2•14 years ago
|
||
this patch gets rid the bug 560185
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Comment 3•14 years ago
|
||
Can you say more about how this fixes bug 560185?
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3) > Can you say more about how this fixes bug 560185? Actually that was an idea that helped. I still don't know what "non-virtual thunk" means in this case. But since it's related with virtual table then I thought what if we'll stop to use interfaces and start to work with object directly. This fix is not about bug 560185 only. We're switching internally (in a11y module) to nsAccessible and I think it's worth to use it outside an accessibility module (no query interface and more quick methods).
Comment 5•14 years ago
|
||
Comment on attachment 441479 [details] [diff] [review] patch I'm glad you had other motivations for these changes than just working around bug 560185 :-) Your changes to nsChildView.mm look fine to me. Presuming (of course) that it's safe to use a non-addrefed nsAccessible*. Josh should probably also look at them, so I'll add him to the review queue. - nsCOMPtr<nsIAccessible> accessible; - mGeckoChild->GetDocumentAccessible(getter_AddRefs(accessible)); + nsRefPtr<nsAccessible> accessible = mGeckoChild->GetDocumentAccessible(); + // XXXsurkov: why can the accessible getting destroy mGeckoChild? if (!mGeckoChild) The handling of DOM events is complex, and who knows what listeners/handlers might have been installed on a given event, and what they might do. So (in Cocoa widgets) we generally assume that the processing of any DOM event might have destroyed the current widget.
Attachment #441479 -
Flags: review?(smichaud) → review+
Updated•14 years ago
|
Attachment #441479 -
Flags: review?(joshmoz)
Attachment #441479 -
Flags: superreview?(roc) → superreview+
Comment 6•14 years ago
|
||
Comment on attachment 441479 [details] [diff] [review] patch r=me. Can you post a tryserver build link? (In reply to comment #4) > (In reply to comment #3) > > Can you say more about how this fixes bug 560185? > > Actually that was an idea that helped. I still don't know what "non-virtual > thunk" means in this case. But since it's related with virtual table then I > thought what if we'll stop to use interfaces and start to work with object > directly. I'd like to know the real cause. Is there a known compiler bug on OS X related to this?
Attachment #441479 -
Flags: review?(bolterbugz) → review+
Comment 7•14 years ago
|
||
Note either way, I see this as an improvement. Nice one Alexander :)
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #6) > I'd like to know the real cause. Is there a known compiler bug on OS X related > to this? I failed to find known issue. I've seen couple similar problems of linking. All of them related with multiple inheritance, perhaps like in our case. The first idea I had it's because our classes have methods named like interface methods the class is inherited from (overloaded methods, have same name but different arguments or types), but it sounds that wasn't a reason. I could file a bug but the bug description would be "build firefox and try gdb" what it's not very sucesful bug report. I need to spend amount of time to find a cause and make bug descriptive but I think it might be not right time for investigations in the area I do not work.
Assignee | ||
Comment 9•14 years ago
|
||
try-server build - http://build.mozilla.org/tryserver-builds/surkov.alexander@gmail.com-try-a0bbf0bbb997
Assignee | ||
Comment 10•14 years ago
|
||
updated to trunk
Attachment #441479 -
Attachment is obsolete: true
Attachment #441718 -
Flags: review?(neil)
Attachment #441718 -
Flags: review?(joshmoz)
Attachment #441718 -
Flags: review?(Olli.Pettay)
Attachment #441479 -
Flags: review?(neil)
Attachment #441479 -
Flags: review?(joshmoz)
Attachment #441479 -
Flags: review?(Olli.Pettay)
Comment 11•14 years ago
|
||
Comment on attachment 441718 [details] [diff] [review] patch2 I built with this patch and accessibility enabled, and it doesn't cause any change. That means no change for the better in regards to VoiceOver interaction, but also no change for the worse (breaking communication alltogether).
Attachment #441718 -
Flags: feedback+
Assignee | ||
Comment 12•14 years ago
|
||
Marco, thank you for testing. Could you please check Windows and Linux since the patch affects on all platforms?
Comment 13•14 years ago
|
||
(In reply to comment #12) > Marco, thank you for testing. Could you please check Windows and Linux since > the patch affects on all platforms? All's well.
Assignee | ||
Comment 14•14 years ago
|
||
great. thank you much.
Comment 15•14 years ago
|
||
Why you need to #ifdef ACCESSIBILITY in nsGUIEvent and in nsDOMEvent?
Assignee | ||
Comment 16•14 years ago
|
||
(In reply to comment #15) > Why you need to #ifdef ACCESSIBILITY in nsGUIEvent and in nsDOMEvent? I think it's not necessary to expose nsAccessibleEvent if a11y is disabled. That's usual practice of a11y code usage in gecko.
Updated•14 years ago
|
Attachment #441718 -
Flags: review?(Olli.Pettay) → review+
Updated•14 years ago
|
Attachment #441718 -
Flags: review?(neil) → review+
Comment 17•14 years ago
|
||
Comment on attachment 441718 [details] [diff] [review] patch2 + // XXXsurkov: why can the accessible getting destroy mGeckoChild? Any time we send an event we assume that some chain of events could end up destroying the gecko nsIWidget. To be safe we always check for that. Please leave this check (as you did), and remove the XXX comment.
Attachment #441718 -
Flags: review?(joshmoz) → review+
Comment 18•14 years ago
|
||
(In reply to comment #17) > (From update of attachment 441718 [details] [diff] [review]) > + // XXXsurkov: why can the accessible getting destroy mGeckoChild? > > Any time we send an event we assume that some chain of events could end up > destroying the gecko nsIWidget. To be safe we always check for that. Please > leave this check (as you did), and remove the XXX comment. Good to know Josh (I was curious as well).
Assignee | ||
Comment 19•14 years ago
|
||
(In reply to comment #17) > Please > leave this check (as you did), and remove the XXX comment. done landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/956e08c70845
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 20•14 years ago
|
||
backed out due to reports of Linux crashes on startup http://hg.mozilla.org/mozilla-central/rev/2108d2458719 http://crash-stats.mozilla.com/report/index/80688273-e67f-4879-8068-fa8c82100512
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 21•14 years ago
|
||
I reproduced the crash on my local machine, hope to come with the fix soon.
Assignee | ||
Comment 22•14 years ago
|
||
Robert, please review gtk part Marco, please test it on linux the problem was activate/deactive events were sent for wrong accessible what crashes firefox in the end.
Attachment #441718 -
Attachment is obsolete: true
Attachment #445130 -
Flags: superreview?(roc)
Attachment #445130 -
Flags: review?(marco.zehe)
Assignee | ||
Comment 23•14 years ago
|
||
try server build - http://build.mozilla.org/tryserver-builds/surkov.alexander@gmail.com-try-a15902942f1b
Attachment #445130 -
Flags: superreview?(roc) → superreview+
Comment 24•14 years ago
|
||
Comment on attachment 445130 [details] [diff] [review] patch3 Doesn't crash for me. I'm using it to r+ this patch. :)
Attachment #445130 -
Flags: review?(marco.zehe) → review+
Assignee | ||
Comment 25•14 years ago
|
||
landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/b0731e9cd38c
Status: REOPENED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•