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

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

Issue 125043004: Remove world type from hasInstance() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/V8NPObject.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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // objects have been allocated that we want to take every opportunity 120 // objects have been allocated that we want to take every opportunity
121 // to collect. 121 // to collect.
122 void setShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = true; } 122 void setShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = true; }
123 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; } 123 void clearShouldCollectGarbageSoon() { m_shouldCollectGarbageSoon = false; }
124 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; } 124 bool shouldCollectGarbageSoon() const { return m_shouldCollectGarbageSoon; }
125 125
126 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); 126 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);
127 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v oid* privatePointer); 127 v8::Handle<v8::FunctionTemplate> privateTemplateIfExists(WrapperWorldType, v oid* privatePointer);
128 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v 8::FunctionTemplate>); 128 void setPrivateTemplate(WrapperWorldType, void* privatePointer, v8::Handle<v 8::FunctionTemplate>);
129 129
130 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, WrapperWorld Type); 130 bool hasInstanceInMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value>);
131 bool hasInstanceInNonMainWorld(const WrapperTypeInfo*, v8::Handle<v8::Value> );
131 132
132 v8::Local<v8::Context> ensureRegexContext(); 133 v8::Local<v8::Context> ensureRegexContext();
133 134
134 const char* previousSamplingState() const { return m_previousSamplingState; } 135 const char* previousSamplingState() const { return m_previousSamplingState; }
135 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; } 136 void setPreviousSamplingState(const char* name) { m_previousSamplingState = name; }
136 137
137 private: 138 private:
138 explicit V8PerIsolateData(v8::Isolate*); 139 explicit V8PerIsolateData(v8::Isolate*);
139 ~V8PerIsolateData(); 140 ~V8PerIsolateData();
141 bool hasInstance(const WrapperTypeInfo*, v8::Handle<v8::Value>, TemplateMap& );
140 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& ); 142 static void constructorOfToString(const v8::FunctionCallbackInfo<v8::Value>& );
141 143
142 v8::Isolate* m_isolate; 144 v8::Isolate* m_isolate;
143 TemplateMap m_templatesForMainWorld; 145 TemplateMap m_templatesForMainWorld;
144 TemplateMap m_templatesForNonMainWorld; 146 TemplateMap m_templatesForNonMainWorld;
145 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate; 147 ScopedPersistent<v8::FunctionTemplate> m_toStringTemplate;
146 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate; 148 v8::Persistent<v8::FunctionTemplate> m_lazyEventListenerToStringTemplate;
147 OwnPtr<StringCache> m_stringCache; 149 OwnPtr<StringCache> m_stringCache;
148 150
149 Vector<DOMDataStore*> m_domDataList; 151 Vector<DOMDataStore*> m_domDataList;
(...skipping 13 matching lines...) Expand all
163 #ifndef NDEBUG 165 #ifndef NDEBUG
164 int m_internalScriptRecursionLevel; 166 int m_internalScriptRecursionLevel;
165 #endif 167 #endif
166 OwnPtr<GCEventData> m_gcEventData; 168 OwnPtr<GCEventData> m_gcEventData;
167 bool m_shouldCollectGarbageSoon; 169 bool m_shouldCollectGarbageSoon;
168 }; 170 };
169 171
170 } // namespace WebCore 172 } // namespace WebCore
171 173
172 #endif // V8PerIsolateData_h 174 #endif // V8PerIsolateData_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8NPObject.cpp ('k') | Source/bindings/v8/V8PerIsolateData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698