code: function acquireMemoryObserver() {
    // Only enable on first use.
    ++memoryObservationCount;
    if (memoryObservationCount > 1) {
      return;
    }
  
    // Enable memory notification.
    setTemporaryPreference('javascript.options.mem.notify', true);
  
    // Listen for events.
    Services.obs.addObserver(
        handleMemoryEvent, 'garbage-collection-statistics', false);
  }
docs: Acquires a reference to the memory observer, starting it if this is the first
  reference.