MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / perform

Method perform

Il2cppHook/_Ufunc.js:10665–10685  ·  view source on GitHub ↗

Attaches the caller thread to Il2Cpp domain and executes the given block.

(block)

Source from the content-addressed store, hash-verified

10663 }
10664 /** Attaches the caller thread to Il2Cpp domain and executes the given block. */
10665 static async perform(block) {
10666 await this.initialize();
10667 let thread = this.currentThread;
10668 const isForeignThread = thread == null;
10669 if (thread == null) {
10670 thread = Il2Cpp.Domain.attach();
10671 }
10672 try {
10673 const result = block();
10674 return result instanceof Promise ? await result : result;
10675 }
10676 catch (e) {
10677 globalThis.console.log(e);
10678 throw e;
10679 }
10680 finally {
10681 if (isForeignThread) {
10682 thread.detach();
10683 }
10684 }
10685 }
10686 /** Creates a new `Il2Cpp.Tracer` instance. */
10687 static trace() {
10688 return new Il2Cpp.Tracer();

Callers 15

_Ufunc.jsFile · 0.80
getPkgNameFunction · 0.80
classLoaderManagerClass · 0.80
fillCacleMethod · 0.80
findJavaClassFunction · 0.80
showAllClassesMethodsFunction · 0.80
showAllClassesFunction · 0.80
showSpecificClassMethodsFunction · 0.80
HookMotionEventFunction · 0.80
setClickFunction · 0.80
getApkInfoFunction · 0.80
getLibPathFunction · 0.80

Calls 3

initializeMethod · 0.95
detachMethod · 0.80
attachMethod · 0.45

Tested by

no test coverage detected