Closed Bug 1598787 Opened 9 months ago Closed 9 months ago

Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString

Categories

(Core :: XPCOM, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

Nathan pointed out that this name is confusing. It actually does work for the default process type, too. GetPerProcObject in UntrustedModules.cpp calls the main process type "browser" instead of "default", and other places will only ever call it on child process types, but I think XRE_GeckoProcessTypeToString is a better name. Conveniently for formatting purposes it has the same number of letters.

This function works on all GeckoProcessTypes, not just those for child
processes.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8f52344661fe
Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj

Backed out changeset 8f52344661fe (bug 1598787) for build bustages at build/src/tools/fuzzing/faulty/Faulty.cpp

Backout: https://hg.mozilla.org/integration/autoland/rev/a9de318848b60f57ada623808db6f969c69ad908

Failure push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=8f52344661fe13649321c8885cd5e5b5550b7415

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=278090842&repo=autoland&lineNumber=40901

task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/tools/fuzzing/libfuzzer'
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/tools/fuzzing/faulty'
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -o Faulty.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fno-aligned-new -fsanitize=thread -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/tools/fuzzing/faulty -I/builds/worker/workspace/build/src/obj-firefox/tools/fuzzing/faulty -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -gline-tables-only -fomit-frame-pointer -funwind-tables -MD -MP -MF .deps/Faulty.o.pp /builds/worker/workspace/build/src/tools/fuzzing/faulty/Faulty.cpp
[task 2019-11-25T22:15:20.732Z] 22:15:20 ERROR - /builds/worker/workspace/build/src/tools/fuzzing/faulty/Faulty.cpp:169:16: error: use of undeclared identifier 'XRE_ChildProcessTypeToString'; did you mean 'XRE_GeckoProcessTypeToString'?
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - XRE_ChildProcessTypeToString(XRE_GetProcessType()), getpid());
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - XRE_GeckoProcessTypeToString
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ipc/Faulty.h:26:60: note: expanded from macro 'FAULTY_LOG'
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - printf_stderr("[Faulty] (%10u) " fmt "\n", getpid(), ##args);
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - ^
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsXULAppAPI.h:383:22: note: 'XRE_GeckoProcessTypeToString' declared here
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - XRE_API(const char*, XRE_GeckoProcessTypeToString,
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - ^
[task 2019-11-25T22:15:20.732Z] 22:15:20 ERROR - /builds/worker/workspace/build/src/tools/fuzzing/faulty/Faulty.cpp:233:16: error: use of undeclared identifier 'XRE_ChildProcessTypeToString'; did you mean 'XRE_GeckoProcessTypeToString'?
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - XRE_ChildProcessTypeToString(XRE_GetProcessType()), getpid());
[task 2019-11-25T22:15:20.732Z] 22:15:20 INFO - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2019-11-25T22:15:20.733Z] 22:15:20 INFO - XRE_GeckoProcessTypeToString
[task 2019-11-25T22:15:20.733Z] 22:15:20 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/ipc/Faulty.h:26:60: note: expanded from macro 'FAULTY_LOG'
[task 2019-11-25T22:15:20.734Z] 22:15:20 INFO - printf_stderr("[Faulty] (%10u) " fmt "\n", getpid(), ##args);
[task 2019-11-25T22:15:20.735Z] 22:15:20 INFO - ^
[task 2019-11-25T22:15:20.735Z] 22:15:20 INFO - /builds/worker/workspace/build/src/obj-firefox/dist/include/nsXULAppAPI.h:383:22: note: 'XRE_GeckoProcessTypeToString' declared here
[task 2019-11-25T22:15:20.737Z] 22:15:20 INFO - XRE_API(const char*, XRE_GeckoProcessTypeToString,
[task 2019-11-25T22:15:20.738Z] 22:15:20 INFO - ^
[task 2019-11-25T22:15:20.739Z] 22:15:20 INFO - 2 errors generated.
[task 2019-11-25T22:15:20.739Z] 22:15:20 INFO - /builds/worker/workspace/build/src/config/rules.mk:785: recipe for target 'Faulty.o' failed
[task 2019-11-25T22:15:20.739Z] 22:15:20 ERROR - make[4]: *** [Faulty.o] Error 1
[task 2019-11-25T22:15:20.739Z] 22:15:20 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/tools/fuzzing/faulty'
[task 2019-11-25T22:15:20.739Z] 22:15:20 INFO - /builds/worker/workspace/build/src/config/recurse.mk:74: recipe for target 'tools/fuzzing/faulty/target-objects' failed
[task 2019-11-25T22:15:20.740Z] 22:15:20 ERROR - make[3]: *** [tools/fuzzing/faulty/target-objects] Error 2
[task 2019-11-25T22:15:20.740Z] 22:15:20 INFO - make[3]: *** Waiting for unfinished jobs....

Flags: needinfo?(continuation)
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d8525c50715e
Rename XRE_ChildProcessTypeToString to XRE_GeckoProcessTypeToString. r=froydnj

I missed a few places it was used, but I updated the patch and repushed,.

Flags: needinfo?(continuation)
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.