Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
chore(release): version bump and dist for 0.6.15
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Aug 19, 2016
1 parent ff88bb4 commit 02a41c0
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 12 deletions.
13 changes: 12 additions & 1 deletion dist/jasmine-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,21 @@
_super.call(this, attrs);
}
ZoneQueueRunner.prototype.execute = function () {
var _this = this;
if (Zone.current !== ambientZone)
throw new Error("Unexpected Zone: " + Zone.current.name);
testProxyZone = ambientZone.fork(new ProxyZoneSpec());
_super.prototype.execute.call(this);
if (!Zone.currentTask) {
// if we are not running in a task then if someone would register a
// element.addEventListener and then calling element.click() the
// addEventListener callback would think that it is the top most task and would
// drain the microtask queue on element.click() which would be incorrect.
// For this reason we always force a task when running jasmine tests.
Zone.current.scheduleMicroTask('jasmine.execute().forceTask', function () { return _super.prototype.execute.call(_this); });
}
else {
_super.prototype.execute.call(this);
}
};
return ZoneQueueRunner;
}(QueueRunner));
Expand Down
2 changes: 1 addition & 1 deletion dist/jasmine-patch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
13 changes: 9 additions & 4 deletions dist/zone-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,15 @@
this.callback = callback;
var self = this;
this.invoke = function () {
_numberOfNestedTaskFrames++;
try {
return zone.runTask(self, this, arguments);
}
finally {
drainMicroTaskQueue();
if (_numberOfNestedTaskFrames == 1) {
drainMicroTaskQueue();
}
_numberOfNestedTaskFrames--;
}
};
}
Expand All @@ -414,9 +418,11 @@
var _microTaskQueue = [];
var _isDrainingMicrotaskQueue = false;
var _uncaughtPromiseErrors = [];
var _drainScheduled = false;
var _numberOfNestedTaskFrames = 0;
function scheduleQueueDrain() {
if (!_drainScheduled && !_currentTask && _microTaskQueue.length == 0) {
// if we are not running in any task, and there has not been anything scheduled
// we must bootstrap the initial task creation by manually scheduling the drain
if (_numberOfNestedTaskFrames == 0 && _microTaskQueue.length == 0) {
// We are not running in Task, so we need to kickstart the microtask queue.
if (global[symbolPromise]) {
global[symbolPromise].resolve(0)[symbolThen](drainMicroTaskQueue);
Expand Down Expand Up @@ -468,7 +474,6 @@
}
}
_isDrainingMicrotaskQueue = false;
_drainScheduled = false;
}
}
function isThenable(value) {
Expand Down
13 changes: 9 additions & 4 deletions dist/zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,15 @@
this.callback = callback;
var self = this;
this.invoke = function () {
_numberOfNestedTaskFrames++;
try {
return zone.runTask(self, this, arguments);
}
finally {
drainMicroTaskQueue();
if (_numberOfNestedTaskFrames == 1) {
drainMicroTaskQueue();
}
_numberOfNestedTaskFrames--;
}
};
}
Expand All @@ -456,9 +460,11 @@
var _microTaskQueue = [];
var _isDrainingMicrotaskQueue = false;
var _uncaughtPromiseErrors = [];
var _drainScheduled = false;
var _numberOfNestedTaskFrames = 0;
function scheduleQueueDrain() {
if (!_drainScheduled && !_currentTask && _microTaskQueue.length == 0) {
// if we are not running in any task, and there has not been anything scheduled
// we must bootstrap the initial task creation by manually scheduling the drain
if (_numberOfNestedTaskFrames == 0 && _microTaskQueue.length == 0) {
// We are not running in Task, so we need to kickstart the microtask queue.
if (global[symbolPromise]) {
global[symbolPromise].resolve(0)[symbolThen](drainMicroTaskQueue);
Expand Down Expand Up @@ -510,7 +516,6 @@
}
}
_isDrainingMicrotaskQueue = false;
_drainScheduled = false;
}
}
function isThenable(value) {
Expand Down
2 changes: 1 addition & 1 deletion dist/zone.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zone.js",
"version": "0.6.14",
"version": "0.6.15",
"description": "Zones for JavaScript",
"main": "dist/zone-node.js",
"browser": "dist/zone.js",
Expand Down

0 comments on commit 02a41c0

Please sign in to comment.