Revert "Revert "Make class loader context fail for unknown class loaders""

This reverts commit e9818ddd70565d52cc1cc93d6991d7e7ec2bc275.

Make class loader context fail for unknown class loaders

Update OatFileAssistant to fail the class loader check when getting an
unknown (null) class loader. The code is only use in GetDexoptNeeded paths
and does not affect the runtime behaviour.

This will enable dexoptanalyzer to provide the right answer for dex files
whose class loader changes often.

Test: test-art-host
Bug: 147208643

Change-Id: I2f8229fc25c018436c17439bdc9ac0899af25758
6 files changed