Closed Bug 1532128 Opened 8 months ago Closed 7 months ago

layout: Make some global functions static and remove some unused functions

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

layout/painting/FrameLayerBuilder.cpp:2593:6 [-Wmissing-prototypes] no previous prototype for function 'ReleaseLayerUserData'
layout/painting/RetainedDisplayListBuilder.cpp:1084:6 [-Wmissing-prototypes] no previous prototype for function 'FindContainingBlocks'
layout/style/FontFaceSet.cpp:423:6 [-Wmissing-prototypes] no previous prototype for function 'IsPdfJs'
layout/svg/SVGObserverUtils.cpp:969:6 [-Wmissing-prototypes] no previous prototype for function 'DestroyFilterProperty'

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

The Gecko_CrashReport() function definitions were added in bug 1407080. The function calls were removed in https://hg.mozilla.org/integration/autoland/rev/22f60f0b91ee. A clue that this function was no longer called: bug 1348273 changed the function prototype in GeckoBindings.h to take a uint32_t key parameter, but left the function definition in GeckoBindings.cpp taking a const char key. And yet nothing blew up.

layout/style/GeckoBindings.cpp:2294:6 [-Wmissing-prototypes] no previous prototype for function 'Gecko_AnnotateCrashReport'

Depends on D21851

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

NS_NewLayoutDebugger() is defined in nsLayoutDebugger.cpp.

layout/base/nsLayoutDebugger.cpp:44:10 [-Wmissing-prototypes] no previous prototype for function 'NS_NewLayoutDebugger'

Depends on D21852

clang's -Wmissing-prototypes option identifies global functions that can be made static (because they're only called from one compilation unit) or removed (if they're never called).

layout/build/nsLayoutModule.cpp:95:6 [-Wmissing-prototypes] no previous prototype for function 'nsLayoutModuleInitialize'
layout/build/nsLayoutModule.cpp:176:11 [-Wmissing-prototypes] no previous prototype for function 'CreateXMLContentSerializer'
layout/build/nsLayoutModule.cpp:178:11 [-Wmissing-prototypes] no previous prototype for function 'CreateHTMLContentSerializer'
layout/build/nsLayoutModule.cpp:180:11 [-Wmissing-prototypes] no previous prototype for function 'CreateXHTMLContentSerializer'
layout/build/nsLayoutModule.cpp:182:11 [-Wmissing-prototypes] no previous prototype for function 'CreatePlainTextSerializer'
layout/build/nsLayoutModule.cpp:184:11 [-Wmissing-prototypes] no previous prototype for function 'CreateContentPolicy'
layout/build/nsLayoutModule.cpp:188:11 [-Wmissing-prototypes] no previous prototype for function 'CreateGlobalMessageManager'
layout/build/nsLayoutModule.cpp:189:11 [-Wmissing-prototypes] no previous prototype for function 'CreateParentMessageManager'
layout/build/nsLayoutModule.cpp:191:11 [-Wmissing-prototypes] no previous prototype for function 'CreateChildMessageManager'
layout/build/nsLayoutModule.cpp:225:10 [-Wmissing-prototypes] no previous prototype for function 'Construct_nsIScriptSecurityManager'
layout/build/nsLayoutModule.cpp:237:10 [-Wmissing-prototypes] no previous prototype for function 'LocalStorageManagerConstructor'
layout/build/nsLayoutModule.cpp:255:6 [-Wmissing-prototypes] no previous prototype for function 'nsLayoutModuleDtor'

Depends on D21853

Pushed by cpeterson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/70d011e850da
layout: Make some global functions static. r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/9387009d5ec9
layout/style: Remove unused functions Gecko_AnnotateCrashReport() and Gecko_AddBufferToCrashReport(). r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d185a75fd89
layout: Move NS_NewLayoutDebugger() function prototype to a common header file. r=dholbert
https://hg.mozilla.org/integration/mozilla-inbound/rev/52e2caa87f89
layout/build: #include nsLayoutModule.h in nsLayoutModule.cpp. r=dholbert

== Change summary for alert #19804 (as of Thu, 07 Mar 2019 05:02:26 GMT) ==

Improvements:

2% ts_paint_webext windows10-64 pgo e10s stylo 309.46 -> 301.75

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=19804

Blocks: 536427
See Also: 536427
Depends on: 1534467
You need to log in before you can comment on or make changes to this bug.