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

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

Issue 2756103002: DevTools: remove SDK.ResourceTreeFrame.fromXXX methods (Closed)
Patch Set: remove unused code Created 3 years, 9 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 this._sourceMapForScriptId.set(script.scriptId, sourceMap); 232 this._sourceMapForScriptId.set(script.scriptId, sourceMap);
233 this._debuggerWorkspaceBinding.updateLocations(script); 233 this._debuggerWorkspaceBinding.updateLocations(script);
234 return; 234 return;
235 } 235 }
236 236
237 this._sourceMapForScriptId.set(script.scriptId, sourceMap); 237 this._sourceMapForScriptId.set(script.scriptId, sourceMap);
238 this._scriptForSourceMap.set(sourceMap, script); 238 this._scriptForSourceMap.set(sourceMap, script);
239 239
240 // Report sources. 240 // Report sources.
241 var missingSources = []; 241 var missingSources = [];
242 var executionContext = script.executionContext();
243 var frameId = executionContext ? executionContext.frameId || '' : '';
242 for (var sourceURL of sourceMap.sourceURLs()) { 244 for (var sourceURL of sourceMap.sourceURLs()) {
243 if (this._sourceMapForURL.get(sourceURL)) 245 if (this._sourceMapForURL.get(sourceURL))
244 continue; 246 continue;
245 this._sourceMapForURL.set(sourceURL, sourceMap); 247 this._sourceMapForURL.set(sourceURL, sourceMap);
246 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._ workspace, sourceURL, script); 248 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._ workspace, sourceURL, script);
247 if (!uiSourceCode) { 249 if (!uiSourceCode) {
248 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common. resourceTypes.SourceMapScript); 250 var contentProvider = sourceMap.sourceContentProvider(sourceURL, Common. resourceTypes.SourceMapScript);
249 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL); 251 var embeddedContent = sourceMap.embeddedContentByURL(sourceURL);
250 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd edContent.length : null; 252 var embeddedContentLength = typeof embeddedContent === 'string' ? embedd edContent.length : null;
251 uiSourceCode = this._networkProject.addSourceMapFile( 253 uiSourceCode = this._networkProject.addSourceMapFile(
252 contentProvider, SDK.ResourceTreeFrame.fromScript(script), script.is ContentScript(), embeddedContentLength); 254 contentProvider, frameId, script.isContentScript(), embeddedContentL ength);
253 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour ceURL; 255 uiSourceCode[Bindings.CompilerScriptMapping._originSymbol] = script.sour ceURL;
254 } 256 }
255 if (uiSourceCode) { 257 if (uiSourceCode) {
256 this._bindUISourceCode(uiSourceCode); 258 this._bindUISourceCode(uiSourceCode);
257 } else { 259 } else {
258 if (missingSources.length < 3) 260 if (missingSources.length < 3)
259 missingSources.push(sourceURL); 261 missingSources.push(sourceURL);
260 else if (missingSources.peekLast() !== '\u2026') 262 else if (missingSources.peekLast() !== '\u2026')
261 missingSources.push('\u2026'); 263 missingSources.push('\u2026');
262 } 264 }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 382 }
381 383
382 dispose() { 384 dispose() {
383 Common.EventTarget.removeEventListeners(this._eventListeners); 385 Common.EventTarget.removeEventListeners(this._eventListeners);
384 this._debuggerReset(); 386 this._debuggerReset();
385 this._stubProject.dispose(); 387 this._stubProject.dispose();
386 } 388 }
387 }; 389 };
388 390
389 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin'); 391 Bindings.CompilerScriptMapping._originSymbol = Symbol('origin');
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