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

Unified Diff: Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
Index: Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp
diff --git a/Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp b/Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp
index 3e25b204fd13d192b8093601937ac2d42dac269d..c4a9d0e70272ea4e878a55b8b13e5bf349428c04 100644
--- a/Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp
+++ b/Source/bindings/core/v8/inspector/V8InjectedScriptHost.cpp
@@ -285,12 +285,13 @@ static v8::Local<v8::Array> getJSListenerFunctions(v8::Isolate* isolate, Executi
v8::Local<v8::Array> result = v8::Array::New(isolate);
size_t handlersCount = listenerInfo.eventListenerVector.size();
for (size_t i = 0, outputIndex = 0; i < handlersCount; ++i) {
- RefPtr<EventListener> listener = listenerInfo.eventListenerVector[i].listener;
+ EventListener* listener = listenerInfo.eventListenerVector[i].listener.get();
+ RefPtrWillBeRawPtr<EventListener> protect(listener);
if (listener->type() != EventListener::JSEventListenerType) {
ASSERT_NOT_REACHED();
continue;
}
- V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener.get());
+ V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
v8::Local<v8::Context> context = toV8Context(executionContext, v8Listener->world());
// Hide listeners from other contexts.
if (context != isolate->GetCurrentContext())
@@ -321,7 +322,7 @@ void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackI
if (!target)
return;
InjectedScriptHost* host = V8InjectedScriptHost::unwrap(info.Holder());
- Vector<EventListenerInfo> listenersArray;
+ WillBeHeapVector<EventListenerInfo> listenersArray;
host->getEventListenersImpl(target, listenersArray);
v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698