Summary: | Web Inspector: WebInspector.displayNameForURL() failure prevents DOM inspection | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> | ||||||
Component: | Web Inspector | Assignee: | Antoine Quint <graouts> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, graouts, joepeck, timothy, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Antoine Quint
2013-06-24 03:02:37 PDT
The error is coming from calling decodeURIComponent() with this string as the value for urlComponents.lastPathComponent: http://ww84.smartadserver.com/call2/pubjallajax/2368/17167/2077,2078,647,2163,7186,7185,630,713,650,1278,7186,631,3075,4738,736,632,12340,1075,1446,651,648,16752/4891911503/xtor%3DRSS-1%3Bsize%3Dsmall%3BFOOTBALL%3BLIGUE_1%3BSAISON_2012-2013%3BPARIS-SG%3BMENEZ_JEREMY%3BTRANSFERTS_FOOTBALL%3BMERCATO_ETE_2013%3BINFO_L_%C9QUIPE%3BD1%3B? xtor%3DRSS-1%3Bsize%3Dsmall%3BFOOTBALL%3BLIGUE_1%3BSAISON_2012-2013%3BPARIS-SG%3BMENEZ_JEREMY%3BTRANSFERTS_FOOTBALL%3BMERCATO_ETE_2013%3BINFO_L_%C9QUIPE%3BD1%3B It looks like urlComponents.lastPathComponent is just set incorrectly. The problematic string passed todecodeURIComponent() is actually "xtor%3DRSS-1%3Bsize%3Dsmall%3BFOOTBALL%3BLIGUE_1%3BSAISON_2012-2013%3BPARIS-SG%3BMENEZ_JEREMY%3BTRANSFERTS_FOOTBALL%3BMERCATO_ETE_2013%3BINFO_L_%C9QUIPE%3BD1%3B" "%C9" is the part of the string that yields the decodeURIComponent exception. Looks like the URI encoding is incorrect, and "É" should be "%C3%89" and not "%C9", although some pages on the internets seem to suggest that's OK (http://www.degraeve.com/reference/urlencoding.php). But the RFC 3986 (http://tools.ietf.org/html/rfc3986) suggests otherwise (first full paragraph of page 16). We should just handle the possible exception thrown by decodeURIComponent() here. Created attachment 205288 [details]
Patch
Comment on attachment 205288 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205288&action=review We should probably guard WebInspector.updateWindowTitle and parseQueryString too. > Source/WebInspectorUI/UserInterface/Main.js:360 > + displayName = decodeURIComponent(urlComponents.lastPathComponent || ""); > + } catch (e) { > + // Ignore possible URIError. We should fallback to urlComponents.lastPathComponent (not decoded) for displayName in the catch. Created attachment 205289 [details]
Patch for landing
Comment on attachment 205289 [details] Patch for landing Clearing flags on attachment: 205289 Committed r151918: <http://trac.webkit.org/changeset/151918> All reviewed patches have been landed. Closing bug. |