@@ -750,26 +750,25 @@ func runNode(script string, args []string, dir string, quiet bool) error {
750
750
}
751
751
752
752
if runtime .GOOS != "windows" {
753
- // For non-windows OS environments, we've seen issues with stack space
754
- // limits causeing Go std library tests that are recursion-heavy to fail
755
- // (see https://github.com/gopherjs/gopherjs/issues/661 for more detail ).
753
+ // For non-Windows environments, we've seen issues with stack space
754
+ // limits causing Go standard library tests that are recursion-heavy to
755
+ // fail (see https://github.com/gopherjs/gopherjs/issues/661 for more details ).
756
756
//
757
- // There are two limits that come into play here, listed in order :
757
+ // There are two limits that come into play here:
758
758
//
759
759
// 1. V8 limit (NodeJS effectively wraps V8)
760
760
// 2. OS process limit
761
761
//
762
762
// In order to limit the surface area of the gopherjs command and not
763
- // expose V8 flags/options etc to the caller, we control limit 1 via
764
- // limit 2. That is to say, whatever value is returned by ulimit -s is
765
- // essentially the value that we pass on to NodeJS via the appropriate V8
766
- // flag.
763
+ // expose V8 flags/options etc. to the caller, we control limit 1 via
764
+ // limit 2. Whatever value is returned by ulimit -s is the value that we
765
+ // pass on to NodeJS via the appropriate V8 flag.
767
766
var r syscall.Rlimit
768
767
err := syscall .Getrlimit (syscall .RLIMIT_STACK , & r )
769
768
if err != nil {
770
769
return fmt .Errorf ("failed to get stack size limit: %v" , err )
771
770
}
772
- // rlimit value is in bytes, we need rounded kBytes value per node --v8-options.
771
+ // rlimit value is in bytes, we need rounded kilobytes value per node --v8-options.
773
772
stackSize := fmt .Sprintf ("--stack_size=%v" , r .Cur / 1000 )
774
773
allArgs = append (allArgs , stackSize )
775
774
}
0 commit comments