diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/values.cc | 9 | ||||
-rw-r--r-- | base/values.h | 8 |
2 files changed, 16 insertions, 1 deletions
diff --git a/base/values.cc b/base/values.cc index 191995c..799e100 100644 --- a/base/values.cc +++ b/base/values.cc @@ -65,7 +65,9 @@ namespace base { ///////////////////// Value //////////////////// Value::~Value() { +#if !defined(OS_CHROMEOS) CHECK(!check_on_delete_); +#endif } // static @@ -147,7 +149,12 @@ bool Value::Equals(const Value* a, const Value* b) { return a->Equals(b); } -Value::Value(Type type) : type_(type), check_on_delete_(false) { +Value::Value(Type type) + : type_(type) +#if !defined(OS_CHROMEOS) + , check_on_delete_(false) +#endif +{ } ///////////////////// FundamentalValue //////////////////// diff --git a/base/values.h b/base/values.h index 19a3c92..d33d031 100644 --- a/base/values.h +++ b/base/values.h @@ -113,9 +113,15 @@ class BASE_EXPORT Value { // NULLs are considered equal but different from Value::CreateNullValue(). static bool Equals(const Value* a, const Value* b); +#if !defined(OS_CHROMEOS) + // NOTE: We pass Value from libcros tp Chrome, so changing the size of Value + // breaks it. TODO(stevenjb): Eliminate that dependency (crosbug.com/19576). // TODO(sky) bug 91396: remove this when we figure out 91396. // If true crash when deleted. void set_check_on_delete(bool value) { check_on_delete_ = value; } +#else + void set_check_on_delete(bool value) {} +#endif protected: // This isn't safe for end-users (they should use the Create*Value() @@ -125,8 +131,10 @@ class BASE_EXPORT Value { private: Type type_; +#if !defined(OS_CHROMEOS) // See description above setter. bool check_on_delete_; +#endif DISALLOW_COPY_AND_ASSIGN(Value); }; |