Skip to content

Commit

Permalink
src: hopefully satisfy secretive format-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen committed Apr 17, 2022
1 parent 778240f commit 72b7298
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/api/environment.cc
Expand Up @@ -255,7 +255,8 @@ void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) {
isolate->SetAllowWasmCodeGenerationCallback(allow_wasm_codegen_cb);

Mutex::ScopedLock lock(node::per_process::cli_options_mutex);
if (per_process::cli_options->get_per_isolate_options()->get_per_env_options()
if (per_process::cli_options->get_per_isolate_options()
->get_per_env_options()
->experimental_fetch) {
isolate->SetWasmStreamingCallback(wasm_web_api::StartStreamingCompilation);
}
Expand Down
2 changes: 1 addition & 1 deletion src/env.h
Expand Up @@ -552,7 +552,7 @@ constexpr size_t kFsStatsBufferLength =
V(udp_constructor_function, v8::Function) \
V(url_constructor_function, v8::Function) \
V(wasm_streaming_compilation_impl, v8::Function) \
V(wasm_streaming_object_constructor, v8::Function) \
V(wasm_streaming_object_constructor, v8::Function)

class Environment;
struct AllocatedBuffer;
Expand Down
6 changes: 3 additions & 3 deletions src/node_wasm_web_api.cc
Expand Up @@ -95,8 +95,8 @@ void WasmStreamingObject::Push(
}

// Forward the data to V8. Internally, V8 will make a copy.
obj->streaming_->OnBytesReceived(
static_cast<const uint8_t*>(bytes) + offset, size);
obj->streaming_->OnBytesReceived(static_cast<const uint8_t*>(bytes) + offset,
size);
obj->wasm_size_ += size;
}

Expand Down Expand Up @@ -150,7 +150,7 @@ void StartStreamingCompilation(
// instantiateStreaming).
v8::Local<v8::Function> impl = env->wasm_streaming_compilation_impl();
CHECK(!impl.IsEmpty());
v8::Local<v8::Value> args[] = { obj, info[0] };
v8::Local<v8::Value> args[] = {obj, info[0]};

// Hand control to the JavaScript implementation. It should never throw an
// error, but if it does, we leave it to the calling V8 code to handle that
Expand Down
3 changes: 1 addition & 2 deletions src/node_wasm_web_api.h
Expand Up @@ -44,8 +44,7 @@ class WasmStreamingObject final : public BaseObject {
// This is a v8::WasmStreamingCallback implementation that must be passed to
// v8::Isolate::SetWasmStreamingCallback when setting up the isolate in order to
// enable the WebAssembly.(compile|instantiate)Streaming APIs.
void StartStreamingCompilation(
const v8::FunctionCallbackInfo<v8::Value>& args);
void StartStreamingCompilation(const v8::FunctionCallbackInfo<v8::Value>& args);

} // namespace wasm_web_api
} // namespace node
Expand Down

0 comments on commit 72b7298

Please sign in to comment.