Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: Source/bindings/v8/V8PerIsolateData.h

Issue 24403002: [ABANDONED] Implement ThenableCoercions for AP2 Promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/ThenableCoercionsTest.cpp ('k') | Source/bindings/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 #include "wtf/Forward.h" 33 #include "wtf/Forward.h"
34 #include "wtf/HashMap.h" 34 #include "wtf/HashMap.h"
35 #include "wtf/OwnPtr.h" 35 #include "wtf/OwnPtr.h"
36 #include "wtf/Vector.h" 36 #include "wtf/Vector.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class DOMDataStore; 40 class DOMDataStore;
41 class GCEventData; 41 class GCEventData;
42 class StringCache; 42 class StringCache;
43 class ThenableCoercions;
43 class V8HiddenPropertyName; 44 class V8HiddenPropertyName;
44 struct WrapperTypeInfo; 45 struct WrapperTypeInfo;
45 46
46 class ExternalStringVisitor; 47 class ExternalStringVisitor;
47 48
48 typedef WTF::Vector<DOMDataStore*> DOMDataList; 49 typedef WTF::Vector<DOMDataStore*> DOMDataList;
49 50
50 class V8PerIsolateData { 51 class V8PerIsolateData {
51 public: 52 public:
52 static V8PerIsolateData* create(v8::Isolate*); 53 static V8PerIsolateData* create(v8::Isolate*);
(...skipping 27 matching lines...) Expand all
80 } 81 }
81 82
82 v8::Handle<v8::FunctionTemplate> toStringTemplate(); 83 v8::Handle<v8::FunctionTemplate> toStringTemplate();
83 v8::Handle<v8::FunctionTemplate> lazyEventListenerToStringTemplate() 84 v8::Handle<v8::FunctionTemplate> lazyEventListenerToStringTemplate()
84 { 85 {
85 return v8::Local<v8::FunctionTemplate>::New(m_isolate, m_lazyEventListen erToStringTemplate); 86 return v8::Local<v8::FunctionTemplate>::New(m_isolate, m_lazyEventListen erToStringTemplate);
86 } 87 }
87 88
88 StringCache* stringCache() { return m_stringCache.get(); } 89 StringCache* stringCache() { return m_stringCache.get(); }
89 90
91 ThenableCoercions* thenableCoercions() { return m_thenableCoercions.get(); }
92
90 v8::Persistent<v8::Value>& ensureLiveRoot(); 93 v8::Persistent<v8::Value>& ensureLiveRoot();
91 94
92 DOMDataList& allStores() { return m_domDataList; } 95 DOMDataList& allStores() { return m_domDataList; }
93 96
94 V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get (); } 97 V8HiddenPropertyName* hiddenPropertyName() { return m_hiddenPropertyName.get (); }
95 98
96 void registerDOMDataStore(DOMDataStore* domDataStore) 99 void registerDOMDataStore(DOMDataStore* domDataStore)
97 { 100 {
98 ASSERT(m_domDataList.find(domDataStore) == kNotFound); 101 ASSERT(m_domDataList.find(domDataStore) == kNotFound);
99 m_domDataList.append(domDataStore); 102 m_domDataList.append(domDataStore);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& ); 151 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& );
149 152
150 v8::Isolate* m_isolate; 153 v8::Isolate* m_isolate;
151 TemplateMap m_rawTemplatesForMainWorld; 154 TemplateMap m_rawTemplatesForMainWorld;
152 TemplateMap m_rawTemplatesForNonMainWorld; 155 TemplateMap m_rawTemplatesForNonMainWorld;
153 TemplateMap m_templatesForMainWorld; 156 TemplateMap m_templatesForMainWorld;
154 TemplateMap m_templatesForNonMainWorld; 157 TemplateMap m_templatesForNonMainWorld;
155 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; 158 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
156 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate; 159 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate;
157 OwnPtr<StringCache> m_stringCache; 160 OwnPtr<StringCache> m_stringCache;
161 OwnPtr<ThenableCoercions> m_thenableCoercions;
158 162
159 Vector<DOMDataStore*> m_domDataList; 163 Vector<DOMDataStore*> m_domDataList;
160 DOMDataStore* m_workerDomDataStore; 164 DOMDataStore* m_workerDomDataStore;
161 165
162 OwnPtr<V8HiddenPropertyName> m_hiddenPropertyName; 166 OwnPtr<V8HiddenPropertyName> m_hiddenPropertyName;
163 ScopedPersistent<v8::Value> m_liveRoot; 167 ScopedPersistent<v8::Value> m_liveRoot;
164 ScopedPersistent<v8::Context> m_regexContext; 168 ScopedPersistent<v8::Context> m_regexContext;
165 169
166 const char* m_previousSamplingState; 170 const char* m_previousSamplingState;
167 171
168 bool m_constructorMode; 172 bool m_constructorMode;
169 friend class ConstructorMode; 173 friend class ConstructorMode;
170 174
171 int m_recursionLevel; 175 int m_recursionLevel;
172 176
173 #ifndef NDEBUG 177 #ifndef NDEBUG
174 int m_internalScriptRecursionLevel; 178 int m_internalScriptRecursionLevel;
175 #endif 179 #endif
176 OwnPtr<GCEventData> m_gcEventData; 180 OwnPtr<GCEventData> m_gcEventData;
177 bool m_shouldCollectGarbageSoon; 181 bool m_shouldCollectGarbageSoon;
178 }; 182 };
179 183
180 } // namespace WebCore 184 } // namespace WebCore
181 185
182 #endif // V8PerIsolateData_h 186 #endif // V8PerIsolateData_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/ThenableCoercionsTest.cpp ('k') | Source/bindings/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698