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

Unified Diff: Source/bindings/v8/V8EventListenerList.h

Issue 23637014: Have V8HiddenPropertyName static functions take an isolate in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8EventListenerList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8EventListenerList.h
diff --git a/Source/bindings/v8/V8EventListenerList.h b/Source/bindings/v8/V8EventListenerList.h
index 7703fdfd343853f141ad3018cae3269069fedc57..def9801a7444810ed1ddab821a107137fad767a1 100644
--- a/Source/bindings/v8/V8EventListenerList.h
+++ b/Source/bindings/v8/V8EventListenerList.h
@@ -49,41 +49,41 @@ enum ListenerLookupType {
// This is a container for V8EventListener objects that uses hidden properties of v8::Object to speed up lookups.
class V8EventListenerList {
public:
- static PassRefPtr<V8EventListener> findWrapper(v8::Local<v8::Value> value, bool isAttribute)
+ static PassRefPtr<V8EventListener> findWrapper(v8::Local<v8::Value> value, bool isAttribute, v8::Isolate* isolate)
{
ASSERT(v8::Context::InContext());
if (!value->IsObject())
return 0;
- v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute);
- return doFindWrapper(v8::Local<v8::Object>::Cast(value), wrapperProperty);
+ v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute, isolate);
+ return doFindWrapper(v8::Local<v8::Object>::Cast(value), wrapperProperty, isolate);
}
template<typename WrapperType>
static PassRefPtr<V8EventListener> findOrCreateWrapper(v8::Local<v8::Value>, bool isAttribute, v8::Isolate*);
- static void clearWrapper(v8::Handle<v8::Object> listenerObject, bool isAttribute)
+ static void clearWrapper(v8::Handle<v8::Object> listenerObject, bool isAttribute, v8::Isolate* isolate)
{
- v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute);
+ v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute, isolate);
listenerObject->DeleteHiddenValue(wrapperProperty);
}
static PassRefPtr<EventListener> getEventListener(v8::Local<v8::Value>, bool isAttribute, ListenerLookupType);
private:
- static V8EventListener* doFindWrapper(v8::Local<v8::Object> object, v8::Handle<v8::String> wrapperProperty)
+ static V8EventListener* doFindWrapper(v8::Local<v8::Object> object, v8::Handle<v8::String> wrapperProperty, v8::Isolate* isolate)
{
ASSERT(v8::Context::InContext());
- v8::HandleScope scope(v8::Isolate::GetCurrent());
+ v8::HandleScope scope(isolate);
v8::Local<v8::Value> listener = object->GetHiddenValue(wrapperProperty);
if (listener.IsEmpty())
return 0;
return static_cast<V8EventListener*>(v8::External::Cast(*listener)->Value());
}
- static inline v8::Handle<v8::String> getHiddenProperty(bool isAttribute)
+ static inline v8::Handle<v8::String> getHiddenProperty(bool isAttribute, v8::Isolate* isolate)
{
- return isAttribute ? V8HiddenPropertyName::attributeListener() : V8HiddenPropertyName::listener();
+ return isAttribute ? V8HiddenPropertyName::attributeListener(isolate) : V8HiddenPropertyName::listener(isolate);
}
};
@@ -95,9 +95,9 @@ PassRefPtr<V8EventListener> V8EventListenerList::findOrCreateWrapper(v8::Local<v
return 0;
v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value);
- v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute);
+ v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute, isolate);
- V8EventListener* wrapper = doFindWrapper(object, wrapperProperty);
+ V8EventListener* wrapper = doFindWrapper(object, wrapperProperty, isolate);
if (wrapper)
return wrapper;
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8EventListenerList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698