With deprivileging, several modules of the runtime are mow defined to the platform class loader. VM::isSystemDomainLoader is extended to detect if the given class loader is boot loader or platform loader.
Webrev: http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8161121/webrev.00/index.html thanks Mandy