OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 */ | 402 */ |
403 Runtime.setPlatform = function(platform) | 403 Runtime.setPlatform = function(platform) |
404 { | 404 { |
405 Runtime._platform = platform; | 405 Runtime._platform = platform; |
406 } | 406 } |
407 | 407 |
408 Runtime.prototype = { | 408 Runtime.prototype = { |
409 useTestBase: function() | 409 useTestBase: function() |
410 { | 410 { |
411 Runtime._remoteBase = "http://localhost:8000/inspector-sources/"; | 411 Runtime._remoteBase = "http://localhost:8000/inspector-sources/"; |
| 412 if (Runtime.queryParam("debugFrontend")) |
| 413 Runtime._remoteBase += "debug/"; |
412 }, | 414 }, |
413 | 415 |
414 /** | 416 /** |
415 * @param {!Runtime.ModuleDescriptor} descriptor | 417 * @param {!Runtime.ModuleDescriptor} descriptor |
416 */ | 418 */ |
417 _registerModule: function(descriptor) | 419 _registerModule: function(descriptor) |
418 { | 420 { |
419 var module = new Runtime.Module(this, descriptor); | 421 var module = new Runtime.Module(this, descriptor); |
420 this._modules.push(module); | 422 this._modules.push(module); |
421 this._modulesMap[descriptor["name"]] = module; | 423 this._modulesMap[descriptor["name"]] = module; |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 { | 1141 { |
1140 var sourceURL = self.location.href; | 1142 var sourceURL = self.location.href; |
1141 if (self.location.search) | 1143 if (self.location.search) |
1142 sourceURL = sourceURL.replace(self.location.search, ""); | 1144 sourceURL = sourceURL.replace(self.location.search, ""); |
1143 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; | 1145 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; |
1144 return "\n/*# sourceURL=" + sourceURL + " */"; | 1146 return "\n/*# sourceURL=" + sourceURL + " */"; |
1145 } | 1147 } |
1146 | 1148 |
1147 /** @type {!Runtime} */ | 1149 /** @type {!Runtime} */ |
1148 var runtime; | 1150 var runtime; |
OLD | NEW |