Skip to content

Commit a68b9ac

Browse files
committed
Fix lint errors
1 parent d8960ac commit a68b9ac

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/wasm.cc

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,16 @@ void WasmBase::finishShutdown() {
446446
}
447447
}
448448

449-
bool canary(std::shared_ptr<WasmHandleBase> &wasm_handle, const std::shared_ptr<PluginBase> &plugin,
449+
bool canary(std::shared_ptr<WasmHandleBase> &wasm_handle, const std::shared_ptr<PluginBase> &plugin,
450450
const WasmHandleCloneFactory &clone_factory) {
451451
auto configuration_canary_handle = clone_factory(wasm_handle);
452452
if (!configuration_canary_handle) {
453453
wasm_handle->wasm()->fail(FailState::UnableToCloneVm, "Failed to clone Base Wasm");
454454
return false;
455455
}
456456
if (!configuration_canary_handle->wasm()->initialize()) {
457-
configuration_canary_handle->wasm()->fail(FailState::UnableToInitializeCode, "Failed to initialize Wasm code");
457+
configuration_canary_handle->wasm()->fail(FailState::UnableToInitializeCode,
458+
"Failed to initialize Wasm code");
458459
return false;
459460
}
460461
auto *root_context = configuration_canary_handle->wasm()->start(plugin);
@@ -490,7 +491,7 @@ std::shared_ptr<WasmHandleBase> createWasm(const std::string &vm_key, const std:
490491
base_wasms->erase(it);
491492
}
492493
}
493-
if (!wasm_handle) {
494+
if (!wasm_handle) {
494495
wasm_handle = factory(vm_key);
495496
if (!wasm_handle) {
496497
return nullptr;
@@ -499,22 +500,20 @@ std::shared_ptr<WasmHandleBase> createWasm(const std::string &vm_key, const std:
499500
(*base_wasms)[vm_key] = wasm_handle;
500501
}
501502
}
502-
503503
if (is_new_wasm) {
504504
if (!wasm_handle->wasm()->load(code, allow_precompiled)) {
505505
wasm_handle->wasm()->fail(FailState::UnableToInitializeCode, "Failed to load Wasm code");
506506
return nullptr;
507507
}
508508
if (!wasm_handle->wasm()->initialize()) {
509-
wasm_handle->wasm()->fail(FailState::UnableToInitializeCode, "Failed to initialize Wasm code");
509+
wasm_handle->wasm()->fail(FailState::UnableToInitializeCode,
510+
"Failed to initialize Wasm code");
510511
return nullptr;
511512
}
512513
}
513-
514514
if (!canary(wasm_handle, plugin, clone_factory)) {
515515
return nullptr;
516516
}
517-
518517
return wasm_handle;
519518
};
520519

0 commit comments

Comments
 (0)