Closed Bug 1547374 Opened 5 months ago Closed 5 months ago

clang build warning for nsINode.cpp using GetPresContext without definition ("Document.h:1274:25: warning: inline function 'mozilla::dom::Document::GetPresContext' is not defined [-Wundefined-inline]")

Categories

(Core :: DOM: Core & HTML, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I noticed this build warning go by in a build today:

 0:20.82 ../../dist/include/mozilla/dom/Document.h:1274:25: warning: inline function 'mozilla::dom::Document::GetPresContext' is not defined [-Wundefined-inline]
 0:20.82   inline nsPresContext* GetPresContext() const;
 0:20.82                         ^
 0:20.82 /scratch/work/builds/mozilla-central/mozilla/dom/base/nsINode.cpp:1020:45: note: used here
 0:20.82   RefPtr<nsPresContext> context = document->GetPresContext();

Trivial fix -- nsINode.cpp needs to include DocumentInlines.h to provide this function.

Blocks: buildwarning
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/120e27d9bb9e
Give nsINode.cpp an include for DocumentInlines.h (to provide e.g. inline definition for GetPresContext()). r=mccr8
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.