Closed
Bug 1134630
Opened 9 years ago
Closed 8 years ago
browserWindows.length is undefined with no windows open
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jamie, Unassigned)
Details
(Whiteboard: [good first bug])
Attachments
(3 files, 1 obsolete file)
978 bytes,
patch
|
mbrubeck
:
review-
|
Details | Diff | Splinter Review |
1.07 KB,
patch
|
Details | Diff | Splinter Review | |
10.00 KB,
application/x-tar
|
jamie
:
feedback+
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/8.0.3 Safari/600.3.18 Steps to reproduce: 1Password receives messages over a WebSocket connection, which can occur whether there are tabs or windows open or not. When we receive a message to open a URL, we need to check if there are any windows open in order to understand how to handle the message. So, we followed the documentation here[^1] and used windows.browserWindows.length [^1]: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/windows#browserWindows Actual results: With no windows open, windows.browserWindows.length returns undefined Expected results: windows.browserWindows.length should return 0 (zero)
Updated•9 years ago
|
Severity: normal → minor
Priority: -- → P2
Updated•9 years ago
|
Whiteboard: [good first bug]
Comment 2•9 years ago
|
||
Simply initialized windows list to have length 0.
Attachment #8589975 -
Flags: review+
Comment 3•9 years ago
|
||
I'll like to work on this bug. I'm new on Bugzilla.
Comment 4•8 years ago
|
||
Comment on attachment 8589975 [details] [diff] [review] windowLength.patch Sorry, it looks like this patch was not generated correctly and does not contain any changes (except an extra space character added in utils.js).
Attachment #8589975 -
Flags: review+ → review-
Comment 5•8 years ago
|
||
As no one has taken this bug, I would like to work on it.
Comment 6•8 years ago
|
||
Initialized list.length to zero.Kindly review the patch and suggest modifications/further steps
Comment 7•8 years ago
|
||
Please review the patch and suggest further steps.
Attachment #8714061 -
Attachment is obsolete: true
Attachment #8718362 -
Flags: review?(mbrubeck)
Comment 8•8 years ago
|
||
Comment on attachment 8718362 [details] [diff] [review] ClosedWindowLength.patch Passing review to Mossop. Also, it looks like this patch might need to land in the addon-sdk Git repository first: https://github.com/mozilla/addon-sdk/blob/master/CONTRIBUTING.md
Attachment #8718362 -
Flags: review?(mbrubeck) → review?(dtownsend)
Comment 9•8 years ago
|
||
Comment on attachment 8718362 [details] [diff] [review] ClosedWindowLength.patch Review of attachment 8718362 [details] [diff] [review]: ----------------------------------------------------------------- I don't understand what effect this would have. Empty arrays already have a length of zero so this seems like it wouldn't do anything to me.
Attachment #8718362 -
Flags: review?(dtownsend)
Comment 10•8 years ago
|
||
Sorry guys, it might be irrelevant, but how we can have no windows opened while Firefox is opened?
Flags: needinfo?(jamie)
Comment 11•8 years ago
|
||
(In reply to Mohsen Keyhani from comment #10) > Sorry guys, it might be irrelevant, but how we can have no windows opened > while Firefox is opened? If you close all tabs there are no windows, however firefox is not closed. At least not on OS X and Linux, the application thread is still running
Comment 12•8 years ago
|
||
I was trying to replicate the bug on a Mac book with OS X El Capitan and Firefox 43.0.4 using this but I failed to do so. When I closed all the windows, it just printed 0 which is the expected behavior. Can anybody give me some more details about the situation in which this bug happens?
Attachment #8725002 -
Flags: feedback?(jamie)
Comment 13•8 years ago
|
||
(In reply to Mohsen Keyhani from comment #12) > Created attachment 8725002 [details] > Trying to replicate the bug, a bare-bone extension which prints the number > of open windows > > I was trying to replicate the bug on a Mac book with OS X El Capitan and > Firefox 43.0.4 using this but I failed to do so. When I closed all the > windows, it just printed 0 which is the expected behavior. Can anybody give > me some more details about the situation in which this bug happens? I have not been able to reproduce it either. Have you read the user story? States pretty explicit the user agent, and what happens
Reporter | ||
Comment 14•8 years ago
|
||
Thanks for the attention on this bug. I just tried reproducing it with a sample add-on and I wasn't able to reproduce it either at this time in Firefox 44.0.2. Perhaps something changed in Add-on SDK in the last year that affected this. I tried locating it but I still find the source pretty hard to navigate to find where things are initialized. I did notice, though, that there isn't a test specific to this scenario in the Add-on SDK, so perhaps that's something worth pursuing.
Flags: needinfo?(jamie)
Reporter | ||
Comment 15•8 years ago
|
||
Comment on attachment 8725002 [details]
Trying to replicate the bug, a bare-bone extension which prints the number of open windows
I'm no longer able to reproduce this bug either. It's been quite some time, so I think it's best to let it be considered moot and see if anything re-emerges.
Attachment #8725002 -
Flags: feedback?(jamie) → feedback-
Reporter | ||
Updated•8 years ago
|
Attachment #8725002 -
Flags: feedback- → feedback+
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•