Summary: | REGRESSION: Web Inspector: Opening inspector crashes page if there are empty resources | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bburg, commit-queue, ews-watchlist, inspector-bugzilla-changes, jaffathecake, joepeck, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Created attachment 329296 [details]
[PATCH] Proposed Fix
Comment on attachment 329296 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=329296&action=review r=me > LayoutTests/inspector/page/empty-or-missing-resources.html:22 > + } v. nice test :) > Source/JavaScriptCore/inspector/ContentSearchUtilities.cpp:177 > + if (content.isEmpty()) We really should have ASSERT_OR_RETURN(String(), content.isEmpty()) or something like that. Unfortunately, our codebase completely mixes up #ifndef NDEBUG and #if !LOG_DISABLED, so this would require some refactoring to not get compiled out. Comment on attachment 329296 [details] [PATCH] Proposed Fix Clearing flags on attachment: 329296 Committed r225892: <https://trac.webkit.org/changeset/225892> All reviewed patches have been landed. Closing bug. *** Bug 181246 has been marked as a duplicate of this bug. *** |
Opening inspector crashes page if there are empty resources Test Page: (where empty.css is an empty file) <link rel="stylesheet" href="empty.css"> Steps to Reproduce: 1. Inspect page with empty resource => Inspected Page Crashes > Exception Type: EXC_BAD_ACCESS (SIGSEGV) > Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010 > Exception Note: EXC_CORPSE_NOTIFY > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > 0 com.apple.JavaScriptCore 0x00000004a8af11cb JSC::Yarr::interpret(JSC::Yarr::BytecodePattern*, WTF::String const&, unsigned int, unsigned int*) + 11 (StringImpl.h:269) > 1 com.apple.JavaScriptCore 0x00000004a86359b4 Inspector::ContentSearchUtilities::findStylesheetSourceMapURL(WTF::String const&) + 372 (ContentSearchUtilities.cpp:189) > 2 com.apple.WebCore 0x000000010e696bb2 WebCore::InspectorPageAgent::sourceMapURLForResource(WebCore::CachedResource*) + 354 (InspectorPageAgent.cpp:166) > 3 com.apple.WebCore 0x000000010e69d2b6 WebCore::InspectorPageAgent::buildObjectForFrameTree(WebCore::Frame*) + 934 (RefPtr.h:81) > 4 com.apple.WebCore 0x000000010e69d641 non-virtual thunk to WebCore::InspectorPageAgent::getResourceTree(WTF::String&, WTF::RefPtr<Inspector::Protocol::Page::FrameResourceTree>&) + 33 (utility:889) > ...