In obfuscated code, JSO detection looks for object.tM == nullMethod. If nullMethod is obfuscated as function tM(){}, and someone uses global 'this' (Window or Self object for webworkers), then this.tM == tM even though 'this' isn't a Java object. This is caused by global scope functions appearing as properties in window/self.

This patch prevents the obfuscator from using 'tM' for root-scope functions.

Review by: dstockwell@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10838 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsRootScope.java b/dev/core/src/com/google/gwt/dev/js/ast/JsRootScope.java
index 3ceb8be..11df9f1 100644
--- a/dev/core/src/com/google/gwt/dev/js/ast/JsRootScope.java
+++ b/dev/core/src/com/google/gwt/dev/js/ast/JsRootScope.java
@@ -331,6 +331,9 @@
       // GWT-defined identifiers
       "$wnd", "$doc", "$moduleName", "$moduleBase", "$gwt_version", "$sessionId",
 
+      // typeMarker 'tM' field will break JSO detection on window object if nullMethod is called 'tM'
+      "tM",
+
       // Identifiers used by JsStackEmulator; later set to obfuscatable
       "$stack", "$stackDepth", "$location",