From 69c16949001e0b0b3fd9998c09d8c2a891c7bc92 Mon Sep 17 00:00:00 2001 From: Jason Teplitz Date: Thu, 4 Feb 2016 10:58:40 -0800 Subject: [PATCH] fix(WebWorker): Make MessageBus EventEmitter synchronous --- modules/angular2/src/web_workers/shared/post_message_bus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/web_workers/shared/post_message_bus.ts b/modules/angular2/src/web_workers/shared/post_message_bus.ts index 7733a1dd98..a39095705a 100644 --- a/modules/angular2/src/web_workers/shared/post_message_bus.ts +++ b/modules/angular2/src/web_workers/shared/post_message_bus.ts @@ -31,7 +31,7 @@ export class PostMessageBusSink implements MessageBusSink { throw new BaseException(`${channel} has already been initialized`); } - var emitter = new EventEmitter(); + var emitter = new EventEmitter(false); var channelInfo = new _Channel(emitter, runInZone); this._channels[channel] = channelInfo; emitter.subscribe((data: Object) => { @@ -82,7 +82,7 @@ export class PostMessageBusSource implements MessageBusSource { throw new BaseException(`${channel} has already been initialized`); } - var emitter = new EventEmitter(); + var emitter = new EventEmitter(false); var channelInfo = new _Channel(emitter, runInZone); this._channels[channel] = channelInfo; }