| 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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 return; | 1121 return; |
| 1122 var xhr = new XMLHttpRequest(); | 1122 var xhr = new XMLHttpRequest(); |
| 1123 _importedScripts[scriptName] = true; | 1123 _importedScripts[scriptName] = true; |
| 1124 if (window.flattenImports) | 1124 if (window.flattenImports) |
| 1125 scriptName = scriptName.split("/").reverse()[0]; | 1125 scriptName = scriptName.split("/").reverse()[0]; |
| 1126 xhr.open("GET", scriptName, false); | 1126 xhr.open("GET", scriptName, false); |
| 1127 xhr.send(null); | 1127 xhr.send(null); |
| 1128 if (!xhr.responseText) | 1128 if (!xhr.responseText) |
| 1129 throw "empty response arrived for script '" + scriptName + "'"; | 1129 throw "empty response arrived for script '" + scriptName + "'"; |
| 1130 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr
iptName); | 1130 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr
iptName); |
| 1131 window.eval(xhr.responseText + "\n//@ sourceURL=" + sourceURL); | 1131 window.eval(xhr.responseText + "\n//# sourceURL=" + sourceURL); |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 var loadScript = importScript; | 1134 var loadScript = importScript; |
| 1135 | 1135 |
| 1136 /** | 1136 /** |
| 1137 * @constructor | 1137 * @constructor |
| 1138 */ | 1138 */ |
| 1139 function CallbackBarrier() | 1139 function CallbackBarrier() |
| 1140 { | 1140 { |
| 1141 this._pendingIncomingCallbacksCount = 0; | 1141 this._pendingIncomingCallbacksCount = 0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1169 console.assert(this._pendingIncomingCallbacksCount > 0); | 1169 console.assert(this._pendingIncomingCallbacksCount > 0); |
| 1170 if (userCallback) { | 1170 if (userCallback) { |
| 1171 var args = Array.prototype.slice.call(arguments, 1); | 1171 var args = Array.prototype.slice.call(arguments, 1); |
| 1172 userCallback.apply(null, args); | 1172 userCallback.apply(null, args); |
| 1173 } | 1173 } |
| 1174 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback) | 1174 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback) |
| 1175 this._outgoingCallback(); | 1175 this._outgoingCallback(); |
| 1176 } | 1176 } |
| 1177 } | 1177 } |
| 1178 | 1178 |
| OLD | NEW |