exceptions in mouse_event_shim.js

RESOLVED INVALID

Status

Firefox OS
Gaia
RESOLVED INVALID
5 years ago
3 years ago

People

(Reporter: djf, Assigned: djf)

Tracking

unspecified
x86
Mac OS X

Firefox Tracking Flags

(blocking-b2g:-, b2g18+)

Details

(Assignee)

Description

5 years ago
I just saw a bunch of these errors in my logcat:

[JavaScript Error: "TypeError: a is null" {file: "app://music.gaiamobile.org/shared/js/mouse_event_shim.js" line: 188}]

They were happening while I tried to scroll over a UI that was being rebuilt and destroyed over and over.

I think they're happening because of this loop and another like it:

    for (var e = oldtarget; !contains(e, newtarget); e = e.parentNode) {
      emitEvent('mouseleave', e, touch, newtarget);
    }

The loop condition should be e && !contains(e, newtarget). In the contains method, the first argument is known as a, so we're calling this at the top of the tree.

It will be a trivial and very safe fix, and if I don't throw an exception on every touchmove event I might get better performance.
(Assignee)

Comment 1

5 years ago
Nominating as a blocker because the fix is trivial and mouse_event_shim.js is a pretty critical piece of our code, and because I'm really embarassed by this!
blocking-b2g: --- → tef?
(Assignee)

Updated

5 years ago
Assignee: nobody → dflanagan
Unless there's a significant user impact you can call out here, we don't need to block here but can track for b2g18 and take a low risk landing on branch when ready.
blocking-b2g: tef? → -
tracking-b2g18: --- → +
(Assignee)

Comment 3

3 years ago
mouse_event_shim.js no longer exists, so closing this.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.