Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1968 from adobe/pflynn/extension-loading-safety
Browse files Browse the repository at this point in the history
Upgrade to Require 2.1.1 and catch errors during extension loading
  • Loading branch information
gruehle committed Oct 29, 2012
2 parents 97eab7b + d26ff6d commit 779e86f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 45 deletions.
8 changes: 3 additions & 5 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ define(function (require, exports, module) {
require("search/FindReplace");
require("utils/ExtensionUtils");

// TODO: (issue 1029) Add timeout to main extension loading promise, so that we always call this function
// Making this fix will fix a warning (search for issue 1029) related to the global brackets 'ready' event.

function _initExtensions() {
// allow unit tests to override which plugin folder(s) to load
var paths = params.get("extensions");
Expand Down Expand Up @@ -262,9 +261,8 @@ define(function (require, exports, module) {
new NativeFileSystem.DirectoryEntry().getDirectory(ExtensionLoader.getUserExtensionPath(),
{create: true});

// WARNING: AppInit.appReady won't fire if ANY extension fails to
// load or throws an error during init. To fix this, we need to
// make a change to _initExtensions (filed as issue 1029)
// Load all extensions, and when done fire APP_READY (even if some extensions failed
// to load or initialize)
_initExtensions().always(function () {
AppInit._dispatchReady(AppInit.APP_READY);
});
Expand Down
Loading

0 comments on commit 779e86f

Please sign in to comment.