(In reply to alexander :surkov from comment #21)
> (In reply to Ginn Chen from comment #20)
> 
> > > > We need to copy the string to gchar* anyway.
> > > 
> > > yep, just copy the string every time when we were asked. Doesn't sound 
> > > good?
> > 
> > Actually it's not possible.
> > atk_object_get_name() returns const gchar*, caller will not free the return
> > value.
> > We have to keep it somewhere in AtkObject, otherwise we leak.
> 
> I see
> 
> So if provide getName/setName implementation that will use accessible->name
> to store a value then would it be acceptable solution?

or we could do what we do for a bunch of other atk methods reutrning
const gchar* nd use nsAccessibleWrap::ReturnString() which keeps a
static nsCString and returns a pointer into its buffer, and so requires
caller of atk method to copy returned string before calling another atk
function, which I think its very likely the bridge will always do.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/948788

Title:
  thunderbird crashed on launch

To manage notifications about this bug go to:
https://bugs.launchpad.net/firefox/+bug/948788/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to