8169881: Remove implicit Handle conversions oop->Handle

Pass THREAD to Handle as argument instead of implicit Thread::current() call.

Reviewed-by: dholmes, sspitsyn
This commit is contained in:
Coleen Phillimore 2017-02-15 22:59:57 -05:00
parent b1171ce431
commit 0b3bc5c4f0
65 changed files with 424 additions and 397 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -198,7 +198,7 @@ static void define_javabase_module(jobject module, jstring version,
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Class loader must be the boot class loader");
}
Handle h_loader = Handle(THREAD, loader);
Handle h_loader(THREAD, loader);
// Ensure the boot loader's PackageEntryTable has been created
PackageEntryTable* package_table = get_package_entry_table(h_loader, CHECK);
@ -320,7 +320,7 @@ void Modules::define_module(jobject module, jstring version,
// Only modules defined to either the boot or platform class loader, can define a "java/" package.
if (!h_loader.is_null() &&
!SystemDictionary::is_platform_class_loader(h_loader) &&
!SystemDictionary::is_platform_class_loader(h_loader()) &&
strncmp(package_name, JAVAPKG, JAVAPKG_LEN) == 0) {
const char* class_loader_name = SystemDictionary::loader_name(h_loader());
StringUtils::replace_no_expand(package_name, "/", ".");
@ -482,7 +482,7 @@ void Modules::set_bootloader_unnamed_module(jobject module, TRAPS) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"Class loader must be the boot class loader");
}
Handle h_loader = Handle(THREAD, loader);
Handle h_loader(THREAD, loader);
log_debug(modules)("set_bootloader_unnamed_module(): recording unnamed module for boot loader");