The default bug view has changed. See this FAQ.

Dead code in content

RESOLVED FIXED in mozilla6

Status

()

Core
DOM
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Ehren Metcalfe, Assigned: Ehren Metcalfe)

Tracking

Trunk
mozilla6
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

7 years ago
Created attachment 431560 [details] [diff] [review]
patch

These functions are unused: 

in content/base:

PRBool nsParserUtils::GetQuotedAttrNameAt(const nsString&,PRUint32,nsAString_internal&)
http://mxr.mozilla.org/mozilla-central/search?string=GetQuotedAttrNameAt

nsIContent* nsContentUtils::FindFirstChildWithResolvedTag(nsIContent*,PRInt32,nsIAtom*)
http://mxr.mozilla.org/mozilla-central/search?string=FindFirstChildWithResolvedTag

nsIDocShell* nsContentUtils::GetDocShellFromCaller()
http://mxr.mozilla.org/mozilla/search?string=GetDocShellFromCaller

nsIContent* nsContentUtils::GetReferencedElement(nsIURI*,nsIContent*)
http://mxr.mozilla.org/mozilla-central/search?string=GetReferencedElement

void nsXMLNameSpaceMap::RemovePrefix(nsIAtom*)
http://mxr.mozilla.org/mozilla-central/search?string=RemovePrefix

content/html:

void nsGenericHTMLElement::GetHrefURIToMutate(nsIURI**)
http://mxr.mozilla.org/mozilla-central/search?string=GetHrefURIToMutate

nsresult nsGenericHTMLElement::SetFloatAttr(nsIAtom*,float)
http://mxr.mozilla.org/mozilla-central/search?string=SetFloatAttr

nsresult nsGenericHTMLElement::GetFloatAttr(nsIAtom*,float,float*)
http://mxr.mozilla.org/mozilla-central/search?string=GetFloatAttr

nsresult nsHTMLDNSPrefetch::PrefetchHigh(nsAString_internal&)
nsresult nsHTMLDNSPrefetch::PrefetchHigh(Link*)
http://mxr.mozilla.org/mozilla-central/search?string=PrefetchHigh

nsresult nsHTMLDNSPrefetch::PrefetchMedium(nsAString_internal&)
nsresult nsHTMLDNSPrefetch::PrefetchMedium(Link*)
http://mxr.mozilla.org/mozilla-central/search?string=PrefetchMedium

PRBool SinkContext::IsAncestorContainer(nsHTMLTag)
http://mxr.mozilla.org/mozilla-central/search?string=IsAncestorContainer

nsresult nsHTMLFragmentContentSink::AddTextToContent(nsIContent*,const nsAString_internal&)
http://mxr.mozilla.org/mozilla-central/search?string=AddTextToContent

content/media:

nsresult nsMediaCacheStream::ReadFromCache(char*,PRInt64,PRInt64)
http://mxr.mozilla.org/mozilla-central/search?string=ReadFromCache
Attachment #431560 - Flags: review?(bzbarsky)
(Assignee)

Updated

7 years ago
Blocks: 457262
The content/base list of things removed looks ok to me, though sicking is a better reviewer I think.

GetHrefURIToMutate can go.  But then you should be able to remove the aCloneIfCached argument of GetURIAttr too, right?

>nsresult nsGenericHTMLElement::SetFloatAttr(nsIAtom*,float)
>http://mxr.mozilla.org/mozilla-central/search?string=SetFloatAttr
>
>nsresult nsGenericHTMLElement::GetFloatAttr(nsIAtom*,float,float*)
>http://mxr.mozilla.org/mozilla-central/search?string=GetFloatAttr

Not sure whether we'll need these for upcoming html5 stuff.

> nsresult nsHTMLDNSPrefetch::PrefetchHigh(nsAString_internal&)
> nsresult nsHTMLDNSPrefetch::PrefetchHigh(Link*)
> http://mxr.mozilla.org/mozilla-central/search?string=PrefetchHigh

> nsresult nsHTMLDNSPrefetch::PrefetchMedium(nsAString_internal&)
> nsresult nsHTMLDNSPrefetch::PrefetchMedium(Link*)
> http://mxr.mozilla.org/mozilla-central/search?string=PrefetchMedium

These were meant as forward-looking API, in case someone needs them.

> nsresult nsMediaCacheStream::ReadFromCache(char*,PRInt64,PRInt64)
> http://mxr.mozilla.org/mozilla-central/search?string=ReadFromCache

This needs review from roc.
Attachment #431560 - Flags: review?(roc)
Attachment #431560 - Flags: review?(jonas)
Attachment #431560 - Flags: review?(bzbarsky)

Comment 2

7 years ago
Awesome to see dead code bugs being filed!
Attachment #431560 - Flags: review?(roc) → review+
Attachment #431560 - Flags: review?(jonas) → review+
(Assignee)

Comment 3

7 years ago
Created attachment 436403 [details] [diff] [review]
patch v2

Sorry this took so long... 

I put back Prefetch* and *FloatAttr. Also I wonder if I can sneak in nsresult nsPlainTextSerializer::WillProcessTokens() : http://mxr.mozilla.org/mozilla-central/search?string=WillProcessTokens (It looks like it implements an interface method that was removed at some point)
Attachment #436403 - Flags: review?(jonas)
(Assignee)

Comment 4

7 years ago
I also removed aCloneIfCached from GetURIAttr. Should probably try a build with -Wunusedparams ...
Attachment #436403 - Flags: review?(jonas) → review+
Assignee: nobody → ehren.m
Ehren, is there anything left to do before this can land?
(Assignee)

Comment 6

6 years ago
Created attachment 532600 [details] [diff] [review]
patch for check-in

oops, sry for the epic delay.

Here's the rebased patch. Unfortunately/Fortunately nsMediaStream::ReadFromCache now has users so I had to take that out of the patch. The rest passed a minimal try server run though so I'll just carry over the r=sicking,roc
Attachment #431560 - Attachment is obsolete: true
Attachment #436403 - Attachment is obsolete: true
Attachment #532600 - Flags: review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
Status: NEW → ASSIGNED
Keywords: checkin-needed
OS: Linux → All
Hardware: x86 → All
Whiteboard: [fixed in cedar]
Version: unspecified → Trunk
Pushed:
http://hg.mozilla.org/mozilla-central/rev/a968d7ebe290

Thank you for your contribution :)
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Component: HTML: Parser → DOM
Flags: in-testsuite-
QA Contact: parser → general
Resolution: --- → FIXED
Whiteboard: [fixed in cedar]
Target Milestone: --- → mozilla6
You need to log in before you can comment on or make changes to this bug.