fix: update deprecated v8 api usage
This commit is contained in:
parent
f09cb56f19
commit
92cfc4a62d
10 changed files with 117 additions and 94 deletions
|
@ -5,6 +5,8 @@
|
|||
#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
|
||||
#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/macros.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
@ -26,8 +28,9 @@ class V8ValueConverter {
|
|||
void SetStripNullFromObjects(bool val);
|
||||
v8::Local<v8::Value> ToV8Value(const base::Value* value,
|
||||
v8::Local<v8::Context> context) const;
|
||||
base::Value* FromV8Value(v8::Local<v8::Value> value,
|
||||
v8::Local<v8::Context> context) const;
|
||||
std::unique_ptr<base::Value> FromV8Value(
|
||||
v8::Local<v8::Value> value,
|
||||
v8::Local<v8::Context> context) const;
|
||||
|
||||
private:
|
||||
class FromV8ValueState;
|
||||
|
@ -43,18 +46,18 @@ class V8ValueConverter {
|
|||
v8::Local<v8::Value> ToArrayBuffer(v8::Isolate* isolate,
|
||||
const base::Value* value) const;
|
||||
|
||||
base::Value* FromV8ValueImpl(FromV8ValueState* state,
|
||||
v8::Local<v8::Value> value,
|
||||
v8::Isolate* isolate) const;
|
||||
base::Value* FromV8Array(v8::Local<v8::Array> array,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
base::Value* FromNodeBuffer(v8::Local<v8::Value> value,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
base::Value* FromV8Object(v8::Local<v8::Object> object,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
std::unique_ptr<base::Value> FromV8ValueImpl(FromV8ValueState* state,
|
||||
v8::Local<v8::Value> value,
|
||||
v8::Isolate* isolate) const;
|
||||
std::unique_ptr<base::Value> FromV8Array(v8::Local<v8::Array> array,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
std::unique_ptr<base::Value> FromNodeBuffer(v8::Local<v8::Value> value,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
std::unique_ptr<base::Value> FromV8Object(v8::Local<v8::Object> object,
|
||||
FromV8ValueState* state,
|
||||
v8::Isolate* isolate) const;
|
||||
|
||||
// If true, we will convert RegExp JavaScript objects to string.
|
||||
bool reg_exp_allowed_ = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue