Global Metrics

path: .metrics.loc.sloc
old: 169.0
new: 50.0

path: .metrics.loc.blank
old: 11.0
new: 12.0

path: .metrics.loc.cloc
old: 28.0
new: 6.0

path: .metrics.loc.ploc
old: 130.0
new: 32.0

path: .metrics.mi.mi_original
old: 45.01155467155824
new: 74.7657819911265

path: .metrics.mi.mi_visual_studio
old: 26.322546591554527
new: 43.72267952697457

path: .metrics.mi.mi_sei
old: 19.736023081407215
new: 58.23573095802051

path: .metrics.cyclomatic.sum
old: 10.0
new: 5.0

path: .metrics.halstead.volume
old: 2451.9329490888467
new: 444.953709885572

path: .metrics.halstead.purity_ratio
old: 2.614450834796738
new: 2.415289607378174

path: .metrics.halstead.N1
old: 195.0
new: 40.0

path: .metrics.halstead.time
old: 570.6160668920676
new: 178.44497740202627

path: .metrics.halstead.level
old: 0.23872180451127825
new: 0.13852813852813853

path: .metrics.halstead.n1
old: 7.0
new: 11.0

path: .metrics.halstead.length
old: 347.0
new: 82.0

path: .metrics.halstead.n2
old: 127.0
new: 32.0

path: .metrics.halstead.effort
old: 10271.089204057216
new: 3212.009593236473

path: .metrics.halstead.estimated_program_length
old: 907.2144396744682
new: 198.05374780501023

path: .metrics.halstead.difficulty
old: 4.188976377952756
new: 7.21875

path: .metrics.halstead.vocabulary
old: 134.0
new: 43.0

path: .metrics.halstead.bugs
old: 0.15750333208093892
new: 0.07256546252414976

path: .metrics.halstead.N2
old: 152.0
new: 42.0

Spaces Data

Minimal test - lines (15, 48)

path: .spaces[0].metrics.mi.mi_original
old: 129.391235541417
new: 81.91955167464224

path: .spaces[0].metrics.mi.mi_sei
old: 111.07306171748976
new: 56.01984736966466

path: .spaces[0].metrics.mi.mi_visual_studio
old: 75.667389205507
new: 47.90617056996622

path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 4.0

path: .spaces[0].metrics.halstead.N2
old: 6.0
new: 35.0

path: .spaces[0].metrics.halstead.n2
old: 5.0
new: 26.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 19.60964047443681
new: 160.2651804766787

path: .spaces[0].metrics.halstead.volume
old: 38.039100017307746
new: 390.7090024221712

path: .spaces[0].metrics.halstead.bugs
old: 0.006758335207185109
new: 0.0676736001808315

path: .spaces[0].metrics.halstead.effort
old: 91.2938400415386
new: 2892.74934485646

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.6341367062030674
new: 2.1368690730223823

path: .spaces[0].metrics.halstead.N1
old: 6.0
new: 40.0

path: .spaces[0].metrics.halstead.length
old: 12.0
new: 75.0

path: .spaces[0].metrics.halstead.level
old: 0.4166666666666667
new: 0.13506493506493503

path: .spaces[0].metrics.halstead.n1
old: 4.0
new: 11.0

path: .spaces[0].metrics.halstead.vocabulary
old: 9.0
new: 37.0

path: .spaces[0].metrics.halstead.difficulty
old: 2.4
new: 7.403846153846154

path: .spaces[0].metrics.halstead.time
old: 5.071880002307699
new: 160.70829693647

path: .spaces[0].metrics.loc.sloc
old: 4.0
new: 34.0

path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 1.0

path: .spaces[0].metrics.loc.ploc
old: 4.0
new: 24.0

path: .spaces[0].metrics.loc.blank
old: 0.0
new: 9.0

Code

namespace mozilla {
namespace widget {

class ToastNotificationHandler;

class ToastNotification final : public nsIAlertsService,
                                public nsIObserver,
                                public nsSupportsWeakReference {
 public:
  NS_DECL_NSIALERTSSERVICE
  NS_DECL_NSIOBSERVER
  NS_DECL_ISUPPORTS

  ToastNotification();

  nsresult Init();

  bool IsActiveHandler(const nsAString& aAlertName,
                       ToastNotificationHandler* aHandler);
  void RemoveHandler(const nsAString& aAlertName,
                     ToastNotificationHandler* aHandler);

  nsresult BackgroundDispatch(nsIRunnable* runnable);

 protected:
  virtual ~ToastNotification();

  nsRefPtrHashtable mActiveHandlers;

  nsCOMPtr mBackgroundThread;
};

}  // namespace widget
}  // namespace mozilla