Changeset 249037 in webkit
- Timestamp:
- Aug 22, 2019, 6:07:43 PM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Models/SourceMapResource.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r249034 r249037 1 2019-08-22 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION(r248485): stack overflow when viewing a source map generated from inline content 4 https://bugs.webkit.org/show_bug.cgi?id=201042 5 <rdar://problem/54509750> 6 7 Reviewed by Antoine Quint. 8 9 In r248485, `WI.ResourceClusterContentView` was changed to `requestContent` whenever the 10 given resource finished loading (by listening for `WI.Resource.Event.LoadingDidFinish`). 11 12 Even though retrieving a source map's contents uses `Promise`s, in the case that the content 13 was inlined in the "original" source code, the code path would mark the source map as being 14 finished (which would fire a `WI.Resource.Event.LoadingDidFinish`) _before_ it could return 15 a `Promise`, which would've been cached (`WI.SourceCode.prototype.requestContent`) and 16 preventend any reentrancy. 17 18 Wrapping the inline code path in a `Promise.resolve()` gives the `WI.SourceCode` a chance to 19 cache the `Promise` before any events are fired. 20 21 * UserInterface/Models/SourceMapResource.js: 22 (WI.SourceMapResource.prototype.requestContentFromBackend): 23 1 24 2019-08-22 Nikita Vasilyev <nvasilyev@apple.com> 2 25 -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceMapResource.js
r243024 r249037 85 85 // FIXME: We don't know the MIME-type for inline content. Guess by analyzing the content? 86 86 // Returns a promise. 87 return sourceMapResourceLoaded.call(this, {content: inlineContent, mimeType: this.mimeType, statusCode: 200});87 return Promise.resolve().then(sourceMapResourceLoaded.bind(this, {content: inlineContent, mimeType: this.mimeType, statusCode: 200})); 88 88 } 89 89
Note:
See TracChangeset
for help on using the changeset viewer.