Fix usage of deprecated Buffer APIs in render process

This commit is contained in:
David Wilson
2019-01-25 16:10:56 -08:00
parent 11ed91300b
commit 7248737b94
2 changed files with 2 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ exports.install = function (resourcesPath, nodeRequire) {
var rawData = sourceMappingURL.slice(sourceMappingURL.indexOf(',') + 1)
try {
var sourceMap = JSON.parse(new Buffer(rawData, 'base64'))
var sourceMap = JSON.parse(Buffer.from(rawData, 'base64'))
} catch (error) {
console.warn('Error parsing source map', error.stack)
return null

View File

@@ -20,7 +20,7 @@ class FileSystemBlobStore {
reset () {
this.inMemoryBlobs = new Map()
this.storedBlob = new Buffer(0)
this.storedBlob = Buffer.alloc(0)
this.storedBlobMap = {}
this.usedKeys = new Set()
}