Index: go/src/infra/gae/libs/gae/memory/globalinfo.go |
diff --git a/go/src/infra/gae/libs/gae/memory/globalinfo.go b/go/src/infra/gae/libs/gae/memory/globalinfo.go |
index 75232d406b250d1a5c4fec97898abb3bb3c92d7b..87f42f0a1717e41fb4c3cb97539727f32d0c4449 100644 |
--- a/go/src/infra/gae/libs/gae/memory/globalinfo.go |
+++ b/go/src/infra/gae/libs/gae/memory/globalinfo.go |
@@ -33,18 +33,29 @@ func useGI(c context.Context) context.Context { |
// route this value through to without making the internal APIs really complex. |
const globalAppID = "dev~app" |
-type globalInfoData struct{ namespace string } |
+type globalInfoData struct { |
+ gae.BrokenFeatures |
+ |
+ namespace string |
+} |
type giImpl struct { |
gae.GlobalInfo |
- data *globalInfoData |
- c context.Context |
+ *globalInfoData |
+ c context.Context |
} |
var _ = gae.GlobalInfo((*giImpl)(nil)) |
-func (gi *giImpl) Namespace(ns string) (context.Context, error) { |
- return context.WithValue(gi.c, giContextKey, &globalInfoData{ns}), nil |
+func (gi *giImpl) Namespace(ns string) (ret context.Context, err error) { |
+ err = gi.RunIfNotBroken(func() error { |
+ ret = context.WithValue(gi.c, giContextKey, &globalInfoData{ |
+ curGID(gi.c).BrokenFeatures, |
+ ns, |
+ }) |
+ return nil |
+ }) |
+ return |
} |
func (gi *giImpl) AppID() string { |