Skip to content

Commit

Permalink
[build] Fix leak based on vuejs#5988
Browse files Browse the repository at this point in the history
  • Loading branch information
jskrzypek committed Jul 6, 2017
1 parent 69bf519 commit f583eec
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 147 deletions.
43 changes: 22 additions & 21 deletions dist/vue.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2770,22 +2770,23 @@ Watcher.prototype.get = function get () {
pushTarget(this);
var value;
var vm = this.vm;
if (this.user) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
if (this.user) {
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
} else {
throw e
}
} else {
value = this.getter.call(vm, vm);
}
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
} finally {
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
}
popTarget();
this.cleanupDeps();
}
popTarget();
this.cleanupDeps();
return value
};

Expand Down Expand Up @@ -4956,11 +4957,11 @@ function createPatchFunction (backend) {
insert(parentElm, vnode.elm, refElm);
}

function insert (parent, elm, ref) {
function insert (parent, elm, ref$$1) {
if (isDef(parent)) {
if (isDef(ref)) {
if (ref.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref);
if (isDef(ref$$1)) {
if (ref$$1.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref$$1);
}
} else {
nodeOps.appendChild(parent, elm);
Expand Down Expand Up @@ -7144,10 +7145,10 @@ var show = {
var value = ref.value;

vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
var transition$$1 = vnode.data && vnode.data.transition;
var originalDisplay = el.__vOriginalDisplay =
el.style.display === 'none' ? '' : el.style.display;
if (value && transition && !isIE9) {
if (value && transition$$1 && !isIE9) {
vnode.data.show = true;
enter(vnode, function () {
el.style.display = originalDisplay;
Expand All @@ -7164,8 +7165,8 @@ var show = {
/* istanbul ignore if */
if (value === oldValue) { return }
vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
if (transition && !isIE9) {
var transition$$1 = vnode.data && vnode.data.transition;
if (transition$$1 && !isIE9) {
vnode.data.show = true;
if (value) {
enter(vnode, function () {
Expand Down
43 changes: 22 additions & 21 deletions dist/vue.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2768,22 +2768,23 @@ Watcher.prototype.get = function get () {
pushTarget(this);
var value;
var vm = this.vm;
if (this.user) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
if (this.user) {
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
} else {
throw e
}
} else {
value = this.getter.call(vm, vm);
}
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
} finally {
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
}
popTarget();
this.cleanupDeps();
}
popTarget();
this.cleanupDeps();
return value
};

Expand Down Expand Up @@ -4954,11 +4955,11 @@ function createPatchFunction (backend) {
insert(parentElm, vnode.elm, refElm);
}

function insert (parent, elm, ref) {
function insert (parent, elm, ref$$1) {
if (isDef(parent)) {
if (isDef(ref)) {
if (ref.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref);
if (isDef(ref$$1)) {
if (ref$$1.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref$$1);
}
} else {
nodeOps.appendChild(parent, elm);
Expand Down Expand Up @@ -7142,10 +7143,10 @@ var show = {
var value = ref.value;

vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
var transition$$1 = vnode.data && vnode.data.transition;
var originalDisplay = el.__vOriginalDisplay =
el.style.display === 'none' ? '' : el.style.display;
if (value && transition && !isIE9) {
if (value && transition$$1 && !isIE9) {
vnode.data.show = true;
enter(vnode, function () {
el.style.display = originalDisplay;
Expand All @@ -7162,8 +7163,8 @@ var show = {
/* istanbul ignore if */
if (value === oldValue) { return }
vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
if (transition && !isIE9) {
var transition$$1 = vnode.data && vnode.data.transition;
if (transition$$1 && !isIE9) {
vnode.data.show = true;
if (value) {
enter(vnode, function () {
Expand Down
43 changes: 22 additions & 21 deletions dist/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2770,22 +2770,23 @@ Watcher.prototype.get = function get () {
pushTarget(this);
var value;
var vm = this.vm;
if (this.user) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
if (this.user) {
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
} else {
throw e
}
} else {
value = this.getter.call(vm, vm);
}
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
} finally {
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
}
popTarget();
this.cleanupDeps();
}
popTarget();
this.cleanupDeps();
return value
};

Expand Down Expand Up @@ -4948,11 +4949,11 @@ function createPatchFunction (backend) {
insert(parentElm, vnode.elm, refElm);
}

function insert (parent, elm, ref) {
function insert (parent, elm, ref$$1) {
if (isDef(parent)) {
if (isDef(ref)) {
if (ref.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref);
if (isDef(ref$$1)) {
if (ref$$1.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref$$1);
}
} else {
nodeOps.appendChild(parent, elm);
Expand Down Expand Up @@ -7136,10 +7137,10 @@ var show = {
var value = ref.value;

vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
var transition$$1 = vnode.data && vnode.data.transition;
var originalDisplay = el.__vOriginalDisplay =
el.style.display === 'none' ? '' : el.style.display;
if (value && transition && !isIE9) {
if (value && transition$$1 && !isIE9) {
vnode.data.show = true;
enter(vnode, function () {
el.style.display = originalDisplay;
Expand All @@ -7156,8 +7157,8 @@ var show = {
/* istanbul ignore if */
if (value === oldValue) { return }
vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
if (transition && !isIE9) {
var transition$$1 = vnode.data && vnode.data.transition;
if (transition$$1 && !isIE9) {
vnode.data.show = true;
if (value) {
enter(vnode, function () {
Expand Down
4 changes: 1 addition & 3 deletions dist/vue.min.js

Large diffs are not rendered by default.

43 changes: 22 additions & 21 deletions dist/vue.runtime.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2766,22 +2766,23 @@ Watcher.prototype.get = function get () {
pushTarget(this);
var value;
var vm = this.vm;
if (this.user) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
if (this.user) {
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
} else {
throw e
}
} else {
value = this.getter.call(vm, vm);
}
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
} finally {
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
}
popTarget();
this.cleanupDeps();
}
popTarget();
this.cleanupDeps();
return value
};

Expand Down Expand Up @@ -4952,11 +4953,11 @@ function createPatchFunction (backend) {
insert(parentElm, vnode.elm, refElm);
}

function insert (parent, elm, ref) {
function insert (parent, elm, ref$$1) {
if (isDef(parent)) {
if (isDef(ref)) {
if (ref.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref);
if (isDef(ref$$1)) {
if (ref$$1.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref$$1);
}
} else {
nodeOps.appendChild(parent, elm);
Expand Down Expand Up @@ -6679,10 +6680,10 @@ var show = {
var value = ref.value;

vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
var transition$$1 = vnode.data && vnode.data.transition;
var originalDisplay = el.__vOriginalDisplay =
el.style.display === 'none' ? '' : el.style.display;
if (value && transition && !isIE9) {
if (value && transition$$1 && !isIE9) {
vnode.data.show = true;
enter(vnode, function () {
el.style.display = originalDisplay;
Expand All @@ -6699,8 +6700,8 @@ var show = {
/* istanbul ignore if */
if (value === oldValue) { return }
vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
if (transition && !isIE9) {
var transition$$1 = vnode.data && vnode.data.transition;
if (transition$$1 && !isIE9) {
vnode.data.show = true;
if (value) {
enter(vnode, function () {
Expand Down
43 changes: 22 additions & 21 deletions dist/vue.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2764,22 +2764,23 @@ Watcher.prototype.get = function get () {
pushTarget(this);
var value;
var vm = this.vm;
if (this.user) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
try {
value = this.getter.call(vm, vm);
} catch (e) {
if (this.user) {
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
} else {
throw e
}
} else {
value = this.getter.call(vm, vm);
}
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
} finally {
// "touch" every property so they are all tracked as
// dependencies for deep watching
if (this.deep) {
traverse(value);
}
popTarget();
this.cleanupDeps();
}
popTarget();
this.cleanupDeps();
return value
};

Expand Down Expand Up @@ -4950,11 +4951,11 @@ function createPatchFunction (backend) {
insert(parentElm, vnode.elm, refElm);
}

function insert (parent, elm, ref) {
function insert (parent, elm, ref$$1) {
if (isDef(parent)) {
if (isDef(ref)) {
if (ref.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref);
if (isDef(ref$$1)) {
if (ref$$1.parentNode === parent) {
nodeOps.insertBefore(parent, elm, ref$$1);
}
} else {
nodeOps.appendChild(parent, elm);
Expand Down Expand Up @@ -6677,10 +6678,10 @@ var show = {
var value = ref.value;

vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
var transition$$1 = vnode.data && vnode.data.transition;
var originalDisplay = el.__vOriginalDisplay =
el.style.display === 'none' ? '' : el.style.display;
if (value && transition && !isIE9) {
if (value && transition$$1 && !isIE9) {
vnode.data.show = true;
enter(vnode, function () {
el.style.display = originalDisplay;
Expand All @@ -6697,8 +6698,8 @@ var show = {
/* istanbul ignore if */
if (value === oldValue) { return }
vnode = locateNode(vnode);
var transition = vnode.data && vnode.data.transition;
if (transition && !isIE9) {
var transition$$1 = vnode.data && vnode.data.transition;
if (transition$$1 && !isIE9) {
vnode.data.show = true;
if (value) {
enter(vnode, function () {
Expand Down
Loading

0 comments on commit f583eec

Please sign in to comment.