File tree 2 files changed +7
-24
lines changed
2 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -3069,25 +3069,16 @@ void FreeArrayBufferAllocator(ArrayBufferAllocator* allocator) {
3069
3069
}
3070
3070
3071
3071
3072
- IsolateData* CreateIsolateData (Isolate* isolate, uv_loop_t * loop) {
3073
- return new IsolateData (isolate, loop, nullptr );
3074
- }
3075
-
3076
-
3077
- IsolateData* CreateIsolateData (
3078
- Isolate* isolate,
3079
- uv_loop_t * loop,
3080
- MultiIsolatePlatform* platform) {
3081
- return new IsolateData (isolate, loop, platform);
3082
- }
3083
-
3084
-
3085
3072
IsolateData* CreateIsolateData (
3086
3073
Isolate* isolate,
3087
3074
uv_loop_t * loop,
3088
3075
MultiIsolatePlatform* platform,
3089
3076
ArrayBufferAllocator* allocator) {
3090
- return new IsolateData (isolate, loop, platform, allocator->zero_fill_field ());
3077
+ return new IsolateData (
3078
+ isolate,
3079
+ loop,
3080
+ platform,
3081
+ allocator != nullptr ? allocator->zero_fill_field () : nullptr );
3091
3082
}
3092
3083
3093
3084
Original file line number Diff line number Diff line change @@ -257,19 +257,11 @@ NODE_EXTERN v8::Local<v8::Context> NewContext(
257
257
// If `platform` is passed, it will be used to register new Worker instances.
258
258
// It can be `nullptr`, in which case creating new Workers inside of
259
259
// Environments that use this `IsolateData` will not work.
260
- // TODO(helloshuangzi): switch to default parameters.
261
- NODE_EXTERN IsolateData* CreateIsolateData (
262
- v8::Isolate* isolate,
263
- struct uv_loop_s * loop);
264
- NODE_EXTERN IsolateData* CreateIsolateData (
265
- v8::Isolate* isolate,
266
- struct uv_loop_s * loop,
267
- MultiIsolatePlatform* platform);
268
260
NODE_EXTERN IsolateData* CreateIsolateData (
269
261
v8::Isolate* isolate,
270
262
struct uv_loop_s * loop,
271
- MultiIsolatePlatform* platform,
272
- ArrayBufferAllocator* allocator);
263
+ MultiIsolatePlatform* platform = nullptr ,
264
+ ArrayBufferAllocator* allocator = nullptr );
273
265
NODE_EXTERN void FreeIsolateData (IsolateData* isolate_data);
274
266
275
267
// TODO(addaleax): Add an official variant using STL containers, and move
You can’t perform that action at this time.
0 commit comments