* fix: enable wasm trap handlers in all Node.js processes Co-authored-by: deepak1556 <hop2deep@gmail.com> * fix: separate registrations to account for featurelist init Co-authored-by: deepak1556 <hop2deep@gmail.com> * build: add missing header for SetStackDumpFirstChanceCallback * fix: pdf spec delay load pdfjs-dist which compiles wasm on load, trap handlers will be initialized once the user script starts but before app#ready. --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
// Copyright (c) 2020 Slack Technologies, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_
|
|
#define ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_
|
|
|
|
#include "base/containers/span.h"
|
|
#include "ui/gfx/image/image_skia_rep.h"
|
|
|
|
namespace v8 {
|
|
class ArrayBufferView;
|
|
class Isolate;
|
|
template <class T>
|
|
class Local;
|
|
class Value;
|
|
} // namespace v8
|
|
|
|
namespace blink {
|
|
struct CloneableMessage;
|
|
}
|
|
|
|
namespace electron {
|
|
|
|
bool SerializeV8Value(v8::Isolate* isolate,
|
|
v8::Local<v8::Value> value,
|
|
blink::CloneableMessage* out);
|
|
v8::Local<v8::Value> DeserializeV8Value(v8::Isolate* isolate,
|
|
const blink::CloneableMessage& in);
|
|
v8::Local<v8::Value> DeserializeV8Value(v8::Isolate* isolate,
|
|
base::span<const uint8_t> data);
|
|
|
|
void SetUpWebAssemblyTrapHandler();
|
|
|
|
namespace util {
|
|
|
|
[[nodiscard]] base::span<uint8_t> as_byte_span(
|
|
v8::Local<v8::ArrayBufferView> abv);
|
|
|
|
} // namespace util
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_
|