Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/child/elemHide.js

Issue 29347785: Issue 4243 - NS_ERROR_ILLEGAL_VALUE exception in utils.getFrames() (Closed)
Patch Set: Created July 14, 2016, 1:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/child/elemHide.js
===================================================================
--- a/lib/child/elemHide.js
+++ b/lib/child/elemHide.js
@@ -320,16 +320,27 @@ let observer = {
});
},
observe: function(subject, topic, data)
{
if (topic != this.topic)
return;
+ if (!subject.location || !subject.location.href)
+ {
+ // The window is in an invalid state - delay processing until it's ready.
Thomas Greiner 2016/07/14 14:19:21 What are the reasons for the window being in an in
Wladimir Palant 2016/07/14 15:19:42 It seems that Nightly change the initialization se
+ Utils.runAsync(() =>
+ {
+ if (!Cu.isDeadWrapper(subject))
+ this.observe(subject, topic, data)
+ });
+ return;
+ }
+
port.emitWithResponse("elemhideEnabled", {
frames: getFrames(subject),
isPrivate: isPrivate(subject)
}).then(({
enabled, contentType, docDomain, thirdParty, location, filter,
filterType
}) =>
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld