| Index: third_party/mojo/src/mojo/public/go/system/handle.go
|
| diff --git a/third_party/mojo/src/mojo/public/go/system/handle.go b/third_party/mojo/src/mojo/public/go/system/handle.go
|
| index 6f020cf563fe55328db59e26b44ba55a77fda190..189c8dd15c030f3ec287cd9e331052135a61713b 100644
|
| --- a/third_party/mojo/src/mojo/public/go/system/handle.go
|
| +++ b/third_party/mojo/src/mojo/public/go/system/handle.go
|
| @@ -61,6 +61,7 @@ type UntypedHandle interface {
|
| }
|
|
|
| type baseHandle struct {
|
| + core *coreImpl
|
| mojoHandle MojoHandle
|
| }
|
|
|
| @@ -69,6 +70,9 @@ func (h *baseHandle) invalidate() {
|
| }
|
|
|
| func (h *baseHandle) Close() MojoResult {
|
| + h.core.mu.Lock()
|
| + defer h.core.mu.Unlock()
|
| +
|
| mojoHandle := h.mojoHandle
|
| h.invalidate()
|
| return MojoResult(C.MojoClose(mojoHandle.cValue()))
|
|
|