[Pkg-mozext-commits] [tabmixplus] 126/147: Fix file parsing in informAboutChangeInTabmix

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:27:44 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 50bf79775241dddd65b38f51f7cdbca274f45add
Author: onemen <tabmix.onemen at gmail.com>
Date:   Tue Apr 11 17:10:54 2017 +0300

    Fix file parsing in informAboutChangeInTabmix
---
 chrome/content/utils.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/chrome/content/utils.js b/chrome/content/utils.js
index 199001a..f1228f9 100644
--- a/chrome/content/utils.js
+++ b/chrome/content/utils.js
@@ -117,14 +117,14 @@ var Tabmix = {
     let err = Error(aOldName + " is deprecated in Tabmix, use " + aNewName + " instead.");
     // cut off the first lines, we looking for the function that trigger the getter.
     let stack = Error().stack.split("\n").slice(3);
-    let file = stack[0] ? stack[0].split(":") : null;
-    if (file) {
-      let [path, line] = file;
-      let index = path.indexOf("/", 2) - 3;
+    let stackData = stack[0] ? stack[0].split("@") : null;
+    if (stackData && stackData.length == 2) {
+      let [path, line] = stackData[1].replace("chrome://", "").split(":");
+      let index = path.indexOf("/") - 1;
       let extensionName = index > -1 ?
-         path.charAt(2).toUpperCase() + path.substr(3, index) + " " : "";
+         path.charAt(0).toUpperCase() + path.substr(1, index) + " " : "";
       this.clog(err.message + "\n\n" + extensionName + "extension call " + aOldName +
-                 " from:\nfile: chrome:" + path + "\nline: " + line +
+                 " from:\nfile: chrome://" + path + "\nline: " + line +
                  "\n\nPlease inform Tabmix Plus developer" +
                  (extensionName ? (" and " + extensionName + "developer.") : "."));
     } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list