Skip to content

Commit 79ee3d1

Browse files
authored
Fix indentation in libembind.js. NFC (#23942)
1 parent b9e5eef commit 79ee3d1

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

src/lib/libembind.js

+23-23
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,10 @@ var LibraryEmbind = {
775775
var isClassMethodFunc = (argTypes[1] !== null && classType !== null);
776776

777777
// Free functions with signature "void function()" do not need an invoker that marshalls between wire types.
778-
// TODO: This omits argument count check - enable only at -O3 or similar.
779-
// if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
780-
// return FUNCTION_TABLE[fn];
781-
// }
778+
// TODO: This omits argument count check - enable only at -O3 or similar.
779+
// if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
780+
// return FUNCTION_TABLE[fn];
781+
// }
782782

783783

784784
// Determine if we need to use a dynamic stack to store the destructors for the function parameters.
@@ -851,36 +851,36 @@ var LibraryEmbind = {
851851
return onDone(rv);
852852
};
853853
#else
854-
// Builld the arguments that will be passed into the closure around the invoker
855-
// function.
856-
var closureArgs = [humanName, throwBindingError, cppInvokerFunc, cppTargetFunc, runDestructors, argTypes[0], argTypes[1]];
854+
// Builld the arguments that will be passed into the closure around the invoker
855+
// function.
856+
var closureArgs = [humanName, throwBindingError, cppInvokerFunc, cppTargetFunc, runDestructors, argTypes[0], argTypes[1]];
857857
#if EMSCRIPTEN_TRACING
858-
closureArgs.push(Module);
858+
closureArgs.push(Module);
859859
#endif
860-
for (var i = 0; i < argCount - 2; ++i) {
861-
closureArgs.push(argTypes[i+2]);
862-
}
860+
for (var i = 0; i < argCount - 2; ++i) {
861+
closureArgs.push(argTypes[i+2]);
862+
}
863863
#if ASYNCIFY == 1
864-
closureArgs.push(Asyncify);
864+
closureArgs.push(Asyncify);
865865
#endif
866-
if (!needsDestructorStack) {
867-
for (var i = isClassMethodFunc?1:2; i < argTypes.length; ++i) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
868-
if (argTypes[i].destructorFunction !== null) {
869-
closureArgs.push(argTypes[i].destructorFunction);
866+
if (!needsDestructorStack) {
867+
for (var i = isClassMethodFunc?1:2; i < argTypes.length; ++i) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
868+
if (argTypes[i].destructorFunction !== null) {
869+
closureArgs.push(argTypes[i].destructorFunction);
870+
}
870871
}
871872
}
872-
}
873873
#if ASSERTIONS
874-
closureArgs.push(checkArgCount, minArgs, expectedArgCount);
874+
closureArgs.push(checkArgCount, minArgs, expectedArgCount);
875875
#endif
876876

877877
#if EMBIND_AOT
878-
var signature = createJsInvokerSignature(argTypes, isClassMethodFunc, returns, isAsync);
879-
var invokerFn = InvokerFunctions[signature](...closureArgs);
878+
var signature = createJsInvokerSignature(argTypes, isClassMethodFunc, returns, isAsync);
879+
var invokerFn = InvokerFunctions[signature](...closureArgs);
880880
#else
881-
let [args, invokerFnBody] = createJsInvoker(argTypes, isClassMethodFunc, returns, isAsync);
882-
args.push(invokerFnBody);
883-
var invokerFn = newFunc(Function, args)(...closureArgs);
881+
let [args, invokerFnBody] = createJsInvoker(argTypes, isClassMethodFunc, returns, isAsync);
882+
args.push(invokerFnBody);
883+
var invokerFn = newFunc(Function, args)(...closureArgs);
884884
#endif
885885
#endif
886886
return createNamedFunction(humanName, invokerFn);

0 commit comments

Comments
 (0)