mozilla-b2g/gaia — pull request #18440 by leob2g (2014-04-18 01:31:22+00:00)
Title: Bug 988660 - Notification remove array item issue in notification_helper

Problem
1. 2 or more same app notification in status bar.
2. Click any notification. visible the app.
3. Press the Home button to go to the home screen.
4. Two notification objects are deleted.

Causation
1. Come 2 event(click, close) when click notification in status bar
2. Two calls the _forget function.
3. remove the notification object. using Array.splice()
// this._referencesArray.splice(this._referencesArray.indexOf(notification), 1);
4. delete the notification objects that match the click event.
5. but close event, delete the other notification object.
// because, Array.splice(-1, 1); <- start < 0
// actualStart = Max(len + relativeStart, 0.0);