diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 17:23:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 17:23:55 +0800 |
commit | bb48517f58b047aa39715d07307fed803bd0c11d (patch) | |
tree | 289e52c6309079b3240e5861d6504c73759637d6 /server/src | |
parent | 014216f3dd82bed390d9d96a9b091be448d442ed (diff) | |
download | lua-language-server-bb48517f58b047aa39715d07307fed803bd0c11d.zip |
修正没有保护require目标的值,导致内存泄漏的bug
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/matcher/vm.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua index c2fd0e73..b73aa100 100644 --- a/server/src/matcher/vm.lua +++ b/server/src/matcher/vm.lua @@ -196,9 +196,14 @@ function mt:mergeValue(a, b, mark) if mark[a] or mark[b] then return end + if a.uri ~= self.uri then + return + end mark[a] = true mark[b] = true - self:mergeChild(a, b, mark) + if b.uri == self.uri then + self:mergeChild(a, b, mark) + end for k in pairs(a) do a[k] = nil end |