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

Unified Diff: third_party/mojo/src/mojo/public/go/system/data_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/data_pipe.go
diff --git a/third_party/mojo/src/mojo/public/go/system/data_pipe.go b/third_party/mojo/src/mojo/public/go/system/data_pipe.go
index a433074beb7bcb4ec15d801d53ea728e1b145bf6..b79a1e0395c965452f96dcbbeccb3196c39b0e81 100644
--- a/third_party/mojo/src/mojo/public/go/system/data_pipe.go
+++ b/third_party/mojo/src/mojo/public/go/system/data_pipe.go
@@ -86,9 +86,6 @@
}
func (h *dataPipeConsumer) ReadData(flags MojoReadDataFlags) (MojoResult, []byte) {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cParams := C.MallocReadDataParams()
defer C.FreeReadDataParams(cParams)
*cParams.num_bytes = 0
@@ -106,9 +103,6 @@
}
func (h *dataPipeConsumer) BeginReadData(numBytes int, flags MojoReadDataFlags) (MojoResult, []byte) {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cParams := C.MallocTwoPhaseActionParams()
defer C.FreeTwoPhaseActionParams(cParams)
*cParams.num_bytes = C.uint32_t(numBytes)
@@ -118,9 +112,6 @@
}
func (h *dataPipeConsumer) EndReadData(numBytesRead int) MojoResult {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
return MojoResult(C.MojoEndReadData(h.mojoHandle.cValue(), C.uint32_t(numBytesRead)))
}
@@ -129,9 +120,6 @@
}
func (h *dataPipeProducer) WriteData(data []byte, flags MojoWriteDataFlags) (MojoResult, int) {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cParams := C.MallocWriteDataParams(C.uint32_t(len(data)))
defer C.FreeWriteDataParams(cParams)
*cParams.num_bytes = C.uint32_t(len(data))
@@ -142,9 +130,6 @@
}
func (h *dataPipeProducer) BeginWriteData(numBytes int, flags MojoWriteDataFlags) (MojoResult, []byte) {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
cParams := C.MallocTwoPhaseActionParams()
defer C.FreeTwoPhaseActionParams(cParams)
*cParams.num_bytes = C.uint32_t(numBytes)
@@ -154,8 +139,5 @@
}
func (h *dataPipeProducer) EndWriteData(numBytesWritten int) MojoResult {
- h.core.mu.Lock()
- defer h.core.mu.Unlock()
-
return MojoResult(C.MojoEndWriteData(h.mojoHandle.cValue(), C.uint32_t(numBytesWritten)))
}
« no previous file with comments | « third_party/mojo/src/mojo/public/go/system/core.go ('k') | third_party/mojo/src/mojo/public/go/system/handle.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698