Don't need check IsEmbeddedObject in GetNativeInterface if we've already created mAtkObject

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Ginn Chen, Assigned: Ginn Chen)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

1.24 KB, patch
Aaron Leventhal
: review+
Details | Diff | Splinter Review
(Assignee)

Description

11 years ago
357 NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
358 {
359     *aOutAccessible = nsnull;
360 
361     if (!IsEmbeddedObject(this)) {
362       // We don't create ATK objects for nsIAccessible plain text leaves
363       return NS_ERROR_FAILURE;
364     }
365     if (!mAtkObject) {

We should move the check inside if (!mAtkObject) {}
(Assignee)

Comment 1

11 years ago
Created attachment 266721 [details] [diff] [review]
patch

IsEmbeddedObject will do a lot of things, we can save time in this way.
Another reason is we don't want to call IsEmbeddedObject during Shutdown, but we call SetMaiHyperlink(nsnull) in Shutdown() now, and it calls GetMaiHyperlink ---> GetAtkObject ---> GetNativeInterface
Attachment #266721 - Flags: review?(aaronleventhal)

Updated

11 years ago
Attachment #266721 - Flags: review?(aaronleventhal) → review+
(Assignee)

Updated

11 years ago
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.