Skip to content

Commit

Permalink
remove "bareness"
Browse files Browse the repository at this point in the history
angrymouse committed Jun 20, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent aaab69e commit f07c684
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bindings.cpp
Original file line number Diff line number Diff line change
@@ -212,8 +212,8 @@ void create_and_associate_thread(duk_context *ctx)
duk_context *newCtx = duk_create_heap(duk_gas_respecting_alloc_function, duk_gas_respecting_realloc_function, duk_gas_respecting_free_function, newHeapConfig, (duk_fatal_function)fatal_handler);
newHeapConfig->ctx = (void *)newCtx;

duk_push_bare_object(newCtx);
duk_set_global_object(newCtx);
// duk_push_bare_object(newCtx);
// duk_set_global_object(newCtx);

newGasData->gas_limit = newGasLimit;
newGasData->mem_cost_per_byte = newMemCostPerByte;
@@ -351,8 +351,8 @@ napi_value create_context(napi_env env, napi_callback_info info)
return nullptr;
}
heapConfig->ctx = (void *)ctx;
duk_push_bare_object(ctx);
duk_set_global_object(ctx);
// duk_push_bare_object(ctx);
// duk_set_global_object(ctx);
gasData->gas_limit = gas_limit;
gasData->mem_cost_per_byte = mem_cost_per_byte;
gasData->gas_used = 0; // we don't really want to count warmup as a used gas as it's not dependent on usercode

0 comments on commit f07c684

Please sign in to comment.