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

Unified Diff: third_party/mojo/src/mojo/public/go/bindings/message.go

Issue 1019173002: Update mojo sdk to rev 7214b7ec7d27563b2666afad86cf1c5895c56c18 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep permission service alive if embedder drops requests Created 5 years, 9 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/bindings/message.go
diff --git a/third_party/mojo/src/mojo/public/go/bindings/message.go b/third_party/mojo/src/mojo/public/go/bindings/message.go
index e5c832975a8f217ffa655cc0ba925f90596f2952..8455cd4b1e1323c4a11fc7a9120de09dfde2337d 100644
--- a/third_party/mojo/src/mojo/public/go/bindings/message.go
+++ b/third_party/mojo/src/mojo/public/go/bindings/message.go
@@ -68,10 +68,11 @@ func (h *MessageHeader) Encode(encoder *Encoder) error {
}
func (h *MessageHeader) Decode(decoder *Decoder) error {
- numFields, err := decoder.StartStruct()
+ header, err := decoder.StartStruct()
if err != nil {
return err
}
+ numFields := header.ElementsOrVersion
if numFields < 2 || numFields > 3 {
return fmt.Errorf("Invalid message header: it should have 2 or 3 fileds, but has %d", numFields)
}
« no previous file with comments | « third_party/mojo/src/mojo/public/go/bindings/interface.go ('k') | third_party/mojo/src/mojo/public/go/bindings/router.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698