+++ This bug was initially created as a clone of Bug #202894 +++
Implementation of RemoteWebInspectorProxy::platformSave() is missing.
Created attachment 384351 [details]
Comment on attachment 384351 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=384351&action=review
> + data = out.data();
You can't do this, out is going to be freed after the if, so data will point to freed data.
> + data = content.utf8().data();
More ore less the same here, because the CString returned by utf8() is a temporary.
> + dataLength = content.utf8().length();
And we don't want to convert to utf8 twice either.
> + 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]
Committed r253678: <https://trac.webkit.org/changeset/253678>