Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/CompilerScriptMapping.js

Issue 2826173003: DevTools: prepare Navigator and Network Project for merging uiSourceCodes (Closed)
Patch Set: address comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 * @param {?SDK.SourceMap} sourceMap 237 * @param {?SDK.SourceMap} sourceMap
238 */ 238 */
239 _sourceMapAttachedForTest(sourceMap) { 239 _sourceMapAttachedForTest(sourceMap) {
240 } 240 }
241 241
242 /** 242 /**
243 * @param {!SDK.Script} script 243 * @param {!SDK.Script} script
244 * @param {!SDK.SourceMap} sourceMap 244 * @param {!SDK.SourceMap} sourceMap
245 */ 245 */
246 _populateSourceMapSources(script, sourceMap) { 246 _populateSourceMapSources(script, sourceMap) {
247 var executionContext = script.executionContext(); 247 var frameId = Bindings.frameIdForScript(script);
248 var frameId = executionContext ? executionContext.frameId || '' : '';
249 script[Bindings.CompilerScriptMapping._frameIdSymbol] = frameId; 248 script[Bindings.CompilerScriptMapping._frameIdSymbol] = frameId;
250 for (var sourceURL of sourceMap.sourceURLs()) { 249 for (var sourceURL of sourceMap.sourceURLs()) {
251 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common.re sourceTypes.SourceMapScript); 250 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common.re sourceTypes.SourceMapScript);
252 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL); 251 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL);
253 var embeddedContentLength = typeof embeddedContent === 'string' ? embedded Content.length : null; 252 var embeddedContentLength = typeof embeddedContent === 'string' ? embedded Content.length : null;
254 var uiSourceCode = this._networkProject.addSourceMapFile( 253 var uiSourceCode = this._networkProject.addSourceMapFile(
255 contentProvider, frameId, script.isContentScript(), embeddedContentLen gth); 254 contentProvider, frameId, script.isContentScript(), embeddedContentLen gth);
256 uiSourceCode[Bindings.CompilerScriptMapping._scriptSymbol] = script; 255 uiSourceCode[Bindings.CompilerScriptMapping._scriptSymbol] = script;
257 this._scriptSources.set(script, uiSourceCode); 256 this._scriptSources.set(script, uiSourceCode);
258 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSou rceCode, this); 257 this._debuggerWorkspaceBinding.setSourceMapping(this._debuggerModel, uiSou rceCode, this);
(...skipping 24 matching lines...) Expand all
283 } 282 }
284 283
285 dispose() { 284 dispose() {
286 Common.EventTarget.removeEventListeners(this._eventListeners); 285 Common.EventTarget.removeEventListeners(this._eventListeners);
287 this._stubProject.dispose(); 286 this._stubProject.dispose();
288 } 287 }
289 }; 288 };
290 289
291 Bindings.CompilerScriptMapping._scriptSymbol = Symbol('Bindings.CompilerScriptMa pping._scriptSymbol'); 290 Bindings.CompilerScriptMapping._scriptSymbol = Symbol('Bindings.CompilerScriptMa pping._scriptSymbol');
292 Bindings.CompilerScriptMapping._frameIdSymbol = Symbol('Bindings.CompilerScriptM apping._frameIdSymbol'); 291 Bindings.CompilerScriptMapping._frameIdSymbol = Symbol('Bindings.CompilerScriptM apping._frameIdSymbol');
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/bindings/NetworkProject.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698