Permalink
Browse files

Better way to know if it is a content process. still needs to go away.

  • Loading branch information...
1 parent 65fa84f commit 4c76f84e278e17795e39e1326136142e6d5e1ee4 @eeejay committed Oct 18, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 content/content-script.js
@@ -10,6 +10,9 @@ var messageListeners = null;
var eventListeners = null;
var domWalker = null;
var stringBundle = null;
+var isContentProcess =
+ (Components.classes["@mozilla.org/xre/app-info;1"]
+ .getService(Components.interfaces.nsIXULRuntime).processType == 2);
try {
contentInit ();
@@ -168,8 +171,7 @@ function newNodeFunc (currentNode, reason) {
content.window.pageXOffset,
content.window.pageYOffset,
currentNode,
- // TODO: must be a better way to know if we are local.
- (content.location == "about:home"));
+ !isContentProcess);
sendAsyncMessage("TalkToMe:ShowBounds", { bounds: bounds });
}

0 comments on commit 4c76f84

Please sign in to comment.