Skip to content

Commit

Permalink
[webview_flutter_tizen] Move ewk_init() before SetArguments()
Browse files Browse the repository at this point in the history
And add missing ewk_shutdown().
  • Loading branch information
JSUYA committed Jan 8, 2024
1 parent f2c3a71 commit 95f48e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## NEXT

* Move `ewk_init()` before `SetArguments()`.

## 0.9.0

* Update webivew_flutter to 4.4.2.
Expand Down
5 changes: 4 additions & 1 deletion packages/webview_flutter/tizen/src/webview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ void WebView::Dispose() {
&WebView::OnUrlChange);
evas_object_del(webview_instance_);
}

ewk_shutdown();
}

void WebView::Offset(double left, double top) {
Expand Down Expand Up @@ -286,6 +288,8 @@ void WebView::SetDirection(int direction) {
}

void WebView::InitWebView() {
ewk_init();

char* chromium_argv[] = {
const_cast<char*>("--disable-pinch"),
const_cast<char*>("--js-flags=--expose-gc"),
Expand All @@ -296,7 +300,6 @@ void WebView::InitWebView() {
EwkInternalApiBinding::GetInstance().main.SetArguments(chromium_argc,
chromium_argv);

ewk_init();
Ecore_Evas* evas = ecore_evas_new("wayland_egl", 0, 0, 1, 1, 0);

webview_instance_ = ewk_view_add(ecore_evas_get(evas));
Expand Down

0 comments on commit 95f48e2

Please sign in to comment.