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

Mapping files in Chrome Workspaces #9273

Closed
ivanm376 opened this issue Oct 25, 2016 · 2 comments
Closed

Mapping files in Chrome Workspaces #9273

ivanm376 opened this issue Oct 25, 2016 · 2 comments
Labels
inspector Issues and PRs related to the V8 inspector protocol module Issues and PRs related to the module subsystem.

Comments

@ivanm376
Copy link

  • Version: v6.9.1
  • Platform: Linux pc 4.4.0-45-generic deprecate domains #66-Ubuntu SMP Wed Oct 19 14:12:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Hellow I am trying to map files with Chrome Workspaces to allow persistence, but stucking with this warning:

"Workspace mapping mismatch
The content of this file on the file system: file:///testing/test.js
does not match the loaded script: /testing/test.js
Possible solutions are:

  • Check "Disable cache" in settings and reload inspected page (recommended setup for authoring and debugging)
  • Check that your file and script are both loaded from the correct source and their contents match

I made little investigation and think, problem arrives because of wrapping original code (bootstrap_node.js):

NativeModule.wrapper = [
'(function (exports, require, module, __filename, __dirname) { ',
'\n});'
];

So another question is "Should we actually see this wrapper while debugging ?"

  • on the client-side there is nothing same
  • if the only appointment of this wrapper is to put _"exports, require, module, __filename, _dirname" in closure of next called function, then, can it be moved in C++ code for example ?
@bnoordhuis bnoordhuis added module Issues and PRs related to the module subsystem. inspector Issues and PRs related to the V8 inspector protocol labels Oct 25, 2016
@bnoordhuis
Copy link
Member

It might be possible to use v8::ScriptCompiler::CompileFunctionInContext(). I looked into it some months back but I ran into an issue where the reported line and column numbers in exception stack traces didn't match up.

@Trott
Copy link
Member

Trott commented Jul 15, 2017

This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspector Issues and PRs related to the V8 inspector protocol module Issues and PRs related to the module subsystem.
Projects
None yet
Development

No branches or pull requests

3 participants