code: function removeAllHistory() {
    const TOPIC_EXPIRATION_FINISHED = "places-expiration-finished";
  
    // Create flag visible to both the eval and the observer object
    var finishedFlag = {
      state: false
    }
  
    // Set up an observer so we get notified when remove completes
    let observer = {
      observe: function(aSubject, aTopic, aData) {
        observerService.removeObserver(this, TOPIC_EXPIRATION_FINISHED);    
        finishedFlag.state = true;
      }
    }
    observerService.addObserver(observer, TOPIC_EXPIRATION_FINISHED, false);
  
    // Remove the pages, then block until we're done or until timeout is reached
    browserHistory.removeAllPages();
    mozmill.controller.waitForEval("subject.state == true", gTimeout, 100, finishedFlag);
  }
docs: Synchronous wrapper around browserHistory.removeAllPages()
  Removes history and blocks until done