Bug 1404198: Part 2d - Switch to NS_NewTimer* in widget. r=njn

MozReview-Commit-ID: G4S8q9DYPS0
This commit is contained in:
Kris Maglione
2017-10-15 23:12:54 -07:00
parent 7a77177f22
commit a90a3baebb
7 changed files with 17 additions and 19 deletions

View File

@@ -1992,8 +1992,8 @@ nsIWidget::SynthesizeNativeTouchTap(LayoutDeviceIntPoint aPoint, bool aLongTap,
int elapse = Preferences::GetInt("ui.click_hold_context_menus.delay",
TOUCH_INJECT_LONG_TAP_DEFAULT_MSEC);
if (!mLongTapTimer) {
mLongTapTimer = do_CreateInstance(NS_TIMER_CONTRACTID, &rv);
if (NS_FAILED(rv)) {
mLongTapTimer = NS_NewTimer();
if (!mLongTapTimer) {
SynthesizeNativeTouchPoint(pointerId, TOUCH_CANCEL,
aPoint, 0, 0, nullptr);
return NS_ERROR_UNEXPECTED;