gopherjs/gopherjs — pull request #140 by shurcooL (2014-12-21 20:13:53+00:00)
Title: runtime, runtime/debug: Fix func signature, add missing stubs.

- The signature for `setGCPercent(int) int` has changed between 1.3 and 1.4 to become `setGCPercent(int32) int32`.
- Add missing `Entry`, `FileLine` method stubs to `runtime.Func` struct. This allows valid Go code to compile.

For the new `runtime.Func` methods, I've copied your approach of returning zero values from the stub.

However, given that your `FuncForPC(pc uintptr) *Func` always returns `nil`, wouldn't it be more valid to simply do `panic()` instead, since the user should never have a non-`nil` `*Func` available to them, and calling methods of a `nil` `*Func` is not valid? Although I suppose they could create an non-`nil` instance of `*Func` themselves somehow since it is exported...