Browse files

Update tracing (avoid exception)

  • Loading branch information...
1 parent 88ee3bd commit 43511bfe9e0d7fd73817f6bdd41fdea4cbdc86e6 @janodvarko janodvarko committed Aug 22, 2012
Showing with 11 additions and 3 deletions.
  1. +11 −3 extension/content/firebug/chrome/activation.js
View
14 extension/content/firebug/chrome/activation.js
@@ -85,9 +85,12 @@ Firebug.Activation = Obj.extend(Firebug.Module,
var hasAnnotation = Annotations.pageHasAnnotation(uri);
if (FBTrace.DBG_ACTIVATION)
- FBTrace.sysout("shouldCreateContext hasAnnotation "+hasAnnotation +
- " for "+uri.spec+" in "+browser.contentWindow.location +
- " using activateSameOrigin: "+Firebug.activateSameOrigin);
+ {
+ FBTrace.sysout("shouldCreateContext hasAnnotation " + hasAnnotation +
+ " for " + uri.spec + " in " +
+ (browser ? browser.contentWindow.location : "no browser") +
+ " using activateSameOrigin: " + Firebug.activateSameOrigin);
+ }
// Annotated, so return the value.
if (hasAnnotation)
@@ -97,9 +100,12 @@ Firebug.Activation = Obj.extend(Firebug.Module,
{
var dst = browser.FirebugLink.dst;
var dstURI = this.convertToURIKey(dst.spec, Firebug.activateSameOrigin);
+
if (FBTrace.DBG_ACTIVATION)
+ {
FBTrace.sysout("shouldCreateContext found FirebugLink pointing to " +
dstURI.spec, browser.FirebugLink);
+ }
if (dstURI && dstURI.equals(uri)) // and it matches us now
{
@@ -109,8 +115,10 @@ Firebug.Activation = Obj.extend(Firebug.Module,
if (srcURI)
{
if (FBTrace.DBG_ACTIVATION)
+ {
FBTrace.sysout("shouldCreateContext found FirebugLink pointing from " +
srcURI.spec, browser.FirebugLink);
+ }
// and it's on the same domain
if (srcURI.schemeIs("file") || (dstURI.host == srcURI.host))

0 comments on commit 43511bf

Please sign in to comment.