Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make sourcePathResolver function per-thread #1

Merged
merged 1 commit into from
Jul 28, 2019

Conversation

pavelfeldman
Copy link
Member

No description provided.

Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -90,7 +90,7 @@ export interface SourcePathResolver {
//
export class Source {
private static _lastSourceReference = 0;

readonly sourcePathResolver: SourcePathResolver;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why public? Seems to be only used in this file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make it "[public] _sourcePathResolver" consistency, but I wonder if that's what we want to do long term!

@@ -703,7 +703,7 @@ export class Thread implements VariableStoreDelegate {
}

_onScriptParsed(event: Cdp.Debugger.ScriptParsedEvent) {
event.url = this.manager._sourcePathResolver.scriptUrlToUrl(event.url);
event.url = this.sourcePathResolver.scriptUrlToUrl(event.url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we don't want to dedupe scripts with different resolvers by url (see _getSourceForScript). Maybe that will never happen in practice though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants