Closed
Bug 1119832
Opened 9 years ago
Closed 9 years ago
Typo in apps/system/js/async_semaphore.js
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: max, Unassigned)
Details
Attachments
(1 file)
Constructor AsyncSemaphore tries to guard against being called without 'new' by the following test (https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/async_semaphore.js#L8): if (!this instanceof AsyncSemaphore) { return new AsyncSemaphore(); } Note, however, that '!' binds more tightly than 'instanceof', so the 'if' condition will always evaluate to 'false', rendering the guard ineffective.
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Comment on attachment 8553959 [details] [review] [PullReq] KevinGrandon:bug_1119832_async_semaphore_typo to mozilla-b2g:master Max - thank you for filing this bug. Tzu-Lin - could you give this a quick review? Just fixing the syntax and adding a quick unit test.
Attachment #8553959 -
Flags: review?(tzhuang)
Comment 3•9 years ago
|
||
Comment on attachment 8553959 [details] [review] [PullReq] KevinGrandon:bug_1119832_async_semaphore_typo to mozilla-b2g:master Nice catch, thanks
Attachment #8553959 -
Flags: review?(tzhuang) → review+
Comment 4•9 years ago
|
||
In master: https://github.com/mozilla-b2g/gaia/commit/0f662dffef27599443cfcd790c2b39190a2b35c8
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•