@@ -118,6 +118,26 @@ func Test_parseCallFrame(t *testing.T) {
118118 input : "at https://example.com/angular.min.js:31:225" ,
119119 want : callFrame {FuncName : "<none>" , File : "https://example.com/angular.min.js" , Line : 31 , Col : 225 },
120120 },
121+ {
122+ name : "Node.js 24+ (V8) receiver prefix for package-level function" ,
123+ input : "at Object.runtime.Callers (runtime.go:42:3)" ,
124+ want : callFrame {FuncName : "runtime.Callers" , File : "runtime.go" , Line : 42 , Col : 3 },
125+ },
126+ {
127+ name : "Node.js 24+ (V8) receiver prefix for function on type" ,
128+ input : "at typ2.github.com/gopherjs/gopherjs/tests.callStack.capture (runtime.go:42:3)" ,
129+ want : callFrame {FuncName : "github.com/gopherjs/gopherjs/tests.callStack.capture" , File : "runtime.go" , Line : 42 , Col : 3 },
130+ },
131+ {
132+ name : "Node.js 24+ (V8) receiver prefix for function on type" ,
133+ input : "at typ2.tests.callStack.capture (runtime.go:42:3)" ,
134+ want : callFrame {FuncName : "tests.callStack.capture" , File : "runtime.go" , Line : 42 , Col : 3 },
135+ },
136+ {
137+ name : "Node.js 24+ (V8) receiver prefix for function on type when minified" ,
138+ input : "at r.github.com/gopherjs/gopherjs/tests.callStack.capture (runtime.go:42:3)" ,
139+ want : callFrame {FuncName : "github.com/gopherjs/gopherjs/tests.callStack.capture" , File : "runtime.go" , Line : 42 , Col : 3 },
140+ },
121141 }
122142
123143 for _ , tt := range tests {
@@ -169,8 +189,8 @@ func (c *callStack) capture(amount int) {
169189func TestCallers (t * testing.T ) {
170190 // Some of the GopherJS function names don't match upstream Go, or even the
171191 // function names in the Go source when minified.
172- // Until https://github.com/gopherjs/gopherjs/issues/1085 is resolved, the
173- // mismatch is difficult to avoid, but we can at least use "masked" frames to
192+ // In some cases the mismatch is difficult to avoid even with source maps,
193+ // but we can at least use "masked" frames to
174194 // make sure the number of frames matches expected.
175195 opts := cmp .Comparer (func (a , b funcName ) bool {
176196 if a == masked ("" ) || b == masked ("" ) {
0 commit comments