Summary: | Web Inspector: Use and process the actual ScriptId in the protocol EventListener object | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexander Pavlov (apavlov) <apavlov> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Alexander Pavlov (apavlov) <apavlov> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, apavlov, bweinstein, haraken, japhet, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Alexander Pavlov (apavlov)
2012-08-06 07:46:39 PDT
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 |