Summary: | Web Inspector: Network.loadResource XHR crash if page reloaded while request is ongoing | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | graouts, joepeck, timothy, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Joseph Pecoraro
2014-03-13 14:53:42 PDT
Turns out, a better approach may be what Blink / Chromium do: <http://src.chromium.org/viewvc/blink?view=revision&revision=152712> They moved from XMLHttpRequests to a pure DocumentThreadableLoader. This has some advantages: - Now that the load is backed by a non-ActiveDOM-object it can load even if the page is paused - We don't need to worry about this crash. So I followed that approach with my patches. Created attachment 226625 [details]
[PATCH] Proposed Fix
Comment on attachment 226625 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=226625&action=review > Source/WebCore/inspector/InspectorResourceAgent.cpp:102 > + } > + m_decoder = TextResourceDecoder::create(ASCIILiteral("text/plain"), textEncoding, useDetector); Nit: I like newlines between things like this. > Source/WebCore/inspector/InspectorResourceAgent.cpp:783 > + } > + loader->setDefersLoading(false); Nit: Newline. > Source/WebCore/xml/XMLHttpRequest.cpp:794 > - options.crossOriginRequestPolicy = m_sendingForInspector ? AllowCrossOriginRequests : UseAccessControl; > + options.crossOriginRequestPolicy = UseAccessControl; Yay! |