Currently, EventListener object's "location" field transferred through the protocol contains the script URL, not the script id.
Currently, it is impossible to rely on scriptId's rather than source URLs, as scripts are not registered with the frontend until the debugger is explicitly enabled by the user.
Created attachment 164569 [details] Patch
Comment on attachment 164569 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164569&action=review > Source/WebCore/bindings/js/ScriptEventListener.cpp:109 > +bool eventListenerHandlerLocation(Document* document, EventListener* eventListener, String& sourceName, String& sourceId, int& lineNumber) s/sourceId/scriptId/ > Source/WebCore/bindings/v8/ScriptEventListener.cpp:121 > + v8::Handle<v8::Value> scriptIdValue = function->GetScriptId(); scriptId is always available in v8. > Source/WebCore/inspector/front-end/EventListenersSidebarPane.js:208 > + if (this.eventListener.location.scriptId) I don't think scriptId is valuable for user.
Created attachment 164854 [details] Patch
Comment on attachment 164854 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=164854&action=review > Source/WebCore/bindings/js/ScriptEventListener.cpp:127 > + scriptId = funcSourceId == SourceProvider::nullID ? "" : String::number(funcSourceId); I wonder when (funcSourceId == SourceProvider::nullID) can happen.
Committed r129105: <http://trac.webkit.org/changeset/129105>
Chromium issue: http://code.google.com/p/chromium/issues/detail?id=140375