WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
204618
[GTK][WebInspector] Support for saving remote data
https://bugs.webkit.org/show_bug.cgi?id=204618
Summary
[GTK][WebInspector] Support for saving remote data
Philippe Normand
Reported
2019-11-26 06:54:50 PST
+++ This bug was initially created as a clone of
Bug #202894
+++ Implementation of RemoteWebInspectorProxy::platformSave() is missing.
Attachments
Patch
(3.19 KB, patch)
2019-11-26 06:59 PST
,
Philippe Normand
no flags
Details
Formatted Diff
Diff
Patch
(6.54 KB, patch)
2019-12-18 04:32 PST
,
Philippe Normand
cgarcia
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Philippe Normand
Comment 1
2019-11-26 06:59:35 PST
Created
attachment 384351
[details]
Patch
Carlos Garcia Campos
Comment 2
2019-11-26 07:24:02 PST
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.
Philippe Normand
Comment 3
2019-11-26 07:27:11 PST
I literally copied this from the non-remote implementation.
Carlos Garcia Campos
Comment 4
2019-11-26 08:25:12 PST
(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.
Philippe Normand
Comment 5
2019-12-18 04:32:43 PST
Created
attachment 385957
[details]
Patch
Philippe Normand
Comment 6
2019-12-18 04:49:11 PST
Committed
r253678
: <
https://trac.webkit.org/changeset/253678
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug