Commit graph

123 commits

Author SHA1 Message Date
Miklos Vajna
bd4d72d41f common: wrap TerminationFlag in a getter function to avoid ODR violation
Otherwise both loolwsd and unit-copy-paste.so would have a
TerminationFlag:

==11732==ERROR: AddressSanitizer: odr-violation (0x00000208f4a0):
  [1] size=1 'TerminationFlag' ../common/SigUtil.cpp:41:19
  [2] size=1 'TerminationFlag' common/SigUtil.cpp:41:19
These globals were registered at these points:
  [1]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f5df9cf18cb in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/test/../test/.libs/unit-copy-paste.so+0x60a8cb)

  [2]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0xe2b4fe in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/loolwsd+0xe2b4fe)

Change-Id: Ic620b143ecb77699f40676ff39d0fa7abceb34d5
2019-08-08 09:10:59 +02:00
Michael Meeks
9e791fb0d4 clipboard: persist selections for a while after a view closes.
re-factor ClientSession state to be a simpler state machine.
Have a nice disconnect / disconnected handshake on view close.

Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
2019-08-05 22:21:54 -04:00
Michael Meeks
fbd021958b clipboard: de-combine whole clipboard fetch from just text/html.
Now we can copy/paste smileys internally again.

Change-Id: Ibc6c77ccb9c501230947a7172cf591b2e12531b3
2019-08-05 21:44:29 -04:00
Michael Meeks
13469e8b00 clipboard - set it with a post now.
Change-Id: I6b9234988185984335408da502f479ccda8a95a7
2019-08-05 21:18:44 -04:00
Michael Meeks
245e509413 clipboard: start of rotating clipboard key management.
Change-Id: I8caab267ec5391e2cd7cb20907fa080111cc70dd
2019-08-05 21:16:37 -04:00
Michael Meeks
4a9de331ed Unit testing - add more hooks and helpers.
Change-Id: Ieb12699e3b012606eaa0be3cc94d6f9b58adc441
2019-08-05 21:08:01 -04:00
Miklos Vajna
717816d44d wsd: add new always_save_on_exit config option
The default behavior is unchanged: once the last editor exits, we still
only perform a save when the document is modified.

It's possible to opt in for the new behavior, though: in that case the
save after the exit of the last editor will happen even for unmodified
documents.

Change-Id: I14c17035a932cf952217f3b71fdef57fede0ce24
2019-06-06 11:48:54 +02:00
Miklos Vajna
1a41e368ad wsd: avoid UB in DocumentBroker::cancelTileRequests()
With this, it's possible to open a document and type keys with
sanitizers enabled.

