| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 static V8PerIsolateData* create(v8::Isolate*); | 52 static V8PerIsolateData* create(v8::Isolate*); |
| 53 static void ensureInitialized(v8::Isolate*); | 53 static void ensureInitialized(v8::Isolate*); |
| 54 static V8PerIsolateData* current() | 54 static V8PerIsolateData* current() |
| 55 { | 55 { |
| 56 return from(v8::Isolate::GetCurrent()); | 56 return from(v8::Isolate::GetCurrent()); |
| 57 } | 57 } |
| 58 static V8PerIsolateData* from(v8::Isolate* isolate) | 58 static V8PerIsolateData* from(v8::Isolate* isolate) |
| 59 { | 59 { |
| 60 ASSERT(isolate); | 60 ASSERT(isolate); |
| 61 ASSERT(isolate->GetData()); | 61 ASSERT(isolate->GetData()); |
| 62 return static_cast<V8PerIsolateData*>(isolate->GetData()); | 62 return static_cast<V8PerIsolateData*>(isolate->GetData()); |
| 63 } | 63 } |
| 64 static void dispose(v8::Isolate*); | 64 static void dispose(v8::Isolate*); |
| 65 | 65 |
| 66 typedef HashMap<void*, UnsafePersistent<v8::FunctionTemplate> > TemplateMap; | 66 typedef HashMap<void*, UnsafePersistent<v8::FunctionTemplate> > TemplateMap; |
| 67 | 67 |
| 68 TemplateMap& rawTemplateMap(WrapperWorldType worldType) | 68 TemplateMap& rawTemplateMap(WrapperWorldType worldType) |
| 69 { | 69 { |
| 70 if (worldType == MainWorld) | 70 if (worldType == MainWorld) |
| 71 return m_rawTemplatesForMainWorld; | 71 return m_rawTemplatesForMainWorld; |
| 72 return m_rawTemplatesForNonMainWorld; | 72 return m_rawTemplatesForNonMainWorld; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 87 | 87 |
| 88 StringCache* stringCache() { return m_stringCache.get(); } | 88 StringCache* stringCache() { return m_stringCache.get(); } |
| 89 | 89 |
| 90 v8::Persistent<v8::Value>& ensureLiveRoot(); | 90 v8::Persistent<v8::Value>& ensureLiveRoot(); |
| 91 | 91 |
| 92 void visitExternalStrings(ExternalStringVisitor*); | 92 void visitExternalStrings(ExternalStringVisitor*); |
| 93 DOMDataList& allStores() { return m_domDataList; } | 93 DOMDataList& allStores() { return m_domDataList; } |
| 94 | 94 |
| 95 V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get
(); } | 95 V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get
(); } |
| 96 | 96 |
| 97 void registerDOMDataStore(DOMDataStore* domDataStore) | 97 void registerDOMDataStore(DOMDataStore* domDataStore) |
| 98 { | 98 { |
| 99 ASSERT(m_domDataList.find(domDataStore) == notFound); | 99 ASSERT(m_domDataList.find(domDataStore) == notFound); |
| 100 m_domDataList.append(domDataStore); | 100 m_domDataList.append(domDataStore); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void unregisterDOMDataStore(DOMDataStore* domDataStore) | 103 void unregisterDOMDataStore(DOMDataStore* domDataStore) |
| 104 { | 104 { |
| 105 ASSERT(m_domDataList.find(domDataStore) != notFound); | 105 ASSERT(m_domDataList.find(domDataStore) != notFound); |
| 106 m_domDataList.remove(m_domDataList.find(domDataStore)); | 106 m_domDataList.remove(m_domDataList.find(domDataStore)); |
| 107 } | 107 } |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 #ifndef NDEBUG | 174 #ifndef NDEBUG |
| 175 int m_internalScriptRecursionLevel; | 175 int m_internalScriptRecursionLevel; |
| 176 #endif | 176 #endif |
| 177 OwnPtr<GCEventData> m_gcEventData; | 177 OwnPtr<GCEventData> m_gcEventData; |
| 178 bool m_shouldCollectGarbageSoon; | 178 bool m_shouldCollectGarbageSoon; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace WebCore | 181 } // namespace WebCore |
| 182 | 182 |
| 183 #endif // V8PerIsolateData_h | 183 #endif // V8PerIsolateData_h |
| OLD | NEW |