I think you're running into type erasure. Every generic object parameter is really just java.lang.Object at runtime. I don't believe generics are exposed to JNI.
I've written JNI code but never attempted to use generic types from native code so I'm not certain. Googling has turned up no specific references or examples.
See Java VM Type Signatures for a reference to the type signatures used in JNI (and JSNI)
However, you may not need to pass a Java HashMap to Javascript anyway. Instead, consider using JSONObject and passing a native JavaScript object to your javascript code. It looks like this:
public void callFoo() {
JSONObject obj = new JSONObject();
obj.put("propertyName", new JSONString("properyValue"));
JavaScriptObject jsObj = obj.getJavaScriptObject();
nativeFoo(jsObj);
}
public native void nativeFoo(JavaScriptObject obj) /*-{
$wnd.alert(obj['propertyName']);
}-*/;
This gets compiled to roughly:
var obj = {'propertyName': 'propertyValue'};
$wnd.alert(obj['propertyName']);