The function os::safe_for_sender currently takes a JavaThread pointer as argument, but only uses information in the parent class for JavaThread - Thread.
The code should be refcatored to make it work with all kinds of threads, not only JavaThreads.
The code should be refcatored to make it work with all kinds of threads, not only JavaThreads.