Bug 904784: use a separate critical section for the recording callback r=mwu a=bajaj