Bug 32251 - To avoid potential crash in Android history item
Summary: To avoid potential crash in Android history item
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Android Android
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-12-07 15:13 PST by Grace Kloba
Modified: 2009-12-11 04:21 PST (History)
6 users (show)

See Also:

proposed patch (2.56 KB, patch)
2009-12-07 15:16 PST, Grace Kloba
eric: review-
Details | Formatted Diff | Diff
new patch according to the comment. (2.66 KB, patch)
2009-12-07 16:53 PST, Grace Kloba
darin: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grace Kloba 2009-12-07 15:13:03 PST
As AndroidWebHistoryBridge holds a dumb pointer of HistoryItem and HistoryItem holds a RefPtr of AndroidWebHistoryBridge, the dumb pointer needs to be cleared when HistoryItem is deleted to avoid potential crash.
Comment 1 Grace Kloba 2009-12-07 15:16:10 PST
Created attachment 44436 [details]
proposed patch
Comment 2 Eric Seidel (no email) 2009-12-07 16:44:27 PST
Comment on attachment 44436 [details]
proposed patch

The tab in AndroidWebHistoryBridge.h will prevent this from being landed as is.

Although WebKit has no explicit wrapping rule, it mgiht make sense to wrap the txt in the ChangeLog at some point.

It feels strange that HistoryItem.cpp has to have an ANDROID ifdef, but maybe that's the design that you and Brady agreed on?

r- for the tab.
Comment 3 Grace Kloba 2009-12-07 16:53:31 PST
Created attachment 44448 [details]
new patch according to the comment.

Fix the tab. Add line break in the ChangeLog.

The pattern used in HistoryItem is following the existing model.
Comment 4 WebKit Commit Bot 2009-12-11 02:24:00 PST
Comment on attachment 44448 [details]
new patch according to the comment.

Rejecting patch 44448 from commit-queue.

Failed to run "['/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', '--reviewer', 'Darin Adler', '--force']" exit_code: 1
patching file WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file WebCore/history/HistoryItem.cpp
Hunk #1 FAILED at 102.
1 out of 1 hunk FAILED -- saving rejects to file WebCore/history/HistoryItem.cpp.rej
patching file WebCore/history/android/AndroidWebHistoryBridge.h
Comment 5 Ben Murdoch 2009-12-11 02:38:07 PST
This is a straightforward merge fix, I'll land manually.
Comment 6 Ben Murdoch 2009-12-11 04:21:49 PST
Landed as r51980.