{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/164","labels_url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/164/comments","events_url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/164/events","html_url":"https://github.com/dart-lang/dev_compiler/issues/164","id":73090873,"number":164,"title":"Determine how to wire up isolate state","user":{"login":"vsmenon","id":2119553,"avatar_url":"https://avatars.githubusercontent.com/u/2119553?v=3","gravatar_id":"","url":"https://api.github.com/users/vsmenon","html_url":"https://github.com/vsmenon","followers_url":"https://api.github.com/users/vsmenon/followers","following_url":"https://api.github.com/users/vsmenon/following{/other_user}","gists_url":"https://api.github.com/users/vsmenon/gists{/gist_id}","starred_url":"https://api.github.com/users/vsmenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsmenon/subscriptions","organizations_url":"https://api.github.com/users/vsmenon/orgs","repos_url":"https://api.github.com/users/vsmenon/repos","events_url":"https://api.github.com/users/vsmenon/events{/privacy}","received_events_url":"https://api.github.com/users/vsmenon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/dev_compiler/labels/angular","name":"angular","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-04T18:24:15Z","updated_at":"2015-05-05T21:48:56Z","closed_at":null,"body":"The dart2js isolate library code relies on some trampoline code at startup to set isolate globalState.\r\n\r\nI'm doing the following right now, but it'd be nice not to need this.\r\n\r\n```\r\n--- a/lib/src/codegen/html_codegen.dart\r\n+++ b/lib/src/codegen/html_codegen.dart\r\n@@ -90,7 +90,8 @@ Node _cssInclude(String cssUrl) =>\r\n Node _invokeMain(String mainLibraryName) {\r\n   var code = mainLibraryName == null\r\n       ? 'console.error(\"dev_compiler error: main was not generated\");'\r\n-      : '$mainLibraryName.main();';\r\n+      : 'library__isolate_helper.startRootIsolate($mainLibraryName.main, []);';\r\n   return parseFragment('<script>$code</script>\\n');\r\n }\r\n```"},"comment":{"url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/comments/99233436","html_url":"https://github.com/dart-lang/dev_compiler/issues/164#issuecomment-99233436","issue_url":"https://api.github.com/repos/dart-lang/dev_compiler/issues/164","id":99233436,"user":{"login":"vsmenon","id":2119553,"avatar_url":"https://avatars.githubusercontent.com/u/2119553?v=3","gravatar_id":"","url":"https://api.github.com/users/vsmenon","html_url":"https://github.com/vsmenon","followers_url":"https://api.github.com/users/vsmenon/followers","following_url":"https://api.github.com/users/vsmenon/following{/other_user}","gists_url":"https://api.github.com/users/vsmenon/gists{/gist_id}","starred_url":"https://api.github.com/users/vsmenon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsmenon/subscriptions","organizations_url":"https://api.github.com/users/vsmenon/orgs","repos_url":"https://api.github.com/users/vsmenon/repos","events_url":"https://api.github.com/users/vsmenon/events{/privacy}","received_events_url":"https://api.github.com/users/vsmenon/received_events","type":"User","site_admin":false},"created_at":"2015-05-05T21:48:56Z","updated_at":"2015-05-05T21:48:56Z","body":"@jmesserly We appear to hit this in the context of async, zones, and stack traces.  \r\n\r\nMore generally, we may want to rethink the model of multiple isolates and the DOM.  Previously, we kind of took the Dartium notion that we already had separate JS and Dart isolates and ran with it.  "}}