| Index: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| index 6584ca8213350e12216a1ca331fcaa21ef8079c4..5dcab835bae324b0ac2fea4f091760109df50f72 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js
|
| @@ -49,7 +49,7 @@ WebInspector.CompilerScriptMapping = function(debuggerModel, workspace, networkM
|
|
|
| /** @type {!Object.<string, !WebInspector.SourceMap>} */
|
| this._sourceMapForSourceMapURL = {};
|
| - /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap)>>} */
|
| + /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap, string=)>>} */
|
| this._pendingSourceMapLoadingCallbacks = {};
|
| /** @type {!Object.<string, !WebInspector.SourceMap>} */
|
| this._sourceMapForScriptId = {};
|
| @@ -324,16 +324,17 @@ WebInspector.CompilerScriptMapping.prototype = {
|
| return;
|
| }
|
|
|
| - pendingCallbacks = [callback];
|
| + pendingCallbacks = [ sourceMapContentLoaded.bind(this), callback ];
|
| this._pendingSourceMapLoadingCallbacks[sourceMapURL] = pendingCallbacks;
|
|
|
| WebInspector.SourceMap.load(sourceMapURL, scriptURL, sourceMapLoaded.bind(this));
|
|
|
| /**
|
| * @param {?WebInspector.SourceMap} sourceMap
|
| + * @param {string=} content
|
| * @this {WebInspector.CompilerScriptMapping}
|
| */
|
| - function sourceMapLoaded(sourceMap)
|
| + function sourceMapLoaded(sourceMap, content)
|
| {
|
| var url = /** @type {string} */ (sourceMapURL);
|
| var callbacks = this._pendingSourceMapLoadingCallbacks[url];
|
| @@ -343,7 +344,19 @@ WebInspector.CompilerScriptMapping.prototype = {
|
| if (sourceMap)
|
| this._sourceMapForSourceMapURL[url] = sourceMap;
|
| for (var i = 0; i < callbacks.length; ++i)
|
| - callbacks[i](sourceMap);
|
| + callbacks[i](sourceMap, content);
|
| + }
|
| +
|
| + /**
|
| + * @param {?WebInspector.SourceMap} sourceMap
|
| + * @param {string} content
|
| + * @this {WebInspector.CompilerScriptMapping}
|
| + */
|
| + function sourceMapContentLoaded(sourceMap, content)
|
| + {
|
| + if (!content)
|
| + return;
|
| + this._debuggerModel.setSourceMapContent(script.scriptId, scriptSourceMapURL, content);
|
| }
|
| },
|
|
|
|
|