@@ -30,7 +30,7 @@ namespace JS {
30
30
/* *
31
31
* Private class
32
32
*/
33
- class Isolate final : private v8::ArrayBuffer::Allocator
33
+ class Isolate final
34
34
{
35
35
private:
36
36
/* *
@@ -39,53 +39,11 @@ class Isolate final : private v8::ArrayBuffer::Allocator
39
39
*/
40
40
Platform _platform;
41
41
42
- /* *
43
- * The isolate creation parameters
44
- * @var v8::Isolate::CreateParams
45
- */
46
- v8::Isolate::CreateParams _params;
47
-
48
42
/* *
49
43
* The underlying isolate
50
44
* @var v8::Isolate*
51
45
*/
52
46
v8::Isolate *_isolate;
53
-
54
- /* *
55
- * Allocate a range of memory, zero-initialized.
56
- *
57
- * @param size The number of bytes to allocate
58
- * @return Pointer to the allocated memory, or a nullptr
59
- */
60
- void *Allocate (size_t size) override
61
- {
62
- // request some cleared memory
63
- return std::calloc (size, 1 );
64
- }
65
-
66
- /* *
67
- * Allocate a range of memory, uninitialized.
68
- *
69
- * @param size The number of bytes to allocate
70
- * @return Pointer to the allocated memory, or a nullptr
71
- */
72
- void *AllocateUninitialized (size_t size) override
73
- {
74
- // request some uninitialized memory
75
- return std::malloc (size);
76
- }
77
-
78
- /* *
79
- * Free some allocated memory
80
- *
81
- * @param data Pointer to memory to free
82
- * @param size Number of bytes to free
83
- */
84
- void Free (void *data, size_t size) override
85
- {
86
- // free the allocated memory
87
- std::free (data);
88
- }
89
47
public:
90
48
/* *
91
49
* Constructor
@@ -97,11 +55,8 @@ class Isolate final : private v8::ArrayBuffer::Allocator
97
55
v8::V8::InitializePlatform (&_platform);
98
56
v8::V8::Initialize ();
99
57
100
- // initialize the parameters
101
- _params.array_buffer_allocator = this ;
102
-
103
58
// create the actual isolate
104
- _isolate = v8::Isolate::New (_params );
59
+ _isolate = v8::Isolate::New ();
105
60
106
61
// and enter it
107
62
_isolate->Enter ();
0 commit comments