Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1644)

Unified Diff: third_party/mojo/src/mojo/public/go/system/message_pipe.go

Issue 890843003: Revert of Update mojo sdk to rev 8af2ccff2eee4bfca1043015abee30482a030b30 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/go/system/message_pipe.go
diff --git a/third_party/mojo/src/mojo/public/go/system/message_pipe.go b/third_party/mojo/src/mojo/public/go/system/message_pipe.go
index 79f0ae962439a358cd3c1a69004bb1d9f8b49cf2..3188ecfe256fc6f79489a6d8ae1a9efa6a81d47e 100644
--- a/third_party/mojo/src/mojo/public/go/system/message_pipe.go
+++ b/third_party/mojo/src/mojo/public/go/system/message_pipe.go
@@ -32,9 +32,6 @@
}
func (h *messagePipe) ReadMessage(flags MojoReadMessageFlags) (MojoResult, []byte, []UntypedHandle) {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cParams := C.MallocReadMessageParams()
defer C.FreeReadMessageParams(cParams)
*cParams.num_bytes = 0
@@ -55,15 +52,12 @@
cHandles := *(*[]MojoHandle)(newUnsafeSlice(unsafe.Pointer(cArrays.handles), handlesLen))
handles := []UntypedHandle{}
for i := 0; i < handlesLen; i++ {
- handles = append(handles, h.core.AcquireNativeHandle(cHandles[i]))
+ handles = append(handles, &untypedHandleImpl{baseHandle{cHandles[i]}})
}
return MojoResult(result), bytes, handles
}
func (h *messagePipe) WriteMessage(bytes []byte, handles []UntypedHandle, flags MojoWriteMessageFlags) MojoResult {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cArrays := C.MallocMessageArrays(C.uint32_t(len(bytes)), C.uint32_t(len(handles)))
defer C.FreeMessageArrays(cArrays)
cBytes := *(*[]byte)(newUnsafeSlice(unsafe.Pointer(cArrays.bytes), len(bytes)))
« no previous file with comments | « third_party/mojo/src/mojo/public/go/system/handle.go ('k') | third_party/mojo/src/mojo/public/go/system/mojo_types.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698