提交 ef2371f6 编写于 作者: A Andrew Scheidecker 提交者: Matt Witherspoon

Fix invokes after an invalid module in a test script reporting redundant errors

上级 11f9cfb9
......@@ -148,15 +148,15 @@ bool processAction(TestScriptState& state,Action* action,Result& outResult)
ModuleInstance* moduleInstance = getModuleContextByInternalName(state,invokeAction->locus,"invoke",invokeAction->internalModuleName);
// A null module instance at this point indicates a module that failed to link or instantiate, so don't produce further errors.
if(moduleInstance)
{
// Find the named export in the module instance.
auto functionInstance = asFunctionNullable(getInstanceExport(moduleInstance,invokeAction->exportName));
if(!functionInstance) { testErrorf(state,invokeAction->locus,"couldn't find exported function with name: %s",invokeAction->exportName.c_str()); return false; }
if(!moduleInstance) { return false; }
// Find the named export in the module instance.
auto functionInstance = asFunctionNullable(getInstanceExport(moduleInstance,invokeAction->exportName));
if(!functionInstance) { testErrorf(state,invokeAction->locus,"couldn't find exported function with name: %s",invokeAction->exportName.c_str()); return false; }
// Execute the invoke
outResult = invokeFunction(functionInstance,invokeAction->arguments);
// Execute the invoke
outResult = invokeFunction(functionInstance,invokeAction->arguments);
}
return true;
}
case ActionType::get:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册