[gnome-documents] documents: immediately close thumbnail streams
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] documents: immediately close thumbnail streams
- Date: Thu, 5 Jul 2012 18:10:29 +0000 (UTC)
commit 332eaaf2ab28a7c5324c8d0500e6ee0654c5242a
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu Jul 5 14:07:13 2012 -0400
documents: immediately close thumbnail streams
So that we don't risk leaking those FDs if for some reason the GC
doesn't kick in.
https://bugzilla.gnome.org/show_bug.cgi?id=679376
src/documents.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 3dc9ba9..cf2c60d 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -494,11 +494,15 @@ const DocCommon = new Lang.Class({
function(object, res) {
try {
this.pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(res);
+
this.thumbnailed = true;
this.checkEffectsAndUpdateInfo();
} catch (e) {
this._failedThumbnailing = true;
}
+
+ // close the underlying stream immediately
+ stream.close_async(0, null, null);
}));
} catch (e) {
this._failedThumbnailing = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]