Comparing version 2.7.3 to 2.7.4
v2.7.4 / 2018-09-05 | ||
================== | ||
* performance.mark related fixes for failing Safari, IE 10 and IE 11 tests | ||
v2.7.3 / 2018-09-05 | ||
@@ -3,0 +8,0 @@ ================== |
12
lolex.js
@@ -37,3 +37,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.lolex = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
var performancePresent = (_global.performance && typeof _global.performance.now === "function"); | ||
var performanceConstructorExists = (_global.Performance && typeof _global.Performance === "function"); | ||
var hasPerformancePrototype = (_global.Performance && (typeof _global.Performance).match(/^(function|object)$/)); | ||
var requestAnimationFramePresent = ( | ||
@@ -750,6 +750,5 @@ _global.requestAnimationFrame && typeof _global.requestAnimationFrame === "function" | ||
if (performancePresent) { | ||
clock.performance = Object.create(_global.performance); | ||
clock.performance = Object.create(null); | ||
if (performanceConstructorExists) { | ||
if (hasPerformancePrototype) { | ||
var proto = _global.Performance.prototype; | ||
@@ -760,5 +759,3 @@ | ||
.forEach(function (name) { | ||
if (Object.getOwnPropertyDescriptor(proto, name).writable) { | ||
clock.performance[name] = NOOP; | ||
} | ||
clock.performance[name] = NOOP; | ||
}); | ||
@@ -771,2 +768,3 @@ } | ||
} | ||
if (hrtimePresent) { | ||
@@ -773,0 +771,0 @@ clock.hrtime = function (prev) { |
{ | ||
"name": "lolex", | ||
"description": "Fake JavaScript timers", | ||
"version": "2.7.3", | ||
"version": "2.7.4", | ||
"homepage": "http://github.com/sinonjs/lolex", | ||
@@ -6,0 +6,0 @@ "author": "Christian Johansen", |
@@ -35,3 +35,3 @@ "use strict"; | ||
var performancePresent = (_global.performance && typeof _global.performance.now === "function"); | ||
var performanceConstructorExists = (_global.Performance && typeof _global.Performance === "function"); | ||
var hasPerformancePrototype = (_global.Performance && (typeof _global.Performance).match(/^(function|object)$/)); | ||
var requestAnimationFramePresent = ( | ||
@@ -748,6 +748,5 @@ _global.requestAnimationFrame && typeof _global.requestAnimationFrame === "function" | ||
if (performancePresent) { | ||
clock.performance = Object.create(_global.performance); | ||
clock.performance = Object.create(null); | ||
if (performanceConstructorExists) { | ||
if (hasPerformancePrototype) { | ||
var proto = _global.Performance.prototype; | ||
@@ -758,5 +757,3 @@ | ||
.forEach(function (name) { | ||
if (Object.getOwnPropertyDescriptor(proto, name).writable) { | ||
clock.performance[name] = NOOP; | ||
} | ||
clock.performance[name] = NOOP; | ||
}); | ||
@@ -769,2 +766,3 @@ } | ||
} | ||
if (hrtimePresent) { | ||
@@ -771,0 +769,0 @@ clock.hrtime = function (prev) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79976
1456