8010943: guarantee(length == 0) failed: invalid method ordering length

Add DumpSharedSpaces to IF condition to handle verify during -Xshare:dump.

Reviewed-by: coleenp, zgu
1 file changed