Closed Bug 1712379 Opened 3 years ago Closed 3 years ago

sTreatMouseAsTouch needs to be initialized lazily

Categories

(GeckoView :: General, defect)

Unspecified
All
defect

Tracking

(firefox88 unaffected, firefox89 unaffected, firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox88 --- unaffected
firefox89 --- unaffected
firefox90 --- fixed

People

(Reporter: agi, Assigned: agi)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

We call initMouseAsTouch when creating GeckoSession, normally this happens after a GeckoRuntime has been created so GeckoAppShell.getApplicationContext() will return a non-null value, but if the GeckoSession is created before then, that method will return null causing a NullPointerException (a AC unit test does that).

Regressed by: 1701269
Has Regression Range: --- → yes
Summary: initMouseAsTouch needs to be initialized lazily → sTreatMouseAsTouch needs to be initialized lazily

We call initMouseAsTouch when creating GeckoSession, normally this happens
after a GeckoRuntime has been created, so GeckoAppShell.getApplicationContext()
will return a non-null value.

If the GeckoSession is created before then, however, that method will return
null causing a NullPointerException (a AC unit test does that).

We fix this problem by initializing sTreatMouseAsTouch lazily, and not assuming
that the Context is present.

Assignee: nobody → agi
Status: NEW → ASSIGNED
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/mozilla-central/rev/b5575ecba379
Initialize sTreatMouseAsTouch lazily. r=owlish, a=RyanVM
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Keywords: regression
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: