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

Upgrade to Require 2.1.1 and catch errors during extension loading #1968

Merged
merged 2 commits into from
Oct 29, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -271,9 +270,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