| 109 | } |
| 110 | |
| 111 | Status LibCache::InitInternal(bool external_fe) { |
| 112 | if (external_fe) { |
| 113 | LOG(INFO) << "Library cache is using shared object for process handle"; |
| 114 | RETURN_IF_ERROR(DynamicOpen("libfesupport.so", ¤t_process_handle_)); |
| 115 | } else if (TestInfo::is_fe_test()) { |
| 116 | // In the FE tests, nullptr gives the handle to the java process. |
| 117 | // Explicitly load the fe-support shared object. |
| 118 | string fe_support_path; |
| 119 | PathBuilder::GetFullBuildPath("service/libfesupport.so", &fe_support_path); |
| 120 | RETURN_IF_ERROR(DynamicOpen(fe_support_path.c_str(), ¤t_process_handle_)); |
| 121 | } else { |
| 122 | RETURN_IF_ERROR(DynamicOpen(nullptr, ¤t_process_handle_)); |
| 123 | } |
| 124 | DCHECK(current_process_handle_ != nullptr) |
| 125 | << "We should always be able to get current process handle."; |
| 126 | return Status::OK(); |
| 127 | } |
| 128 | |
| 129 | LibCacheEntry::~LibCacheEntry() { |
| 130 | if (shared_object_handle != nullptr) { |
no test coverage detected