feat(core): expose km_core_state_options_update to WASM 🍪 🎼#15438
feat(core): expose km_core_state_options_update to WASM 🍪 🎼#15438ermshiperete merged 3 commits intoepic/web-corefrom
km_core_state_options_update to WASM 🍪 🎼#15438Conversation
Part-of: #13426 Test-bot: skip
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
km_core_state_options_update to WASMkm_core_state_options_update to WASM 🎼
km_core_state_options_update to WASM 🎼km_core_state_options_update to WASM 🍪 🎼
| } | ||
|
|
||
| int | ||
| km_core_state_options_update_wasm( |
There was a problem hiding this comment.
Does this get added to /core/docs/api/state.md?
(I dunno if that's the right doc)
There was a problem hiding this comment.
There was a problem hiding this comment.
We are not currently adding extra docs for _wasm versions of existing functions... but we could
| } | ||
|
|
||
| int | ||
| km_core_state_options_update_wasm( |
There was a problem hiding this comment.
We are not currently adding extra docs for _wasm versions of existing functions... but we could
| km_core_state const *state, | ||
| const std::vector<km_core_option_item_wasm>& new_options | ||
| ) { | ||
| km_core_option_item* options_c = new km_core_option_item[new_options.size() + 1]; |
There was a problem hiding this comment.
this needs to be freed at the end of the function
core/src/wasm.cpp
Outdated
| options_c[i].value = new_options[i].value.c_str(); | ||
| options_c[i].scope = new_options[i].scope; | ||
| } | ||
| options_c[new_options.size()] = {nullptr, nullptr, 0}; |
There was a problem hiding this comment.
We have a constant for this:
| options_c[new_options.size()] = {nullptr, nullptr, 0}; | |
| options_c[new_options.size()] = KM_CORE_OPTIONS_END; |
Test-bot: skip
|
Baseline tests fail because the expiry time of cookies is set to the past. Will be fixed with #15472. |
Part-of: #13426
Test-bot: skip