cdp-tunnel 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -424,6 +424,11 @@ function checkTabVisibility(tabId) {
|
|
|
424
424
|
var isOwnedByClient = isCDPCreated && State.getClientIdByTabId(tabId) === clientId;
|
|
425
425
|
var otherClientOwns = isCDPCreated && !isOwnedByClient;
|
|
426
426
|
|
|
427
|
+
if (!isCDPCreated) {
|
|
428
|
+
Logger.info('[CDP] Skipping non-CDP (user) tab:', targetId, 'tabId:', tabId);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
|
|
427
432
|
if (otherClientOwns) {
|
|
428
433
|
Logger.info('[CDP] Skipping other-client tab:', targetId, 'tabId:', tabId);
|
|
429
434
|
State.addEmittedTarget(targetId);
|
|
@@ -432,21 +437,13 @@ function checkTabVisibility(tabId) {
|
|
|
432
437
|
|
|
433
438
|
State.addEmittedTarget(targetId);
|
|
434
439
|
var targetInfo = LocalHandler.mapToTargetInfo(target);
|
|
435
|
-
var isPreExisting = !isCDPCreated;
|
|
436
440
|
|
|
437
|
-
Logger.info('[CDP] Emitting target:', targetId, 'tabId:', tabId
|
|
441
|
+
Logger.info('[CDP] Emitting CDP-owned target:', targetId, 'tabId:', tabId);
|
|
438
442
|
|
|
439
443
|
var attachLogic = function(attached) {
|
|
440
444
|
var sessionId = CDPUtils.generateSessionId();
|
|
441
445
|
State.mapSession(sessionId, tabId, targetId);
|
|
442
446
|
|
|
443
|
-
if (isPreExisting && clientId) {
|
|
444
|
-
State.setTabIdToClientId(tabId, clientId);
|
|
445
|
-
}
|
|
446
|
-
if (isPreExisting) {
|
|
447
|
-
State.addPreExistingTab(tabId);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
447
|
if (config.waitForDebuggerOnStart) {
|
|
451
448
|
State.addPendingDebuggerTab(tabId);
|
|
452
449
|
}
|
package/package.json
CHANGED