+++ This bug was initially created as a clone of Bug #202894 +++ Implementation of RemoteWebInspectorProxy::platformSave() is missing.
Created attachment 384351 [details] Patch
Comment on attachment 384351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384351&action=review > Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:127 > + data = out.data(); You can't do this, out is going to be freed after the if, so data will point to freed data. > Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:130 > + data = content.utf8().data(); More ore less the same here, because the CString returned by utf8() is a temporary. > Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:131 > + dataLength = content.utf8().length(); And we don't want to convert to utf8 twice either. > Source/WebKit/UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp:137 > + if (g_file_set_contents(path.get(), data, dataLength, nullptr)) > + m_inspectorPage->process().send(Messages::RemoteWebInspectorUI::DidSave(path.get()), m_inspectorPage->webPageID()); You can use g_file_replace_contents_async(), instead of doing this synchronously.
I literally copied this from the non-remote implementation.
(In reply to Philippe Normand from comment #3) > I literally copied this from the non-remote implementation. I missed it there, let's fix that first then.
Created attachment 385957 [details] Patch
Committed r253678: <https://trac.webkit.org/changeset/253678>