Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/services/ServiceManager.js

Issue 2543343002: DevTools: omit remoteBase query param when starting a shared worker (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Services.ServiceManager = class { 7 Services.ServiceManager = class {
8 /** 8 /**
9 * @param {string} serviceName 9 * @param {string} serviceName
10 * @return {!Promise<?Services.ServiceManager.Service>} 10 * @return {!Promise<?Services.ServiceManager.Service>}
(...skipping 13 matching lines...) Expand all
24 24
25 /** 25 /**
26 * @param {string} appName 26 * @param {string} appName
27 * @param {string} serviceName 27 * @param {string} serviceName
28 * @param {boolean} isSharedWorker 28 * @param {boolean} isSharedWorker
29 * @return {!Promise<?Services.ServiceManager.Service>} 29 * @return {!Promise<?Services.ServiceManager.Service>}
30 */ 30 */
31 createAppService(appName, serviceName, isSharedWorker) { 31 createAppService(appName, serviceName, isSharedWorker) {
32 var url = appName + '.js'; 32 var url = appName + '.js';
33 var remoteBase = Runtime.queryParam('remoteBase'); 33 var remoteBase = Runtime.queryParam('remoteBase');
34 if (remoteBase) 34 // Do not pass additional query parameters to shared worker to avoid URLMism atchError
35 // in case another instance of DevTools with different remoteBase creates sa me shared worker.
36 if (remoteBase && !isSharedWorker)
35 url += '?remoteBase=' + remoteBase; 37 url += '?remoteBase=' + remoteBase;
36 38
37 var worker = isSharedWorker ? new SharedWorker(url, appName) : new Worker(ur l); 39 var worker = isSharedWorker ? new SharedWorker(url, appName) : new Worker(ur l);
dgozman 2016/12/02 19:55:53 Should we instead pass different appName for diffe
38 var connection = new Services.ServiceManager.Connection(new Services.Service Manager.WorkerServicePort(worker)); 40 var connection = new Services.ServiceManager.Connection(new Services.Service Manager.WorkerServicePort(worker));
39 return connection._createService(serviceName); 41 return connection._createService(serviceName);
40 } 42 }
41 }; 43 };
42 44
43 /** 45 /**
44 * @unrestricted 46 * @unrestricted
45 */ 47 */
46 Services.ServiceManager.Connection = class { 48 Services.ServiceManager.Connection = class {
47 /** 49 /**
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 close() { 368 close() {
367 return this._workerPromise.then(() => { 369 return this._workerPromise.then(() => {
368 if (this._worker) 370 if (this._worker)
369 this._worker.terminate(); 371 this._worker.terminate();
370 return false; 372 return false;
371 }); 373 });
372 } 374 }
373 }; 375 };
374 376
375 Services.serviceManager = new Services.ServiceManager(); 377 Services.serviceManager = new Services.ServiceManager();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698