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

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: sync Created 6 years, 9 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
« no previous file with comments | « Source/bindings/v8/ScriptRegexp.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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 GCEventData* gcEventData() { return m_gcEventData.get(); } 90 GCEventData* gcEventData() { return m_gcEventData.get(); }
91 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); } 91 V8HiddenValue* hiddenValue() { return m_hiddenValue.get(); }
92 92
93 v8::Handle<v8::FunctionTemplate> domTemplate(void* domTemplateKey, v8::Funct ionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::Value>(), v8::Handl e<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0); 93 v8::Handle<v8::FunctionTemplate> domTemplate(void* domTemplateKey, v8::Funct ionCallback = 0, v8::Handle<v8::Value> data = v8::Handle<v8::Value>(), v8::Handl e<v8::Signature> = v8::Handle<v8::Signature>(), int length = 0);
94 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey); 94 v8::Handle<v8::FunctionTemplate> existingDOMTemplate(void* domTemplateKey);
95 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>); 95 void setDOMTemplate(void* domTemplateKey, v8::Handle<v8::FunctionTemplate>);
96 96
97 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>); 97 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>);
98 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>); 98 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>);
99 99
100 v8::Local<v8::Context> ensureRegexContext(); 100 v8::Local<v8::Context> ensureDomInJSContext();
101 101
102 const char* previousSamplingState() const { return m_previousSamplingState; } 102 const char* previousSamplingState() const { return m_previousSamplingState; }
103 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; } 103 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; }
104 104
105 private: 105 private:
106 explicit V8PerIsolateData(v8::Isolate*); 106 explicit V8PerIsolateData(v8::Isolate*);
107 ~V8PerIsolateData(); 107 ~V8PerIsolateData();
108 108
109 typedef HashMap<const void*, UnsafePersistent<v8::FunctionTemplate> > DOMTem plateMap; 109 typedef HashMap<const void*, UnsafePersistent<v8::FunctionTemplate> > DOMTem plateMap;
110 DOMTemplateMap& currentDOMTemplateMap(); 110 DOMTemplateMap& currentDOMTemplateMap();
111 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM ap&); 111 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateM ap&);
112 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateMap&); 112 v8::Handle<v8::Object> findInstanceInPrototypeChain(const WrapperTypeInfo*, v8::Handle<v8::Value>, DOMTemplateMap&);
113 113
114 v8::Isolate* m_isolate; 114 v8::Isolate* m_isolate;
115 OwnPtr<gin::IsolateHolder> m_isolateHolder; 115 OwnPtr<gin::IsolateHolder> m_isolateHolder;
116 DOMTemplateMap m_domTemplateMapForMainWorld; 116 DOMTemplateMap m_domTemplateMapForMainWorld;
117 DOMTemplateMap m_domTemplateMapForNonMainWorld; 117 DOMTemplateMap m_domTemplateMapForNonMainWorld;
118 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; 118 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
119 OwnPtr<StringCache> m_stringCache; 119 OwnPtr<StringCache> m_stringCache;
120 OwnPtr<V8HiddenValue> m_hiddenValue; 120 OwnPtr<V8HiddenValue> m_hiddenValue;
121 ScopedPersistent<v8::Value> m_liveRoot; 121 ScopedPersistent<v8::Value> m_liveRoot;
122 OwnPtr<V8PerContextData> m_perContextDataForRegex; 122 OwnPtr<V8PerContextData> m_domInJSPerContextData;
123 123
124 const char* m_previousSamplingState; 124 const char* m_previousSamplingState;
125 125
126 bool m_constructorMode; 126 bool m_constructorMode;
127 friend class ConstructorMode; 127 friend class ConstructorMode;
128 128
129 int m_recursionLevel; 129 int m_recursionLevel;
130 130
131 #ifndef NDEBUG 131 #ifndef NDEBUG
132 int m_internalScriptRecursionLevel; 132 int m_internalScriptRecursionLevel;
133 #endif 133 #endif
134 OwnPtr<GCEventData> m_gcEventData; 134 OwnPtr<GCEventData> m_gcEventData;
135 bool m_performingMicrotaskCheckpoint; 135 bool m_performingMicrotaskCheckpoint;
136 }; 136 };
137 137
138 } // namespace WebCore 138 } // namespace WebCore
139 139
140 #endif // V8PerIsolateData_h 140 #endif // V8PerIsolateData_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/ScriptRegexp.cpp ('k') | Source/bindings/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698