Web Inspector: re-implement RawSourceCode. RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI.
Created attachment 106345 [details] Patch
Comment on attachment 106345 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=106345&action=review > Source/WebCore/inspector/front-end/DebuggerPresentationModel.js:178 > + var eventData = { sourceCode: uiSourceCode, oldSourceCode: oldUISourceCode }; sourceCode -> uiSourceCode > Source/WebCore/inspector/front-end/SourceFile.js:155 > + if (this._locked) { _locked -> _updatingSourceMapping ?
Committed r94560: <http://trac.webkit.org/changeset/94560>
Committed r94571: <http://trac.webkit.org/changeset/94571>