Closed Bug 632144 Opened 12 years ago Closed 12 years ago

crash [@ GeckoUtils::GatherTextUnder(nsIDOMNode*, nsString&)]

Categories

(Camino Graveyard :: General, defect)

x86
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alqahira, Assigned: alqahira)

Details

(Keywords: crash, Whiteboard: [camino-2.0.8])

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-575adde0-c6ce-49e4-9229-ddd612110204 .
============================================================= 

I spotted this crash in crash-stats; in the line where GeckoUtils crashes, aNode is apparently null.  Stuart also says that GetEnclosingLinkElementAndHref isn't being checked at the call site.
Flags: camino2.0.7?
Attached patch Fix? (obsolete) — Splinter Review
Stuart, is this the fix you had in mind?
Assignee: nobody → alqahira
Status: NEW → ASSIGNED
Attachment #510765 - Flags: superreview?(stuart.morgan+bugzilla)
Comment on attachment 510765 [details] [diff] [review]
Fix?

Well, GatherTextUnder should null-check the node and return an empty string.

This case is more subtle; we should be checking here as you've done, but I'm not sure returning and thus silently failing to add a bookmarks is the right handling (vs. continuing with empty or dummy text).
Attachment #510765 - Flags: superreview?(stuart.morgan+bugzilla) → superreview-
Attached patch Fix? v2Splinter Review
I just missed you earlier; I was flailing around in the C++, so I have no confidence that that part is correct.

The BWC hunk no longer does an early return (which prevents yet-another-smokey-regression!), although I'm not positive my current solution is correct, either. It manually emulates the current automatic behavior of using the link's URL as the bookmark title when we have no(?) linkText (you can see this on the big green Download button on the home page; I'll fix that to have an alt attribute later).

We do the automagic here: http://mxr.mozilla.org/camino/source/camino/src/bookmarks/AddBookmarkDialogController.mm#57
Attachment #510765 - Attachment is obsolete: true
Attachment #511300 - Flags: superreview?(stuart.morgan+bugzilla)
Comment on attachment 511300 [details] [diff] [review]
Fix? v2

sr=smorgan

I wish we knew how this happens, but not crashing is good.
Attachment #511300 - Flags: superreview?(stuart.morgan+bugzilla) → superreview+
Agreed on both counts.

http://hg.mozilla.org/camino/rev/f6df2b34e027 and CAMINO_2_0_BRANCH.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: camino2.0.7? → camino2.0.7+
Resolution: --- → FIXED
Whiteboard: [camino-2.0.7]
(In reply to comment #3)
> using the link's URL as the bookmark title when we have no(?) linkText (you can
> see this on the big green Download button on the home page; I'll fix that to
> have an alt attribute later).

And fixed that on the website, too.
2.0.7 ended up being an emergency release.
Whiteboard: [camino-2.0.7] → [camino-2.0.8]
Crash Signature: [@ GeckoUtils::GatherTextUnder(nsIDOMNode*, nsString&)]
You need to log in before you can comment on or make changes to this bug.