After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679682 - Update for change in g_output_stream_write_bytes()
Update for change in g_output_stream_write_bytes()
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
triaged
Depends on: 679662
Blocks:
 
 
Reported: 2012-07-10 13:09 UTC by Stef Walter
Modified: 2021-07-05 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Update for change in g_output_stream_write_bytes() (1.64 KB, patch)
2012-07-10 13:09 UTC, Stef Walter
needs-work Details | Review

Description Stef Walter 2012-07-10 13:09:02 UTC
 * g_output_stream_write_bytes() signature has changed, and it also
   writes all bytes out (unless error).
 * This code assumed it had the above behavior although that wasn't
   the case.
Comment 1 Stef Walter 2012-07-10 13:09:06 UTC
Created attachment 218415 [details] [review]
Update for change in g_output_stream_write_bytes()
Comment 2 Giovanni Campagna 2012-07-10 13:12:19 UTC
Review of attachment 218415 [details] [review]:

::: js/ui/extensionDownloader.js
@@ +83,3 @@
     let [file, stream] = Gio.File.new_tmp('XXXXXX.shell-extension.zip');
     let contents = message.response_body.flatten().as_bytes();
+    stream.output_stream.write_bytes(contents, null, null);

Looking at current gio master, I see

gssize   g_output_stream_write_bytes   (GOutputStream             *stream,
					GBytes                    *bytes,
					GCancellable              *cancellable,
					GError                   **error);

which translates to stream.write_bytes(bytes, cancellable) in JS, so this seems wrong.

Did you experience JS errors?
Comment 3 Stef Walter 2012-07-10 13:29:50 UTC
Sorry it wasn't more clear, but 'Depends on' bug is about a change to g_output_stream_write_bytes().
Comment 4 Giovanni Campagna 2012-07-10 13:46:46 UTC
Oh, I didn't see it.
However this patch is still wrong: that version of g_output_stream_write_bytes becomes
[result, bytes_written] = stream.write_bytes(bytes, cancellable)

(but see Dan's comments there)
Comment 5 GNOME Infrastructure Team 2021-07-05 14:47:00 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/

Thank you for your understanding and your help.