vim-patch:7.4.1727

Problem:    Cannot detect a crash in tests when caused by garbagecollect().
Solution:   Add garbagecollect_for_testing().  Do not free a job if is still
            useful.

ebf7dfa6f1
This commit is contained in:
Michael Ennen
2017-01-05 17:13:23 -07:00
parent 64c375c589
commit b0fc6108c9
9 changed files with 373 additions and 23 deletions

View File

@@ -1327,8 +1327,9 @@ int using_script(void)
void before_blocking(void)
{
updatescript(0);
if (may_garbage_collect)
garbage_collect();
if (may_garbage_collect) {
garbage_collect(false);
}
}
/*
@@ -1366,10 +1367,11 @@ int vgetc(void)
char_u buf[MB_MAXBYTES + 1];
int i;
/* Do garbage collection when garbagecollect() was called previously and
* we are now at the toplevel. */
if (may_garbage_collect && want_garbage_collect)
garbage_collect();
// Do garbage collection when garbagecollect() was called previously and
// we are now at the toplevel.
if (may_garbage_collect && want_garbage_collect) {
garbage_collect(false);
}
/*
* If a character was put back with vungetc, it was already processed.