| 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 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 return; | 1133 return; |
| 1134 var xhr = new XMLHttpRequest(); | 1134 var xhr = new XMLHttpRequest(); |
| 1135 _importedScripts[scriptName] = true; | 1135 _importedScripts[scriptName] = true; |
| 1136 if (window.flattenImports) | 1136 if (window.flattenImports) |
| 1137 scriptName = scriptName.split("/").reverse()[0]; | 1137 scriptName = scriptName.split("/").reverse()[0]; |
| 1138 xhr.open("GET", scriptName, false); | 1138 xhr.open("GET", scriptName, false); |
| 1139 xhr.send(null); | 1139 xhr.send(null); |
| 1140 if (!xhr.responseText) | 1140 if (!xhr.responseText) |
| 1141 throw "empty response arrived for script '" + scriptName + "'"; | 1141 throw "empty response arrived for script '" + scriptName + "'"; |
| 1142 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr
iptName); | 1142 var sourceURL = WebInspector.ParsedURL.completeURL(window.location.href, scr
iptName); |
| 1143 window.eval(xhr.responseText + "\n//@ sourceURL=" + sourceURL); | 1143 window.eval(xhr.responseText + "\n//# sourceURL=" + sourceURL); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 var loadScript = importScript; | 1146 var loadScript = importScript; |
| 1147 | 1147 |
| 1148 /** | 1148 /** |
| 1149 * @constructor | 1149 * @constructor |
| 1150 */ | 1150 */ |
| 1151 function CallbackBarrier() | 1151 function CallbackBarrier() |
| 1152 { | 1152 { |
| 1153 this._pendingIncomingCallbacksCount = 0; | 1153 this._pendingIncomingCallbacksCount = 0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1181 console.assert(this._pendingIncomingCallbacksCount > 0); | 1181 console.assert(this._pendingIncomingCallbacksCount > 0); |
| 1182 if (userCallback) { | 1182 if (userCallback) { |
| 1183 var args = Array.prototype.slice.call(arguments, 1); | 1183 var args = Array.prototype.slice.call(arguments, 1); |
| 1184 userCallback.apply(null, args); | 1184 userCallback.apply(null, args); |
| 1185 } | 1185 } |
| 1186 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback) | 1186 if (!--this._pendingIncomingCallbacksCount && this._outgoingCallback) |
| 1187 this._outgoingCallback(); | 1187 this._outgoingCallback(); |
| 1188 } | 1188 } |
| 1189 } | 1189 } |
| 1190 | 1190 |
| OLD | NEW |