/home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:323:9: runtime error: reference binding to null pointer of type 'TileCache'
    #0 0x911996 in std::unique_ptr<TileCache, std::default_delete<TileCache> >::operator*() const /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:323:2
    #1 0x8ecb2a in DocumentBroker::tileCache() /home/vmiklos/lode/dev/online/./wsd/DocumentBroker.hpp:265:37
    #2 0x8c6a63 in DocumentBroker::cancelTileRequests(std::shared_ptr<ClientSession> const&) /home/vmiklos/lode/dev/online/wsd/DocumentBroker.cpp:1586:37
    #3 0xb32b0e in ClientSession::_handleInput(char const*, int) /home/vmiklos/lode/dev/online/wsd/ClientSession.cpp:194:20
    #4 0xd45d3c in Session::handleMessage(bool, WSOpCode, std::vector<char, std::allocator<char> >&) /home/vmiklos/lode/dev/online/common/Session.cpp:219:13
    #5 0x768080 in WebSocketHandler::handleTCPStream(std::shared_ptr<StreamSocket> const&) /home/vmiklos/lode/dev/online/./net/WebSocketHandler.hpp:368:13
    #6 0x6f800d in WebSocketHandler::handleIncomingMessage(SocketDisposition&) /home/vmiklos/lode/dev/online/./net/WebSocketHandler.hpp:419:20
    #7 0xb2c644 in ClientSession::handleIncomingMessage(SocketDisposition&) /home/vmiklos/lode/dev/online/wsd/ClientSession.cpp:74:14
    #8 0xa6f641 in StreamSocket::handlePoll(SocketDisposition&, std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, int) /home/vmiklos/lode/dev/online/./net/Socket.hpp:1037:29
    #9 0x6ec63d in SocketPoll::poll(int) /home/vmiklos/lode/dev/online/./net/Socket.hpp:570:34
    #10 0x83af99 in DocumentBroker::pollThread() /home/vmiklos/lode/dev/online/wsd/DocumentBroker.cpp:387:16
    #11 0x8fc778 in DocumentBroker::DocumentBrokerPoll::pollingThread() /home/vmiklos/lode/dev/online/wsd/DocumentBroker.cpp:165:20
    #12 0xdff935 in SocketPoll::pollingThreadEntry() /home/vmiklos/lode/dev/online/net/Socket.cpp:184:9
    #13 0xe487bd in void std::__invoke_impl<void, void (SocketPoll::*)(), SocketPoll*>(std::__invoke_memfun_deref, void (SocketPoll::*&&)(), SocketPoll*&&) /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14
    #14 0xe482ca in std::__invoke_result<void (SocketPoll::*)(), SocketPoll*>::type std::__invoke<void (SocketPoll::*)(), SocketPoll*>(void (SocketPoll::*&&)(), SocketPoll*&&) /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14
    #15 0xe4817d in decltype(std::__invoke(_S_declval<0ul>(), _S_declval<1ul>())) std:🧵:_Invoker<std::tuple<void (SocketPoll::*)(), SocketPoll*> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:234:13
    #16 0xe47f87 in std:🧵:_Invoker<std::tuple<void (SocketPoll::*)(), SocketPoll*> >::operator()() /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:243:11
    #17 0xe4734a in std:🧵:_State_impl<std:🧵:_Invoker<std::tuple<void (SocketPoll::*)(), SocketPoll*> > >::_M_run() /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:186:13
    #18 0x7f5c2ce55e2e in execute_native_thread_routine /home/vmiklos/lode/packages/gccbuild/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../gcc-7.3.0/libstdc++-v3/src/c++11/thread.cc:83
    #19 0x7f5c2c832558 in start_thread (/lib64/libpthread.so.0+0x7558)
    #20 0x7f5c2bf4682e in clone (/lib64/libc.so.6+0xf882e)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/vmiklos/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:323:9 in

Change-Id: Ief574a11c838c77f7f159b1133beeef0deada201
2019-05-24 09:04:16 +02:00
Michael Meeks
1845ed42af tdf#123482 - cleanup convert-to folder even more reliably.
Problems could occur if exceptiosn thrown when parsing the input stream.

Change-Id: Id82b3816450194164fc2093554c730b4a94acef1
Reviewed-on: https://gerrit.libreoffice.org/72695
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-22 01:57:48 +02:00
Tor Lillqvist
b5154eaf69 Make the document-specific threads in the iOS app go away more reliably
After a document is closed, the prisoner_poll, accept_poll,
websrv_poll, docbroker_nnn, and lokit_main threads that served that
document are supposed to go away as quickly and reliably as possible.
This change improves that significantly.

Change-Id: If658bea74f70a77d2d537f0ec6455a6b36f2667e
2019-05-21 02:40:28 +03:00
Tor Lillqvist
d9e5a47058 Introduce new flag to speed up shutdown of the Online plumbing in the iOS app
Spent hours on trying to cleverly use the existing TerminationFlag
(with minor modifications to the code that checks it, and some
additional code to set and reset it), but could not get it to work.
This is simpler, but sure, using a global variable is ugly of course.
At least the new MobileTerminationFlag is very specific in semantics
and only used in the mobile apps.

Change-Id: I0775fdfa7880750ca12c6fd7ec41d3d3ceb2f0ad
2019-05-16 11:44:41 +03:00
merttumer
0dbf9bcf27 Added RenameFile Support for WOPI
This patch concerns rename file operation when the integration
supports it
Signed-off-by: merttumer <mert.tumer@collabora.com>

