diff options
author | 2013-08-14 18:14:37 +0000 | |
---|---|---|
committer | 2013-08-14 18:14:37 +0000 | |
commit | c1bf2de83549406de305e174af2b88630fdc3098 (patch) | |
tree | 60b747c6fbd9f70a6ab6f4cc6eabedd502be29bd /include | |
parent | 8e6b7c3c989d923af80dc4d473ac8d87d2ef3491 (diff) |
Fix crash when querying a runtime config that is defined in environment
Fix crash when querying a runtime config in case when there's no
skia.conf file and the config variable is still defined in the
environment.
Runs the added SkRTConf::UnitTest test as part of new "UnitTest" test.
Previous version of the patch failed Windows build due to setenv usage.
On Windows, use _putenv_s instead.
BUG=skia:1494
R=bsalomon@google.com, humper@google.com
Author: kkinnunen@nvidia.com
Review URL: https://chromiumcodereview.appspot.com/23174002
git-svn-id: http://skia.googlecode.com/svn/trunk@10715 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/utils/SkRTConf.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/utils/SkRTConf.h b/include/utils/SkRTConf.h index ea6e99ed89..dc1f461b11 100644 --- a/include/utils/SkRTConf.h +++ b/include/utils/SkRTConf.h @@ -73,6 +73,9 @@ public: void possiblyDumpFile() const; void validate() const; template <typename T> void set(const char *confname, T value); +#ifdef SK_SUPPORT_UNITTEST + static void UnitTest(); +#endif private: template<typename T> friend class SkRTConf; @@ -82,6 +85,9 @@ private: SkTDArray<SkString *> fConfigFileKeys, fConfigFileValues; typedef SkTDict< SkTDArray<SkRTConfBase *> * > ConfMap; ConfMap fConfs; +#ifdef SK_SUPPORT_UNITTEST + SkRTConfRegistry(bool); +#endif }; // our singleton registry |