| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 var _importedScripts = {}; | 1667 var _importedScripts = {}; |
| 1668 | 1668 |
| 1669 /** | 1669 /** |
| 1670 * @param {string} url | 1670 * @param {string} url |
| 1671 * @return {string} | 1671 * @return {string} |
| 1672 */ | 1672 */ |
| 1673 function loadResource(url) | 1673 function loadResource(url) |
| 1674 { | 1674 { |
| 1675 var xhr = new XMLHttpRequest(); | 1675 var xhr = new XMLHttpRequest(); |
| 1676 xhr.open("GET", url, false); | 1676 xhr.open("GET", url, false); |
| 1677 var stack = new Error().stack; | |
| 1678 try { | 1677 try { |
| 1679 xhr.send(null); | 1678 xhr.send(null); |
| 1680 } catch (e) { | 1679 } catch (e) { |
| 1681 console.error(url + " -> " + stack); | 1680 console.error(url + " -> " + new Error().stack); |
| 1682 throw e; | 1681 throw e; |
| 1683 } | 1682 } |
| 1684 return xhr.responseText; | 1683 return xhr.responseText; |
| 1685 } | 1684 } |
| 1686 | 1685 |
| 1687 /** | 1686 /** |
| 1688 * This function behavior depends on the "debug_devtools" flag value. | 1687 * This function behavior depends on the "debug_devtools" flag value. |
| 1689 * - In debug mode it loads scripts synchronously via xhr request. | 1688 * - In debug mode it loads scripts synchronously via xhr request. |
| 1690 * - In release mode every occurrence of "importScript" in the js files | 1689 * - In release mode every occurrence of "importScript" in the js files |
| 1691 * that have been whitelisted in the build system gets replaced with | 1690 * that have been whitelisted in the build system gets replaced with |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1766 this._outgoingCallback(); | 1765 this._outgoingCallback(); |
| 1767 } | 1766 } |
| 1768 } | 1767 } |
| 1769 | 1768 |
| 1770 /** | 1769 /** |
| 1771 * @param {*} value | 1770 * @param {*} value |
| 1772 */ | 1771 */ |
| 1773 function suppressUnused(value) | 1772 function suppressUnused(value) |
| 1774 { | 1773 { |
| 1775 } | 1774 } |
| OLD | NEW |