Change-Id: Ibb4f615b91dda2491bfcd4d4738198d69eca4e6f
Reviewed-on: https://gerrit.libreoffice.org/71587
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Signed-off-by: merttumer <mert.tumer@collabora.com>
2019-05-13 22:29:40 +03:00
Michael Meeks
c08b2f2ba4 Improve pid collection and printout for tests.
Change-Id: I820c1acbdbae41dd2c2c6bb7285b84bbb61e79d5
2019-05-03 13:52:15 +01:00
Michael Meeks
d8bb92cdcf Don't count convert-to connections vs. the document count.
Change-Id: I350905fb98c503ae8f22a377e4af5cbcb9f3c52d
2019-03-15 11:27:31 +01:00
Michael Meeks
2d473222e4 tdf#123482 - cleanup convert-to folder more reliably.
Change-Id: I029bb4136984e05485e462c92da80b92b00fdebc
2019-03-01 22:34:29 +01:00
Michael Meeks
51b72b04a9 Simpify DocumentBroker constructor.
Change-Id: I0bf29df9316b129d34862c7464bb6636d42a850d
2019-03-01 22:03:35 +01:00
Tor Lillqvist
8f71365f0f Remove unnecessary leftovers after Michael's removal of the on-disk tile cache
Change-Id: I435679b48f90d2580bb9c5c86a26c9a1d43c5b59
Reviewed-on: https://gerrit.libreoffice.org/67885
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-02-15 21:36:16 +01:00
Jan Holesovsky
f76b36193d android: #if(n)def MOBILEAPP -> #if (!)MOBILEAPP for better reliability.
Change-Id: I5f9c9420b6c83601db1c8fdba4ae5a10b17b2107
2019-02-12 12:20:11 +01:00
Tor Lillqvist
fb29e39899 There is no DocumentBroker::handleDialogPaintResponse() either
Change-Id: I84daa5da83b9d27c8bedadeb8a5d660573e00eb4
2019-02-08 15:47:35 +02:00
Tor Lillqvist
214fb20e7f There is no DocumentBroker::handleDialogRequest()
Change-Id: Ide3f00e898dd1d3dfde62f1eea1728beb6067b04
2019-02-08 15:38:40 +02:00
Samuel Mehrbrodt
2e9af9da16 Add custom http header when saving before document is cleaned up from memory
Change-Id: I3ac417d83a79a665ae6575097835542f43d40cef
Reviewed-on: https://gerrit.libreoffice.org/64499
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-12-05 11:50:59 +01:00
Tor Lillqvist
235c9b8a60 Use getAbbreviatedMessage() for its intended purpose
Don't log a potentially very long message in its entirety.

Change-Id: I01fbf76465d99bbab117d1dcacc6c7239a1da518
2018-11-29 01:07:03 +02:00
Michael Meeks
fa74404019 Add a time limit for badly behaved / huge document load / conversions.
Also improve debug printing of load times in dumpstate.

Change-Id: Ib3fd70dffb57588cd90bd928c4be9890cee8bc65
2018-11-08 01:27:40 +00:00
Tor Lillqvist
f29be2442d In ChildProcess::isAlive(), check _pid also in the MOBILEAPP case
... instead of returing always true.

The close() member function sets _pid to -1. We should just trust
that.

This helps a bit in making the app reach the the fully idle state
faster after closing a document. Tbere were two clear pointless delays
visible in log output: A long one followed by a shorter one. This gets
rif of the latter delay. Still need to find the root cause for the
former one.

Change-Id: I6d890e9eb59d076fde5aa93c55c44acc452b8124
2018-10-30 19:34:04 +02:00
Ashod Nakashian
0264dba09e wsd: anonymize load command sent to Kit
Change-Id: Ic509ceb5c38bc50152f1d00bd5718089fe664ac1
2018-10-16 20:12:23 -04:00
Tor Lillqvist
95eb849217 Still more iOS app and related Online C++ code hacking
Re-think the plumbing between the different parts of the C++ Online
code. Do try to have it work more like in real Online on all but the
lowest socket level. Except that we don't have multiple processes, but
threads inside the same process. And instead of using actual system
sockets for WebSocket traffic between the threads, we use our own
FakeSocket things, with no WebSocket framing of messages.

Reduce the amount of #ifdef MOBILEAPP a bit also by compiling in the
UnitFoo things. Hardcode that so that no unit testing is ever
attempted, though. We don't try to dlopen any library.

Corresponding changes in the app Objective-C code. Plus fixes and
functionality improvements.

Now it gets so far that the JavaScript code thinks it has the document
tiles presented, and doesn't crash. But it hangs occasionally. And all
tiles show up blank.

Anyway, progress.

