Enable use of profiler without debug window (#12465)

This change also corrects a typo in the name of the internal method
setProfilerResultConsumer()

Change-Id: I877858d992611512ee681022312de7a9bfa4cd39