Closed Bug 1010238 Opened 11 years ago Closed 7 years ago

TypeError: evt is null when new window is dismissed

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: daleharvey, Unassigned)

Details

(Whiteboard: [systemsfe])

No description provided.
We currently use https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/browser.js#L16 to open new windows via the rocketbar, when a window opened this way is dismissed we get an error at the console E/GeckoConsole( 1807): [JavaScript Error: "TypeError: evt is null" {file: "app://system.gaiamobile.org/js/modal_dialog.js" line: 231}] Windows opened this way have no origin, I suspect we should update places that check for origin equality and put a null check in there (apps with no origin should never be considered shared), but I am not certain.
Flags: needinfo?(alive)
I just wonder why creating a appWindow will trigger modal_dialog, could you print out the call stack?
Flags: needinfo?(alive)
It isnt the appWindow being created thats triggering modal dialog, its the app that has been created being put in the background, thats fires an `appwillclose` event @ https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/modal_dialog.js#L107, the origin check passes with evt.detail.origin being undefined
Assignee: nobody → dale
Whiteboard: [systemsfe]
Not currently working on this, it can only be hit on 2.1 and currently getting 2.0 bugs sorted Noting for the future fix for this is to put a null check for the origin @ https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/modal_dialog.js#L109, I think thats the correct fix, windows the user opens do not have an origin. (giving them the search app origin, what the usual window.open behaviour would be, would mean we could only open one window) There may be more places we need to check for null origins
Assignee: dale → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.