Change-Id: I769497c9a46ddb74984bc7af36d132b7b43895d4
2018-09-19 11:31:18 +03:00
Tor Lillqvist
b59d160a08 Intermediate commit of work in progress on an iOS app
The app is unimaginatively called "Mobile" for now.

Runs but crashes pretty quickly after loading the document by the LO
core. Will need some heavy changes to get a ClientSession object
created in there, too, to handle the (emulated) WebSocket messages
from the JavaScript. It would then handle some of these messages
itself, and forwards some to the ChildSession, which in this case is
in the same process. Now the messsages from the JavaScript go to a
ChildSession, which is wrong. As the assertion says, "Tile traffic
should go through the DocumentBroker-LoKit WS"
2018-09-12 18:32:05 +03:00
Tamás Zolnai
15afe2c0fb Wait tileprocessed message from client to send new bunch of tiles
We always  one bunch of tiles (e.g. all tiles invalidated) and we
are waiting until client send tileprocessed message back for all
tiles before sending the new tiles.
By canceltiles message we drop every previously requested tiles and
make wsd ready to send new tiles, which will be requested by the client
in theory.

Change-Id: I9901420ada549e962ffaf5e6bd58e52b86bd129d
2018-07-19 14:10:08 +02:00
Ashod Nakashian
b3bdd5786d wsd: support optional forcing tracking changes at load
Since changing the tracking state is done by toggling,
we need to wait to get the current state at load time
before we can tell whether we need to toggle it or not.

Change-Id: Ib5a2639b2acf3874c191971eedf9a3bebcefebad
Reviewed-on: https://gerrit.libreoffice.org/53415
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-06-14 17:00:39 +02:00
Jan Holesovsky
432a1c7d78 Split close(bool) into close() and terminate().
The bool flag was causing 2 complete separate code paths anyway.

Also remove stop(), calling stop() followed by close() made no
difference.

Change-Id: Ica4c887b0324390d4e006a26eb4119bd5ab08723
2018-05-18 15:16:40 +02:00
Jan Holesovsky
088acf5e98 Before we kill the child, check it exists, ie. kill(pid, 0) == 0.
Also warn when anything was left out.

Without this, we leave abandoned children around.

Change-Id: I293a530ffceeb7f6bdc0cc775335c782945de6e7
2018-05-18 15:16:40 +02:00
Pranav Kant
d189ed90cc Document stop() vs closeDocument()
Change-Id: I52483c0300d1d4c5b1def80b71ccd0661590bfab
2018-02-08 12:30:23 +05:30
Pranav Kant
5476774af1 wsd: Use a close request flag to break out of doc broker poll thread
... instead of directly stop()ing it. The close request approach also
makes sure that outgoing document is saved to storage.

Change-Id: I44f61db00dbd326dec80f59f4a2cbb617048aa94
Reviewed-on: https://gerrit.libreoffice.org/49122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-07 14:30:33 +01:00
Pranav Kant
5bd124499c wsd: Bin superfluous public method
Passing the reason to stop() method also does the same thing.

Change-Id: I16b648495382c14f31839acca815835df76d8dca
2018-02-02 03:16:30 +05:30
Ashod Nakashian
f7fc3f494c wsd: save before stopping
We don't force saving unconditionally now. Only
when the doc is reasonably expected to be modified
do we force saving (to circumvent the minimum duration
between auto-saves).

We invoke auto-saving before stopping the DocBroker
polling loop, whether due to idleness or server recycling.

Change-Id: I257d55f190d3df6a3ba82f2666c7602da0581d0c
Reviewed-on: https://gerrit.libreoffice.org/47887
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15 15:04:14 +01:00
Ashod Nakashian
b5baf3672f wsd: stop DocBroker using only stop() member
Now always given a proper reason too.

Also, stop polling thread and cleanup when
failing to acquire/spawn a child process.

Change-Id: I7ddee01dd47b8ee72f2d9134c0f1b264634d8611
Reviewed-on: https://gerrit.libreoffice.org/47886
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15 15:03:21 +01:00
Ashod Nakashian
8ad29ee050 wsd: separate lastSaveTime from lastSaveResponseTime
Previously we assumed we are saving based on
lastSaveTime, which is incorrect because it
is set only upon successful saving and storing,
which might fail.

Now lastSaveResponseTime is used to track whether
there are saving requests in flight. And lastSaveTime
is only used when we do store the document in storage.

