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

Unified Diff: Source/bindings/core/v8/ScriptEventListener.cpp

Issue 842323005: DevTools: Clean up the Event Listeners pane data representation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove listenerBody from the protocol Created 5 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/core/v8/ScriptEventListener.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptEventListener.cpp
diff --git a/Source/bindings/core/v8/ScriptEventListener.cpp b/Source/bindings/core/v8/ScriptEventListener.cpp
index 46b2fe5c5b22b7fcd52e9d49e9be44884621464a..d41d942b8228dc7e08880dfb6ef43950ec87625b 100644
--- a/Source/bindings/core/v8/ScriptEventListener.cpp
+++ b/Source/bindings/core/v8/ScriptEventListener.cpp
@@ -106,26 +106,6 @@ static v8::Handle<v8::Function> eventListenerEffectiveFunction(v8::Isolate* isol
return function;
}
-String eventListenerHandlerBody(Document* document, EventListener* listener)
-{
- if (listener->type() != EventListener::JSEventListenerType)
- return "";
-
- v8::HandleScope scope(toIsolate(document));
- V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
- v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world());
- v8::Context::Scope contextScope(context);
- v8::Handle<v8::Object> object = v8Listener->getListenerObject(document);
- if (object.IsEmpty())
- return "";
- v8::Handle<v8::Function> function = eventListenerEffectiveFunction(scope.GetIsolate(), object);
- if (function.IsEmpty())
- return "";
-
- TOSTRING_DEFAULT(V8StringResource<TreatNullAsNullString>, functionString, function, "");
- return functionString;
-}
-
ScriptValue eventListenerHandler(Document* document, EventListener* listener)
{
if (listener->type() != EventListener::JSEventListenerType)
@@ -152,7 +132,7 @@ ScriptState* eventListenerHandlerScriptState(LocalFrame* frame, EventListener* l
return ScriptState::from(v8Context);
}
-bool eventListenerHandlerLocation(Document* document, EventListener* listener, String& sourceName, String& scriptId, int& lineNumber, int& columnNumber)
+bool eventListenerHandlerLocation(Document* document, EventListener* listener, String& scriptId, int& lineNumber, int& columnNumber)
{
if (listener->type() != EventListener::JSEventListenerType)
return false;
@@ -170,11 +150,6 @@ bool eventListenerHandlerLocation(Document* document, EventListener* listener, S
v8::Handle<v8::Function> originalFunction = getBoundFunction(function);
int scriptIdValue = originalFunction->ScriptId();
scriptId = String::number(scriptIdValue);
- v8::ScriptOrigin origin = originalFunction->GetScriptOrigin();
- if (!origin.ResourceName().IsEmpty() && origin.ResourceName()->IsString())
- sourceName = toCoreString(origin.ResourceName().As<v8::String>());
- else
- sourceName = "";
lineNumber = originalFunction->GetScriptLineNumber();
columnNumber = originalFunction->GetScriptColumnNumber();
return true;
« no previous file with comments | « Source/bindings/core/v8/ScriptEventListener.h ('k') | Source/core/inspector/InspectorDOMAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698