Commit 1195f3b0 authored by Raine Makelainen's avatar Raine Makelainen Committed by chriadam

[embedlite-components] Cleanup / fix window close chrome event handlers code

parent 79501b3b
......@@ -53,7 +53,10 @@ EmbedLiteOrientationChangeHandler.prototype = {
},
onWindowClosed: function(aWindow) {
Services.embedlite.chromeEventHandler(aWindow).addEventListener("DOMContentLoaded", this._orientationListeners[aWindow], false);
let chromeEventHandler = Services.embedlite.chromeEventHandler(aWindow);
if (chromeEventHandler) {
chromeEventHandler.removeEventListener("DOMContentLoaded", this._orientationListeners[aWindow], false);
}
delete this._orientationListeners[aWindow];
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment