Closed Bug 1412982 Opened 7 years ago Closed 7 years ago

Don't compile nsDownloadHistory when we are using Places

Categories

(Firefox :: Bookmarks & History, enhancement)

57 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: marco, Assigned: marco)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

From the code coverage report, it looks like this file is never executed during tests.
From a quick inspection, it looks like dead code to me.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8923564 - Flags: review?(mak77)
I think this is a mock implementation used when compiling without MOZ_PLACES, it's unused in firefox desktop because we always compile with MOZ_PLACES.
Should we keep it around? Are we using it somewhere?
I can make it compile conditionally if MOZ_PLACES is not defined, if we want to keep it around.
(In reply to Marco Castelluccio [:marco] from comment #4)
> I can make it compile conditionally if MOZ_PLACES is not defined, if we want
> to keep it around.

That's likely the right thing for now.
This is what the docshell uses when nothing else (Places) implements nsIDownloadHistory.
To clarify, SM and Thunderbird both use Places, thus it wouldn't be a problem to remove this. What I'm not sure about is Android usage of the Docshell though.
Attached patch Patch (obsolete) — Splinter Review
Attachment #8923564 - Attachment is obsolete: true
Attachment #8923564 - Flags: review?(mak77)
Attachment #8923772 - Flags: review?(mak77)
(In reply to Marco Bonardo [::mak] from comment #6)
> To clarify, SM and Thunderbird both use Places, thus it wouldn't be a
> problem to remove this. What I'm not sure about is Android usage of the
> Docshell though.

Android has its own separate history implementation IIRC.
(In reply to Marco Castelluccio [:marco] from comment #8)
> Android has its own separate history implementation IIRC.

Yes, but it may still be a simple different implementation of nsIGlobalHistory (and thus nsIDownloadHistory). As I said, I don't know if it has its own separate docshell, it sounds unlikely.
Comment on attachment 8923772 [details] [diff] [review]
Patch

Review of attachment 8923772 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the following fixed, and a try run.

::: docshell/base/moz.build
@@ +102,5 @@
>      'PendingGlobalHistoryEntry.cpp',
>      'SerializedLoadContext.cpp',
>  ]
>  
> +if CONFIG['MOZ_PLACES']:

shouldn't this be "if not CONFIG..."?
Attachment #8923772 - Flags: review?(mak77) → review+
Pushed by mcastelluccio@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a05948f281b
Compile nsDownloadHistory only if Places is not used. r=mak
Attached patch PatchSplinter Review
Carrying r+. It was green on try.
Attachment #8923772 - Attachment is obsolete: true
Attachment #8924706 - Flags: review+
Summary: Remove nsDownloadHistory as it is unused → Don't compile nsDownloadHistory when we are using Places
https://hg.mozilla.org/mozilla-central/rev/5a05948f281b
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: