Changeset 102648 in webkit
- Timestamp:
- Dec 12, 2011 6:23:18 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r102646 r102648 1 2011-12-12 Konrad Piascik <kpiascik@rim.com> 2 3 Implement the JavaScriptCore bindings for eventListenerHandlerLocation 4 https://bugs.webkit.org/show_bug.cgi?id=74313 5 6 Reviewed by Geoffrey Garen. 7 8 Open any page in Web Inspector and look at the event listeners. They should now 9 link to the script which created them. 10 11 * bindings/js/ScriptEventListener.cpp: 12 (WebCore::eventListenerHandlerLocation): 13 1 14 2011-12-12 Erik Arvidsson <arv@chromium.org> 2 15 -
trunk/Source/WebCore/bindings/js/ScriptEventListener.cpp
r99167 r102648 35 35 #include "Document.h" 36 36 #include "EventListener.h" 37 #include "Executable.h" 38 #include "JSFunction.h" 37 39 #include "JSNode.h" 38 40 #include "Frame.h" … … 104 106 } 105 107 106 bool eventListenerHandlerLocation(Document* , EventListener*, String&, int&)108 bool eventListenerHandlerLocation(Document* document, EventListener* eventListener, String& sourceName, int& lineNumber) 107 109 { 108 // FIXME: Add support for getting function location. 109 return false; 110 const JSEventListener* jsListener = JSEventListener::cast(eventListener); 111 if (!jsListener) 112 return false; 113 JSC::JSObject* jsObject = jsListener->jsFunction(document); 114 if (!jsObject) 115 return false; 116 JSC::JSFunction* jsFunction = static_cast<JSFunction*>(jsObject); 117 if (!jsFunction || jsFunction->isHostFunction()) 118 return false; 119 JSC::FunctionExecutable* funcExecutable = jsFunction->jsExecutable(); 120 if (!funcExecutable) 121 return false; 122 lineNumber = funcExecutable->lineNo(); 123 sourceName = ustringToString(funcExecutable->sourceURL()); 124 return true; 110 125 } 111 126
Note: See TracChangeset
for help on using the changeset viewer.