webengine/osswebengine/JavaScriptCore/kjs/CommonIdentifiers.cpp
changeset 5 10e98eab6f85
parent 0 dd21522fd290
equal deleted inserted replaced
1:7c90e6132015 5:10e98eab6f85
    32     , underscoreProto("__proto__")
    32     , underscoreProto("__proto__")
    33     KJS_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME)
    33     KJS_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PROPERTY_NAME)
    34 {
    34 {
    35 }
    35 }
    36 
    36 
       
    37 static CommonIdentifiers* sharedInstance=0;
       
    38     
       
    39 struct cleanupCommonIdentifiers {
       
    40     ~cleanupCommonIdentifiers() {
       
    41         delete sharedInstance;
       
    42         sharedInstance=0;
       
    43     }
       
    44 };
       
    45 struct cleanupCommonIdentifiers cleanupIdentifiers;
       
    46 
    37 CommonIdentifiers* CommonIdentifiers::shared()
    47 CommonIdentifiers* CommonIdentifiers::shared()
    38 {
    48 {
    39     static CommonIdentifiers* sharedInstance;
       
    40     if (!sharedInstance) {
    49     if (!sharedInstance) {
    41         JSLock lock;
    50         JSLock lock;
    42         sharedInstance = new CommonIdentifiers;
    51         sharedInstance = new CommonIdentifiers;
    43     }
    52     }
    44     return sharedInstance;
    53     return sharedInstance;