[webview_flutter_tizen] Implement getCookies and setCookie - #1176
Open
seungsoo47 wants to merge 1 commit into
Open
seungsoo47 wants to merge 1 commit into
seungsoo47 wants to merge 1 commit into
Conversation
Implement the cookie manager on top of the web engine cookie APIs. - getCookies calls ewk_view_get_cookies_for_url on the EWK backend and wv_view_get_cookies_for_url on the WV backend. Both engines return NULL for an empty jar, which is reported as no cookies. The EWK getter currently returns NULL even when cookies exist, an engine defect being fixed. - setCookie calls wv_cookie_manager_set_cookie_for_url on the WV backend, in both standalone and EWK wrapper mode, with a host-only line built like upstream Android. EWK has no setter and throws UnimplementedError. In EWK wrapper mode the engine's setter relies on its EWK and WV cookie manager handles sharing a layout; an explicit wrapper branch has been requested from the engine side. - Register the cookie method channel once in the plugin instead of per WebView. The per-WebView channel was destroyed when the constructor returned while its handler, which captured the WebView, stayed on the messenger, so a cookie call after that WebView was disposed reached freed memory. Calls now go to the most recently created WebView that has been initialized. - Apply tizenEnginePolicy before WV engine initialization by deferring wv_init() to the first WebView, and do not retry it once it fails. Verified on rpi4 (Tizen 10.1, EWK wrapper): an empty jar returns [], setCookie reaches the request Cookie header, getCookies reads it back with path filtering, and cookie calls keep working after the newer of two WebViews is disposed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
getCookiesto the cookie manager using the EWK and WV cookie getters.setCookieto the cookie manager on the WV backend.tizenEnginePolicybefore WV initialization.