Change-Id: I73e5c04432981d0cca11b8cf854414738bd894de
Reviewed-on: https://gerrit.libreoffice.org/47884
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15 15:02:40 +01:00
Ashod Nakashian
a3a8551f2d wsd: remove lastEditableSession flag
Maintaining a flag is problematic, at least the way
it was reset on adding new sessions. Luckily there
should be no reason for having it, since we should
check it only when removing sessions. Also, we
need to check for every case of removal, and not, as
was, just on disconnection, which is incomplete.

Change-Id: I878766701228c41fc93eeaff21852fa887de9eff
Reviewed-on: https://gerrit.libreoffice.org/47883
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15 15:02:27 +01:00
Ashod Nakashian
d53ce5511d wsd: const and cosmetics
Non-functional changes.

Change-Id: I7c52386e2f870d29fd62c6dae6f37f4a58c2396b
Reviewed-on: https://gerrit.libreoffice.org/47882
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-15 08:06:56 +01:00
Ashod Nakashian
040a211d60 wsd: set modified flag on the storage when set on the DocumentBroker
Change-Id: Ieb4eb02f68f2d02ad88d6f59ad61de8f1e309670
Reviewed-on: https://gerrit.libreoffice.org/47365
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-01-06 22:14:23 +01:00
Pranav Kant
f1d78c7e62 lokdialog: send invalidate rectangle in dialog command
Change-Id: Iae00498a0ead1ee65dfce0332721e0d0fd2202fb
Reviewed-on: https://gerrit.libreoffice.org/44518
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-11-09 04:24:24 +01:00
Jan Holesovsky
7ff432a370 tdf#99744 SaveAs: Reimplementation of the PutRelativeFile going through Kit.
This is necessary so that changing of the file type works.

Includes a unit test.

Change-Id: Id01d44e555b6bac1002ff950de461fd330602f63
2017-10-26 11:11:38 +02:00
Jan Holesovsky
f4198526ca tdf#99744 SaveAs: Reverts parts of the previous Save As work.
It is necessary to go through the Kit when performing the Save As, so that we
can change the file type, sync with loading the file, etc.
2017-10-26 11:11:38 +02:00
Pranav Kant
e9e162b35e lokdialog: Mouse/key events, canvas use & child window impl.
Change-Id: If8ae5c284e7166d4a01bd664644134f11197f988
2017-10-25 00:39:03 -07:00
Pranav Kant
de780f8253 lokdialog: wsd: first cut at lok dialog rendering api
Change-Id: Id522e0796428ed0a15ea3496e6726f51ed232e75
2017-10-25 00:37:41 -07:00
Jan Holesovsky
7f49b1eba6 PutFile ext: X-LOOL-WOPI-IsAutosave header to indicate autosave + unit test.
Change-Id: I65ed711dae5100467fe6ed9902bd7bad8c7f8d68
Reviewed-on: https://gerrit.libreoffice.org/43074
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-10-03 12:04:18 +02:00
Pranav Kant
ad211ef51b wsd: Configurable autosave and idlesave durations
But these save conditions are checked every 30 seconds only, so setting
them to less than 30 seconds wouldn't mean that save will be triggered
anytime sooner.

Change-Id: Id473a79af6a3170c72e372040460f2b7c15f150e
2017-08-24 16:54:15 +05:30
Aditya Dewan
c3711a4375 Extending WOPI implementaion to introduce 'Save As' feature
Change-Id: Ic4c80f4c4b54944143682c25a5878c1336787b27
Reviewed-on: https://gerrit.libreoffice.org/40946
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-17 19:25:44 +02:00
Pranav Kant
fde57adbbf Introduce hard mode when we are OOM
Start killing documents when memory usage goes above threshold.

Also make it possible to close documents from admin instance.
In DocumentBroker::closeDocument, just set the _stop flag and wake
up the polling thread which will terminate the children, instead of
manually terminating the children.

Change-Id: Ie70e05b3fb6ea816a87b6dcfaed92cdddb94aa90
2017-07-07 21:14:53 +05:30
Pranav Kant
c21de44524 Bin unused parameter, rude
Change-Id: I39f55f55f8a0c5432350625d9720ea2367955a8c
Reviewed-on: https://gerrit.libreoffice.org/39085
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-06-23 10:42:55 +02:00