Skip to content

Commit

Permalink
chore: release v0.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery committed Apr 21, 2017
1 parent 0829316 commit 917893b
Show file tree
Hide file tree
Showing 12 changed files with 870 additions and 318 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a name="0.8.6"></a>
## [0.8.6](https://github.com/angular/zone.js/compare/v0.8.5...0.8.6) (2017-04-21)
<a name="0.8.f"></a>
## [0.8.7](https://github.com/angular/zone.js/compare/v0.8.5...0.8.7) (2017-04-21)


### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion dist/jasmine-patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// Example:
// - In beforeEach() do childZone = Zone.current.fork(...);
// - In it() try to do fakeAsync(). The issue is that because the beforeEach forked the
// zone outside of fakeAsync it will be able to escope the fakeAsync rules.
// zone outside of fakeAsync it will be able to escape the fakeAsync rules.
// - Because ProxyZone is parent fo `childZone` fakeAsync can retroactively add
// fakeAsync behavior to the childZone.
var testProxyZone = null;
Expand Down
47 changes: 31 additions & 16 deletions dist/long-stack-trace-zone.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function addErrorStack(lines, error) {
}
}
function renderLongStackTrace(frames, stack) {
var longTrace = [stack.trim()];
var longTrace = [stack ? stack.trim() : ''];
if (frames) {
var timestamp = new Date().getTime();
for (var i = 0; i < frames.length; i++) {
Expand Down Expand Up @@ -99,25 +99,37 @@ Zone['longStackTraceZoneSpec'] = {
return renderLongStackTrace(trace, error.stack);
},
onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
var currentTask = Zone.currentTask;
var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
if (Error.stackTraceLimit > 0) {
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
var currentTask = Zone.currentTask;
var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
trace = [new LongStackTrace()].concat(trace);
if (trace.length > this.longStackTraceLimit) {
trace.length = this.longStackTraceLimit;
}
if (!task.data)
task.data = {};
task.data[creationTrace] = trace;
}
if (!task.data)
task.data = {};
task.data[creationTrace] = trace;
return parentZoneDelegate.scheduleTask(targetZone, task);
},
onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) {
if (Error.stackTraceLimit > 0) {
// if Error.stackTraceLimit is 0, means stack trace
// is disabled, so we don't need to generate long stack trace
// this will improve performance in some test(some test will
// set stackTraceLimit to 0, https://github.com/angular/zone.js/issues/698
var parentTask = Zone.currentTask || error.task;
if (error instanceof Error && parentTask) {
var longStack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
try {
error.stack = error.longStack = longStack;
}
catch (err) {
}
}
}
return parentZoneDelegate.handleError(targetZone, error);
Expand All @@ -130,6 +142,9 @@ function captureStackTraces(stackTraces, count) {
}
}
function computeIgnoreFrames() {
if (Error.stackTraceLimit <= 0) {
return;
}
var frames = [];
captureStackTraces(frames, 2);
var frames1 = frames[0];
Expand Down
2 changes: 1 addition & 1 deletion dist/long-stack-trace-zone.min.js

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

4 changes: 2 additions & 2 deletions dist/zone-bluebird.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (_global) {
(function () {
var __symbol__ = Zone.__symbol__;
// TODO: @JiaLiPassion, we can automatically patch bluebird
// if global.Promise = Bluebird, but sometimes in nodejs,
Expand All @@ -30,6 +30,6 @@
Zone.current.scheduleMicroTask('bluebird', fn);
});
};
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
})();

})));
2 changes: 1 addition & 1 deletion dist/zone-bluebird.min.js

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

Loading

0 comments on commit 917893b

Please sign in to comment.