(ctx context.Context, oref ORef)
| 58 | } |
| 59 | |
| 60 | func ContextGetUpdate(ctx context.Context, oref ORef) *WaveObjUpdate { |
| 61 | updatesVal := ctx.Value(waveObjUpdateKey) |
| 62 | if updatesVal == nil { |
| 63 | return nil |
| 64 | } |
| 65 | updates := updatesVal.(*contextUpdatesType) |
| 66 | for idx := len(updates.UpdatesStack) - 1; idx >= 0; idx-- { |
| 67 | if obj, ok := updates.UpdatesStack[idx][oref]; ok { |
| 68 | return &obj |
| 69 | } |
| 70 | } |
| 71 | return nil |
| 72 | } |
| 73 | |
| 74 | func ContextAddUpdate(ctx context.Context, update WaveObjUpdate) { |
| 75 | updatesVal := ctx.Value(waveObjUpdateKey) |