Skip to content

Fix #23194 - #23949

Merged
roblourens merged 2 commits into
masterfrom
roblou/openLoadedScriptUrl
Apr 11, 2017
Merged

roblourens merged 2 commits into
masterfrom
roblou/openLoadedScriptUrl

Conversation

@roblourens

Copy link
Copy Markdown
Member

This change uses uri.with to get a new version which has the same fields except no scheme. It also removes paths.normalize because the uri may be a URL, not a path, and that causes it to have \ on windows. I don't know if that's safe or if paths.normalize is needed in some case. I also don't know whether the if (resource.scheme === 'debug') check is necessary.

I think that embedding a URL or path or made up path like <node_internals>/... into a URI might be unsafe in other cases too, but I don't really know. Another approach would be to just encodeURIComponent the entire thing from the debugger, instead of trying to interpret it in vscode, and only decode it for display. I don't know whether there's anywhere that we need it to work like an actual URI?

@mention-bot

Copy link
Copy Markdown

roblourens, thanks for your PR! By analyzing the history of the files in this pull request, we identified João Moreno (@joaomoreno) to be a potential reviewer.

@isidorn

Copy link
Copy Markdown

roblourens thanks!
Looks good and we can start with that and see if something breaks (I forgot why I have a normalize there unfortunetely).
The check for schema === debug is unnecessery, since the DebugContentProvider only gets resources which have that schema. https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/debug/browser/debugContentProvider.ts#L26

You will also need to remove the unused import paths as well. It is good we are getting rid of this since we should use node path api instead if needed.

Once that is done feel free to merge in.

@roblourens roblourens self-assigned this Apr 7, 2017
@roblourens
roblourens force-pushed the roblou/openLoadedScriptUrl branch from 1d8aec9 to ab8f7b9 Compare April 11, 2017 04:53
@roblourens
roblourens merged commit 0950cb9 into master Apr 11, 2017
@isidorn
Isidor Nikolic (isidorn) deleted the roblou/openLoadedScriptUrl branch April 11, 2017 07:57
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants