forked from cory/tildefriends
		
	Remove speedscope. Long live perfetto. Until speedscope supports multiple processes/threads and counters, then I'm totally on board for coming back.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3751 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
		
							
								
								
									
										22
									
								
								core/core.js
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								core/core.js
									
									
									
									
									
								
							| @@ -345,23 +345,6 @@ const k_mime_types = { | ||||
| 	'map': 'application/json', | ||||
| }; | ||||
|  | ||||
| async function speedScopeHandler(request, response, uri) { | ||||
| 	var filename = uri || 'index.html'; | ||||
| 	if (filename.indexOf('..') != -1) { | ||||
| 		response.writeHead(404, {"Content-Type": "text/plain; charset=utf-8", "Content-Length": "File not found".length}); | ||||
| 		response.end("File not found"); | ||||
| 		return; | ||||
| 	} | ||||
| 	try { | ||||
| 		var data = await File.readFile("deps/speedscope/" + filename); | ||||
| 		response.writeHead(200, {"Content-Type": k_mime_types[filename.split('.').pop()] || 'text/plain', "Content-Length": data.byteLength}); | ||||
| 		response.end(data); | ||||
| 	} catch { | ||||
| 		response.writeHead(404, {"Content-Type": "text/plain; charset=utf-8", "Content-Length": "File not found".length}); | ||||
| 		response.end("File not found"); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| async function perfettoHandler(request, response, uri) { | ||||
| 	var filename = uri || 'index.html'; | ||||
| 	if (filename.indexOf('..') != -1) { | ||||
| @@ -550,11 +533,6 @@ loadSettings().then(function() { | ||||
| 			return blobHandler(request, response, match[1], match[2]); | ||||
| 		} else if (match = /^\/static(\/.*)/.exec(request.uri)) { | ||||
| 			return staticFileHandler(request, response, null, match[1]); | ||||
| 		} else if (match = /^\/scope$/.exec(request.uri)) { | ||||
| 			response.writeHead(303, {"Location": (request.client.tls ? 'https://' : 'http://') + request.headers.host + '/speedscope/#profileURL=' + (request.client.tls ? 'https' : 'http://') + request.headers.host + '/trace', "Content-Length": "0"}); | ||||
| 			return response.end(data); | ||||
| 		} else if (match = /^\/speedscope\/([\.\w-]*)$/.exec(request.uri)) { | ||||
| 			return speedScopeHandler(request, response, match[1]); | ||||
| 		} else if (match = /^\/perfetto\/([\.\w-/]*)$/.exec(request.uri)) { | ||||
| 			return perfettoHandler(request, response, match[1]); | ||||
| 		} else if (match = /^(.*)(\/save)$/.exec(request.uri)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user