Bug 1188590: Don't sync dispatch if we're already on main. r=snorp, a=abillings

This commit is contained in:
Byron Campen [:bwc] 2015-07-28 16:56:34 -05:00
parent d4eafcc626
commit 22a0cef241

View File

@ -55,6 +55,10 @@ extern "C" {
__attribute__ ((visibility("default")))
jclass
jsjni_GetGlobalClassRef(const char *className) {
if (NS_IsMainThread()) {
return __jsjni_GetGlobalClassRef(className);
}
nsCOMPtr<nsIThread> mainThread;
mozilla::DebugOnly<nsresult> rv = NS_GetMainThread(getter_AddRefs(mainThread));
MOZ_ASSERT(NS_SUCCEEDED(rv));