OLD | NEW |
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 /** | 417 /** |
418 * @return {boolean} | 418 * @return {boolean} |
419 */ | 419 */ |
420 isMergingToVM: function() | 420 isMergingToVM: function() |
421 { | 421 { |
422 return this._isMergingToVM; | 422 return this._isMergingToVM; |
423 }, | 423 }, |
424 | 424 |
425 checkMapping: function() | 425 checkMapping: function() |
426 { | 426 { |
427 if (!this._script) | 427 if (!this._script || typeof this._scriptSource !== "undefined") { |
| 428 this._mappingCheckedForTest(); |
428 return; | 429 return; |
429 if (typeof this._scriptSource !== "undefined") | 430 } |
430 return; | 431 this._script.requestContent().then(callback.bind(this)); |
431 this._script.requestContent(callback.bind(this)); | |
432 | 432 |
433 /** | 433 /** |
434 * @param {?string} source | 434 * @param {?string} source |
435 * @this {WebInspector.ResourceScriptFile} | 435 * @this {WebInspector.ResourceScriptFile} |
436 */ | 436 */ |
437 function callback(source) | 437 function callback(source) |
438 { | 438 { |
439 this._scriptSource = source; | 439 this._scriptSource = source; |
440 this._update(); | 440 this._update(); |
| 441 this._mappingCheckedForTest(); |
441 } | 442 } |
442 }, | 443 }, |
443 | 444 |
| 445 _mappingCheckedForTest: function() { }, |
| 446 |
444 /** | 447 /** |
445 * @return {?WebInspector.Target} | 448 * @return {?WebInspector.Target} |
446 */ | 449 */ |
447 target: function() | 450 target: function() |
448 { | 451 { |
449 if (!this._script) | 452 if (!this._script) |
450 return null; | 453 return null; |
451 return this._script.target(); | 454 return this._script.target(); |
452 }, | 455 }, |
453 | 456 |
(...skipping 16 matching lines...) Expand all Loading... |
470 /** | 473 /** |
471 * @return {boolean} | 474 * @return {boolean} |
472 */ | 475 */ |
473 hasSourceMapURL: function() | 476 hasSourceMapURL: function() |
474 { | 477 { |
475 return this._script && !!this._script.sourceMapURL; | 478 return this._script && !!this._script.sourceMapURL; |
476 }, | 479 }, |
477 | 480 |
478 __proto__: WebInspector.Object.prototype | 481 __proto__: WebInspector.Object.prototype |
479 } | 482 } |
OLD | NEW |