Przeglądaj źródła

Watch inspected objects for changes only where there is a DOM.

HLInspector class starts refreshing its inspectors every half second
as its package loads. Outside the browser there is nothing to refresh,
and the interval kept Node alive after the test runner had reported,
so grunt test never finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Herby Vojčík 1 dzień temu
rodzic
commit
280d433092
2 zmienionych plików z 7 dodań i 4 usunięć
  1. 5 3
      src/Helios-Inspector.js
  2. 2 1
      src/Helios-Inspector.st

+ 5 - 3
src/Helios-Inspector.js

@@ -1781,11 +1781,11 @@ selector: "initialize",
 protocol: "initialization",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
-referencedClasses: [],
+source: "initialize\x0a\x09super initialize.\x0a\x09PlatformDom isFeasible ifTrue: [\x0a\x09\x09self watchChanges ]",
+referencedClasses: ["PlatformDom"],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["initialize", "watchChanges"]
+messageSends: ["initialize", "ifTrue:", "isFeasible", "watchChanges"]
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1800,7 +1800,9 @@ $ctx1.supercall = true,
 ,$ctx1.supercall = false
 //>>excludeEnd("ctx");
 ][0];
+if($core.assert($recv($globals.PlatformDom)._isFeasible())){
 $self._watchChanges();
+}
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{})});

+ 2 - 1
src/Helios-Inspector.st

@@ -428,7 +428,8 @@ inspect: anObject
 
 initialize
 	super initialize.
-	self watchChanges
+	PlatformDom isFeasible ifTrue: [
+		self watchChanges ]
 !
 
 watchChanges