Browse Source

Update stack string parsing in the CallbacksRegistry

Fixes the "ipc module > remote listeners
> detaches listeners subscribed to destroyed renderers, and shows a warning"
test.
Aleksei Kuzmin 7 years ago
parent
commit
465f9009ff
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/common/api/callbacks-registry.js

+ 2 - 1
lib/common/api/callbacks-registry.js

@@ -25,7 +25,8 @@ class CallbacksRegistry {
 
     while ((match = regexp.exec(stackString)) !== null) {
       const location = match[1]
-      if (location.includes('native')) continue
+      if (location.includes('(native)')) continue
+      if (location.includes('(<anonymous>)')) continue
       if (location.includes('electron.asar')) continue
 
       const ref = /([^/^)]*)\)?$/gi.exec(location)