{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/9771","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/9771/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/9771/comments","events_url":"https://api.github.com/repos/angular/angular/issues/9771/events","html_url":"https://github.com/angular/angular/issues/9771","id":163452573,"number":9771,"title":"[web_workers] (Chrome) Component do not render if root component has long initialization logic in constructor","user":{"login":"mdaveynis","id":16145224,"avatar_url":"https://avatars.githubusercontent.com/u/16145224?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaveynis","html_url":"https://github.com/mdaveynis","followers_url":"https://api.github.com/users/mdaveynis/followers","following_url":"https://api.github.com/users/mdaveynis/following{/other_user}","gists_url":"https://api.github.com/users/mdaveynis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaveynis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaveynis/subscriptions","organizations_url":"https://api.github.com/users/mdaveynis/orgs","repos_url":"https://api.github.com/users/mdaveynis/repos","events_url":"https://api.github.com/users/mdaveynis/events{/privacy}","received_events_url":"https://api.github.com/users/mdaveynis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/comp:%20core/webworker","name":"comp: core/webworker","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-01T18:41:15Z","updated_at":"2016-08-08T21:59:23Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[x] bug report\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n\r\n**Current behavior**\r\nComponent in web worker scenario do not render if root component has long initialization logic in the constructor. Component in the plunker example (https://plnkr.co/edit/fL7BwEFOAu2GQwJjcFBl?p=preview) will render if number of cycles in a loop is reduced.\r\n\r\n**Expected/desired behavior**\r\nComponent renders\r\n\r\n**Reproduction of the problem**\r\nSee https://plnkr.co/edit/fL7BwEFOAu2GQwJjcFBl?p=preview\r\n\r\n**What is the expected behavior?**\r\nFor above plunker sample following string should be displayed: \"Hello Angular2 (Release Candidate!)\"\r\n\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nBug fix.\r\n\r\n\r\n**Please tell us about your environment:**\r\n\r\n* **Angular version:** 2.0.0-rc.4\r\n \r\n* **Browser:** Chrome 51.0.2704.103 m (64-bit) \r\n \r\n* **Language:** TypeScript 1.8.10 \r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/238390978","html_url":"https://github.com/angular/angular/issues/9771#issuecomment-238390978","issue_url":"https://api.github.com/repos/angular/angular/issues/9771","id":238390978,"user":{"login":"mdaveynis","id":16145224,"avatar_url":"https://avatars.githubusercontent.com/u/16145224?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaveynis","html_url":"https://github.com/mdaveynis","followers_url":"https://api.github.com/users/mdaveynis/followers","following_url":"https://api.github.com/users/mdaveynis/following{/other_user}","gists_url":"https://api.github.com/users/mdaveynis/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaveynis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaveynis/subscriptions","organizations_url":"https://api.github.com/users/mdaveynis/orgs","repos_url":"https://api.github.com/users/mdaveynis/repos","events_url":"https://api.github.com/users/mdaveynis/events{/privacy}","received_events_url":"https://api.github.com/users/mdaveynis/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T21:59:23Z","updated_at":"2016-08-08T21:59:23Z","body":"Based on [Chromium Issue 584851](https://bugs.chromium.org/p/chromium/issues/detail?id=584851), Chrome garbage collects worker in certain cases \r\n\r\nWorkaround: Adding a Worker object to `window` property\r\n```js\r\n    function spawnWebWorker(uri, instance) {\r\n        var webWorker = new Worker(uri);\r\n        window[\"dummy\"] = webWorker;\r\n        ...\r\n    }\r\n```"}}
{"actor":{"display_login":"mdaveynis"}}