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

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

Issue 167683003: use v8 Microtask Queue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: cr changes Created 6 years, 10 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 | Annotate | Revision Log
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; } 117 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; }
118 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; } 118 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; }
119 119
120 v8::Handle<v8::FunctionTemplate> privateTemplate(WrapperWorldType, void* pri vatePointer, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v 8::Value>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0); 120 v8::Handle<v8::FunctionTemplate> privateTemplate(WrapperWorldType, void* pri vatePointer, v8::FunctionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v 8::Value>(), v8::Handle<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0);
121 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v oid* privatePointer); 121 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v oid* privatePointer);
122 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v 8::FunctionTemplate>); 122 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v 8::FunctionTemplate>);
123 123
124 bool hasInstanceInMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value>); 124 bool hasInstanceInMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value>);
125 bool hasInstanceInNonMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value> ); 125 bool hasInstanceInNonMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value> );
126 126
127 v8::Local<v8::Context> ensureRegexContext(); 127 v8::Local<v8::Context> ensureDomInJSContext();
128 128
129 const char* previousSamplingState() const { return m_previousSamplingState; } 129 const char* previousSamplingState() const { return m_previousSamplingState; }
130 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; } 130 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; }
131 131
132 private: 132 private:
133 explicit V8PerIsolateData(v8::Isolate*); 133 explicit V8PerIsolateData(v8::Isolate*);
134 ~V8PerIsolateData(); 134 ~V8PerIsolateData();
135 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap& ); 135 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap& );
136 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& ); 136 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& );
137 137
138 v8::Isolate* m_isolate; 138 v8::Isolate* m_isolate;
139 bool m_isMainThread; // Caches the result of isMainThread() for performance. 139 bool m_isMainThread; // Caches the result of isMainThread() for performance.
140 TemplateMap m_templatesForMainWorld; 140 TemplateMap m_templatesForMainWorld;
141 TemplateMap m_templatesForNonMainWorld; 141 TemplateMap m_templatesForNonMainWorld;
142 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; 142 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
143 OwnPtr<StringCache> m_stringCache; 143 OwnPtr<StringCache> m_stringCache;
144 144
145 Vector<DOMDataStore*> m_domDataStoreList; 145 Vector<DOMDataStore*> m_domDataStoreList;
146 146
147 ScopedPersistent<v8::Value> m_liveRoot; 147 ScopedPersistent<v8::Value> m_liveRoot;
148 ScopedPersistent<v8::Context> m_regexContext; 148 ScopedPersistent<v8::Context> m_domInJSContext;
149 149
150 const char* m_previousSamplingState; 150 const char* m_previousSamplingState;
151 151
152 bool m_constructorMode; 152 bool m_constructorMode;
153 friend class ConstructorMode; 153 friend class ConstructorMode;
154 154
155 int m_recursionLevel; 155 int m_recursionLevel;
156 156
157 #ifndef NDEBUG 157 #ifndef NDEBUG
158 int m_internalScriptRecursionLevel; 158 int m_internalScriptRecursionLevel;
159 #endif 159 #endif
160 OwnPtr<GCEventData> m_gcEventData; 160 OwnPtr<GCEventData> m_gcEventData;
161 bool m_shouldCollectGarbageSoon; 161 bool m_shouldCollectGarbageSoon;
162 bool m_performingMicrotaskCheckpoint; 162 bool m_performingMicrotaskCheckpoint;
163 }; 163 };
164 164
165 } // namespace WebCore 165 } // namespace WebCore
166 166
167 #endif // V8PerIsolateData_h 167 #endif // V8PerIsolateData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698