Bug 988931 - Fix some race conditions in the devtools. r=ochameau