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

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

Issue 135843008: Remove V8HiddenPropertyName (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8HiddenPropertyName.h » ('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 3be3bb9f34fdaa31017fe2170e9639c08ed58a69..8df7e1a941876cbbc8a799cac094a65927609a14 100644
--- a/Source/bindings/v8/V8EventListenerList.h
+++ b/Source/bindings/v8/V8EventListenerList.h
@@ -31,11 +31,8 @@
#ifndef V8EventListenerList_h
#define V8EventListenerList_h
+#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8EventListener.h"
-#include "bindings/v8/V8HiddenPropertyName.h"
-
-#include <v8.h>
-#include "wtf/PassRefPtr.h"
namespace WebCore {
@@ -65,7 +62,7 @@ public:
static void clearWrapper(v8::Handle<v8::Object> listenerObject, bool isAttribute, v8::Isolate* isolate)
{
v8::Handle<v8::String> wrapperProperty = getHiddenProperty(isAttribute, isolate);
- listenerObject->DeleteHiddenValue(wrapperProperty);
+ deleteHiddenValue(isolate, listenerObject, wrapperProperty);
}
static PassRefPtr<EventListener> getEventListener(v8::Local<v8::Value>, bool isAttribute, ListenerLookupType);
@@ -75,7 +72,7 @@ private:
{
ASSERT(isolate->InContext());
v8::HandleScope scope(isolate);
- v8::Local<v8::Value> listener = object->GetHiddenValue(wrapperProperty);
+ v8::Local<v8::Value> listener = getHiddenValue(isolate, object, wrapperProperty);
if (listener.IsEmpty())
return 0;
return static_cast<V8EventListener*>(v8::External::Cast(*listener)->Value());
@@ -83,7 +80,7 @@ private:
static inline v8::Handle<v8::String> getHiddenProperty(bool isAttribute, v8::Isolate* isolate)
{
- return isAttribute ? V8HiddenPropertyName::attributeListener(isolate) : V8HiddenPropertyName::listener(isolate);
+ return isAttribute ? v8AtomicString(isolate, "attributeListener") : v8AtomicString(isolate, "listener");
}
};
@@ -105,7 +102,7 @@ PassRefPtr<V8EventListener> V8EventListenerList::findOrCreateWrapper(v8::Local<v
RefPtr<V8EventListener> wrapperPtr = WrapperType::create(object, isAttribute, isolate);
if (wrapperPtr)
- object->SetHiddenValue(wrapperProperty, v8::External::New(isolate, wrapperPtr.get()));
+ setHiddenValue(isolate, object, wrapperProperty, v8::External::New(isolate, wrapperPtr.get()));
return wrapperPtr;
}
« no previous file with comments | « Source/bindings/v8/V8ErrorHandler.cpp ('k') | Source/bindings/v8/V8HiddenPropertyName.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698