Bug 131859 - Web Inspector: Opening a CSS file from the resources tab with long lines throws an exception, freezes inspector
Summary: Web Inspector: Opening a CSS file from the resources tab with long lines thro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.9
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-04-18 14:54 PDT by jonowells
Modified: 2014-04-24 15:42 PDT (History)
4 users (show)

See Also:


Attachments
Reduction of issue (3.98 KB, application/x-webarchive)
2014-04-18 14:54 PDT, jonowells
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jonowells 2014-04-18 14:54:35 PDT
Created attachment 229676 [details]
Reduction of issue

CSS files with lines with over 500 characters in them (whitespace, non-whitespace)  will freeze inspector and throw this exception: 

[Error] TypeError: undefined is not an object (evaluating 'state.stack.length')
	runInOp (codemirror.js, line 1972)
	operation (codemirror.js, line 4216)
	string (TextEditor.js, line 140)
	_populateWithContent (SourceCodeTextEditor.js, line 358)
	_contentAvailable (SourceCodeTextEditor.js, line 374)
	(anonymous function) ([native code], line 0)
	servicePendingContentRequests (SourceCode.js, line 238)
	_processContent (SourceCode.js, line 258)
	(anonymous function) ([native code], line 0)
	dispatch (InspectorBackend.js, line 231)
	dispatchNextQueuedMessageFromBackend (MessageDispatcher.js, line 31)
	(anonymous function) ([native code], line 0)

To reproduce:
1. Open the attached file resources.webarchive.
2. Open the inspector and navigate to Resources.
3. Open 2_breaks.css. (throws the exception)
4. Open 3_finally.css.
5. File doesn't load, wheel spins.
Comment 1 Radar WebKit Bug Importer 2014-04-18 14:54:54 PDT
<rdar://problem/16663653>
Comment 2 jonowells 2014-04-24 15:42:19 PDT
Fixed in https://bugs.webkit.org/show_bug.cgi?id=132090