-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Extension.getSettings() actually create a new instance every time it's called. To avoid that call it once when the extension is enabled and pass the object to all classes where it's needed. 2. Eliminate Extension.lookupByURL() as per code review feedback. Instead pass the extension object to all classes where needed. 3. Simplyfy destory in extension.js.
- Loading branch information
1 parent
7a54844
commit 7b6f16b
Showing
4 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,7 +254,6 @@ StopWatch.prototype.printElapsed = function (name) { | |
export const logError = function(error) { | ||
let sourceFile = error.fileName; | ||
let sourceLine = error.lineNumber; | ||
let extensionObject = Extension.lookupByURL(import.meta.url); | ||
|
||
console.error(`Extension ${extensionObject.metadata.uuid}: "${error}" ${sourceFile}:${sourceLine}`); | ||
console.error(`Extension [email protected]: "${error}" ${sourceFile}:${sourceLine}`); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters