File tree Expand file tree Collapse file tree 2 files changed +7
-24
lines changed
Expand file tree Collapse file tree 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) {
30693069}
30703070
30713071
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-
30853072IsolateData* CreateIsolateData (
30863073 Isolate* isolate,
30873074 uv_loop_t * loop,
30883075 MultiIsolatePlatform* platform,
30893076 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 );
30913082}
30923083
30933084
Original file line number Diff line number Diff line change @@ -257,19 +257,11 @@ NODE_EXTERN v8::Local<v8::Context> NewContext(
257257// If `platform` is passed, it will be used to register new Worker instances.
258258// It can be `nullptr`, in which case creating new Workers inside of
259259// 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);
268260NODE_EXTERN IsolateData* CreateIsolateData (
269261 v8::Isolate* isolate,
270262 struct uv_loop_s * loop,
271- MultiIsolatePlatform* platform,
272- ArrayBufferAllocator* allocator);
263+ MultiIsolatePlatform* platform = nullptr ,
264+ ArrayBufferAllocator* allocator = nullptr );
273265NODE_EXTERN void FreeIsolateData (IsolateData* isolate_data);
274266
275267// TODO(addaleax): Add an official variant using STL containers, and move
You can’t perform that action at this time.
0 commit comments