dart-lang/chromedeveditor — pull request #3127 by rginda (2014-08-11 16:59:17+00:00)
Title: Defer the nacl plugin loading until it's needed.

@dinhviethoa @ussuri

Previous code depended on getting event handlers attached before the plugin loaded. This worked ok on the first load, but subsequent cached loads caused a race condition.

After this change we construct the embed tag at runtime and can attach event handlers before inserting the tag in the DOM. The tag is constructed at first-use, so the first call into this module will take a considerably longer than the rest. If this is a problem we could make AndroidRSA._createPlugin public, and call it during Spark startup.

Also fixed some missing semicolons, trailing whitespace, and 80 column overruns.

Fixes #3120