spec.functionName transformer: hasBinding(name) returns true for built-in globals, so we attempt to rename the binding but it doesn't exist so exits early, add a check that doesn't perform the renaming and instead uses the wrapper - fixes #1598
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
var test = {
|
||||
setInterval: function(fn, ms) {
|
||||
setInterval(fn, ms);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var test = {
|
||||
setInterval: (function (_setInterval) {
|
||||
function setInterval(_x, _x2) {
|
||||
return _setInterval.apply(this, arguments);
|
||||
}
|
||||
|
||||
setInterval.toString = function () {
|
||||
return _setInterval.toString();
|
||||
};
|
||||
|
||||
return setInterval;
|
||||
})(function (fn, ms) {
|
||||
setInterval(fn, ms);
|
||||
})
|
||||
};
|
||||
Reference in New Issue
Block a user