-
-
Notifications
You must be signed in to change notification settings - Fork 133
feat(core): expose km_core_state_options_update to WASM 🍪 🎼
#15438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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