mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: use error-utils for remote exception serialization / deserialization (#14788)
* refactor: use error-utils for remote exception serialization / deserialization * fix internal process.type in sandboxed renderer
This commit is contained in:
committed by
Samuel Attard
parent
3df739fa89
commit
b499d57cfd
@@ -12,6 +12,7 @@ const { ipcMain, isPromise } = electron
|
||||
|
||||
const objectsRegistry = require('@electron/internal/browser/objects-registry')
|
||||
const bufferUtils = require('@electron/internal/common/buffer-utils')
|
||||
const errorUtils = require('@electron/internal/common/error-utils')
|
||||
|
||||
const hasProp = {}.hasOwnProperty
|
||||
|
||||
@@ -138,9 +139,7 @@ const plainObjectToMeta = function (obj) {
|
||||
const exceptionToMeta = function (sender, contextId, error) {
|
||||
return {
|
||||
type: 'exception',
|
||||
message: error.message,
|
||||
stack: error.stack || error,
|
||||
cause: valueToMeta(sender, contextId, error.cause)
|
||||
value: errorUtils.serialize(error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user