From: Youngcheol Kang Date: Wed, 21 Dec 2016 11:31:11 +0000 (+0900) Subject: fixup! Apply mime_override_callback for specific mimetype X-Git-Tag: submit/tizen_3.0/20161223.025538~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F106753%2F1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git fixup! Apply mime_override_callback for specific mimetype When the mime is empty, the callback should be released to prevent the crash issue. Bug: http://suprem.sec.samsung.net/jira/browse/TSAM-11333 Change-Id: Iaec07731e0c4a092cce161f3d39dc4bac18c2d22 Signed-off-by: Youngcheol Kang --- diff --git a/runtime/browser/web_view_impl.cc b/runtime/browser/web_view_impl.cc index b7d36eb..ddc4816 100644 --- a/runtime/browser/web_view_impl.cc +++ b/runtime/browser/web_view_impl.cc @@ -117,6 +117,10 @@ void WebViewImpl::LoadUrl(const std::string& url, const std::string& mime) { return view->mime_set_cb_(url, mime, new_mime, data); }; ewk_context_mime_override_callback_set(context_, mime_override_cb, this); + } else { + // In order to prevent crash issue, the callback should be released + // when the mime is empty. + ewk_context_mime_override_callback_set(context_, nullptr, nullptr); } ewk_view_url_set(ewk_view_, url.c_str()); }