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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js

Issue 1754483002: [DevTools] Added setBlackboxPatterns method to protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@provide-hash-for-anonymous-scripts
Patch Set: Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 var scripts = this._scriptsBySourceURL.get(script.sourceURL); 631 var scripts = this._scriptsBySourceURL.get(script.sourceURL);
632 if (!scripts) { 632 if (!scripts) {
633 scripts = []; 633 scripts = [];
634 this._scriptsBySourceURL.set(script.sourceURL, scripts); 634 this._scriptsBySourceURL.set(script.sourceURL, scripts);
635 } 635 }
636 scripts.push(script); 636 scripts.push(script);
637 }, 637 },
638 638
639 /** 639 /**
640 * @param {!Array<!DebuggerAgent.BlackboxPattern>} patterns
641 * @return {!Promise<boolean>}
642 */
643 editBlackboxPatterns: function(patterns)
644 {
645 return new Promise(editBlackboxPatterns.bind(this));
646
647 /**
648 * @param {function(?)} fulfill
649 * @param {function(*)} reject
650 * @this {WebInspector.DebuggerModel}
651 */
652 function editBlackboxPatterns(fulfill, reject)
653 {
654 this._agent.editBlackboxPatterns(patterns, callback);
655 /**
656 * @param {?Protocol.Error} error
657 */
658 function callback(error)
659 {
660 if (error)
661 console.error(error);
662 fulfill(!error);
663 }
664 }
665 },
666
667 /**
640 * @param {!WebInspector.Script} script 668 * @param {!WebInspector.Script} script
641 * @param {number} lineNumber 669 * @param {number} lineNumber
642 * @param {number} columnNumber 670 * @param {number} columnNumber
643 * @return {?WebInspector.DebuggerModel.Location} 671 * @return {?WebInspector.DebuggerModel.Location}
644 */ 672 */
645 createRawLocation: function(script, lineNumber, columnNumber) 673 createRawLocation: function(script, lineNumber, columnNumber)
646 { 674 {
647 if (script.sourceURL) 675 if (script.sourceURL)
648 return this.createRawLocationByURL(script.sourceURL, lineNumber, col umnNumber); 676 return this.createRawLocationByURL(script.sourceURL, lineNumber, col umnNumber);
649 return new WebInspector.DebuggerModel.Location(this, script.scriptId, li neNumber, columnNumber); 677 return new WebInspector.DebuggerModel.Location(this, script.scriptId, li neNumber, columnNumber);
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 /** 1473 /**
1446 * @param {?WebInspector.Target} target 1474 * @param {?WebInspector.Target} target
1447 * @return {?WebInspector.DebuggerModel} 1475 * @return {?WebInspector.DebuggerModel}
1448 */ 1476 */
1449 WebInspector.DebuggerModel.fromTarget = function(target) 1477 WebInspector.DebuggerModel.fromTarget = function(target)
1450 { 1478 {
1451 if (!target || !target.hasJSContext()) 1479 if (!target || !target.hasJSContext())
1452 return null; 1480 return null;
1453 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); 1481 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel));
1454 } 1482 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698