Chromium Code Reviews| Index: src/interface.h | 
| diff --git a/src/interface.h b/src/interface.h | 
| index 598d0381427095c4c9f31de6365385757ac328b0..4f0a204525336dfc12d87356a28214be9cf89caa 100644 | 
| --- a/src/interface.h | 
| +++ b/src/interface.h | 
| @@ -6,6 +6,7 @@ | 
| #define V8_INTERFACE_H_ | 
| #include "src/ast-value-factory.h" | 
| +#include "src/base/lazy-instance.h" | 
| 
 
Benedikt Meurer
2014/10/21 04:09:05
No need for this include, see comment below.
 
 | 
| #include "src/zone-inl.h" // For operator new. | 
| namespace v8 { | 
| @@ -41,15 +42,9 @@ class Interface : public ZoneObject { | 
| return new(zone) Interface(NONE); | 
| } | 
| - static Interface* NewValue() { | 
| - static Interface value_interface(VALUE + FROZEN); // Cached. | 
| - return &value_interface; | 
| - } | 
| + static Interface* NewValue(); | 
| - static Interface* NewConst() { | 
| - static Interface value_interface(VALUE + CONST + FROZEN); // Cached. | 
| - return &value_interface; | 
| - } | 
| + static Interface* NewConst(); | 
| static Interface* NewModule(Zone* zone) { | 
| return new(zone) Interface(MODULE); | 
| @@ -202,6 +197,11 @@ class Interface : public ZoneObject { | 
| #endif | 
| } | 
| + struct ValueCreate; | 
| + struct ConstCreate; | 
| + static base::LazyInstance<Interface*, ValueCreate>::type value_interface_; | 
| 
 
Benedikt Meurer
2014/10/21 04:09:05
Move the statics to the .cc file and hide them in
 
rossberg
2014/10/21 10:42:52
Done. Also changed them to do in-place constructio
 
 | 
| + static base::LazyInstance<Interface*, ConstCreate>::type const_interface_; | 
| + | 
| Interface* Chase() { | 
| Interface* result = this; | 
| while (result->forward_ != NULL) result = result->forward_; |