summaryrefslogtreecommitdiff
path: root/src/core/hle/service/jit
diff options
context:
space:
mode:
authorGravatar Liam2023-12-24 19:20:43 -0500
committerGravatar Liam2023-12-24 19:20:43 -0500
commit5165ed9efd6e6593b969ce560c952e074f4d9e06 (patch)
tree59966aa2ac0bd9186f7358af41f3888cbf89ec16 /src/core/hle/service/jit
parentMerge pull request #12394 from liamwhite/per-process-memory (diff)
downloadyuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.gz
yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.tar.xz
yuzu-5165ed9efd6e6593b969ce560c952e074f4d9e06.zip
service: fetch objects from the client handle table
Diffstat (limited to 'src/core/hle/service/jit')
-rw-r--r--src/core/hle/service/jit/jit.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp
index 65851fc05..8648c76fa 100644
--- a/src/core/hle/service/jit/jit.cpp
+++ b/src/core/hle/service/jit/jit.cpp
@@ -188,7 +188,7 @@ public:
188 return; 188 return;
189 } 189 }
190 190
191 auto tmem{process->GetHandleTable().GetObject<Kernel::KTransferMemory>(tmem_handle)}; 191 auto tmem{ctx.GetObjectFromHandle<Kernel::KTransferMemory>(tmem_handle)};
192 if (tmem.IsNull()) { 192 if (tmem.IsNull()) {
193 LOG_ERROR(Service_JIT, "attempted to load plugin with invalid transfer memory handle"); 193 LOG_ERROR(Service_JIT, "attempted to load plugin with invalid transfer memory handle");
194 IPC::ResponseBuilder rb{ctx, 2}; 194 IPC::ResponseBuilder rb{ctx, 2};
@@ -356,11 +356,7 @@ public:
356 return; 356 return;
357 } 357 }
358 358
359 // Fetch using the handle table for the application process here, 359 auto process{ctx.GetObjectFromHandle<Kernel::KProcess>(process_handle)};
360 // since we are not multiprocess yet.
361 const auto& handle_table{system.ApplicationProcess()->GetHandleTable()};
362
363 auto process{handle_table.GetObject<Kernel::KProcess>(process_handle)};
364 if (process.IsNull()) { 360 if (process.IsNull()) {
365 LOG_ERROR(Service_JIT, "process is null for handle=0x{:08X}", process_handle); 361 LOG_ERROR(Service_JIT, "process is null for handle=0x{:08X}", process_handle);
366 IPC::ResponseBuilder rb{ctx, 2}; 362 IPC::ResponseBuilder rb{ctx, 2};
@@ -368,7 +364,7 @@ public:
368 return; 364 return;
369 } 365 }
370 366
371 auto rx_mem{handle_table.GetObject<Kernel::KCodeMemory>(rx_mem_handle)}; 367 auto rx_mem{ctx.GetObjectFromHandle<Kernel::KCodeMemory>(rx_mem_handle)};
372 if (rx_mem.IsNull()) { 368 if (rx_mem.IsNull()) {
373 LOG_ERROR(Service_JIT, "rx_mem is null for handle=0x{:08X}", rx_mem_handle); 369 LOG_ERROR(Service_JIT, "rx_mem is null for handle=0x{:08X}", rx_mem_handle);
374 IPC::ResponseBuilder rb{ctx, 2}; 370 IPC::ResponseBuilder rb{ctx, 2};
@@ -376,7 +372,7 @@ public:
376 return; 372 return;
377 } 373 }
378 374
379 auto ro_mem{handle_table.GetObject<Kernel::KCodeMemory>(ro_mem_handle)}; 375 auto ro_mem{ctx.GetObjectFromHandle<Kernel::KCodeMemory>(ro_mem_handle)};
380 if (ro_mem.IsNull()) { 376 if (ro_mem.IsNull()) {
381 LOG_ERROR(Service_JIT, "ro_mem is null for handle=0x{:08X}", ro_mem_handle); 377 LOG_ERROR(Service_JIT, "ro_mem is null for handle=0x{:08X}", ro_mem_handle);
382 IPC::ResponseBuilder rb{ctx, 2}; 378 IPC::ResponseBuilder rb{ctx, 2};