Snapshot NativeCompileCache

This commit is contained in:
Antonio Scandurra
2017-03-02 09:29:07 +01:00
parent 8d46de418f
commit a9ada35354
4 changed files with 6 additions and 18 deletions

View File

@@ -4,6 +4,7 @@ Clipboard = require './clipboard'
TextEditor = require './text-editor'
TextEditorComponent = require './text-editor-component'
FileSystemBlobStore = require './file-system-blob-store'
NativeCompileCache = require './native-compile-cache'
CompileCache = require './compile-cache'
ModuleCache = require './module-cache'

View File

@@ -84,25 +84,7 @@ class NativeCompileCache {
}
compiledWrapper = compilationResult.result
}
if (global.v8debug) {
if (!resolvedArgv) {
// we enter the repl if we're not given a filename argument.
if (process.argv[1]) {
resolvedArgv = Module._resolveFilename(process.argv[1], null)
} else {
resolvedArgv = 'repl'
}
}
// Set breakpoint on module start
if (filename === resolvedArgv) {
// Installing this dummy debug event listener tells V8 to start
// the debugger. Without it, the setBreakPoint() fails with an
// 'illegal access' error.
global.v8debug.Debug.setListener(function () {})
global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0)
}
}
let args = [moduleSelf.exports, require, moduleSelf, filename, dirname, process, global]
return compiledWrapper.apply(moduleSelf.exports, args)
}