Commit Graph

13 Commits

Author SHA1 Message Date
Evan You
36fa42a88c fix(runtime-core/scheduler): handle nested flushPostFlushCbs calls
fix #1947
2020-08-24 18:47:15 -04:00
HcySunYang
caccec3f78
fix(runtime-core/scheduler): sort postFlushCbs to ensure refs are set before lifecycle hooks (#1854)
fix #1852
2020-08-14 09:50:23 -04:00
Evan You
611437a3fe fix(runtime-core/scheduler): allow component render functions to trigger itself
fix #1801
2020-08-13 17:42:47 -04:00
Evan You
3692f2738f refactor(runtime-core/scheduler): dedicated preFlush queue
properly fix #1763, #1777, #1781
2020-08-05 10:55:23 -04:00
Yang Mingshan
b2a91429ed
fix(runtime-core/scheduler): prevent duplicate queue (#1767) 2020-08-03 17:19:06 -04:00
Evan You
09702e95b9 fix(runtime-core/scheduler): only allow watch callbacks to be self-triggering
fix #1740

Previous fix for #1727 caused `watchEffect` to also recursively trigger
itself on reactive array mutations which implicitly registers array
`.length` as dependencies and mutates it at the same time.

This fix limits recursive trigger behavior to only `watch()` callbacks
since code inside the callback do not register dependencies and
mutations are always explicitly intended.
2020-07-30 17:57:20 -04:00
Evan You
7e8b26eba8 refactor(runtime-core): make nextTick() promise reject on scheduler flush error 2020-07-28 10:40:25 -04:00
Evan You
165068dbc2 perf(runtime-core): avoid duplicate postFlushCb invocation
Also improve flush performance by using for loop instead of shift()

fix #1595
2020-07-15 22:36:41 -04:00
HiiTea
22717772dd
chore: fix typos (#1090) 2020-05-01 09:42:58 -04:00
Evan You
78977c3997 fix(scheduler): sort jobs before flushing
This fixes the case where a child component is added to the queue before
its parent, but should be invalidated by its parent's update. Same logic
was present in Vue 2.

Properly fixes #910
ref: https://github.com/vuejs/vue-next/issues/910#issuecomment-613097539
2020-04-14 17:31:35 -04:00
Yang Mingshan
fe9da2d0e4
fix(runtime-core/scheduler): invalidate job (#717) 2020-02-11 07:30:25 -05:00
Evan You
8a87074df0 fix(runtime-core/scheduler): avoid duplicate updates of child component 2020-02-10 13:09:15 -05:00
JiZhi
f838715b7c test(runtime-core): add tests for scheduler (#462) 2019-11-16 16:32:06 -05:00