Skip to content

Commit 2cf762e

Browse files
committed
fs: replace SetMethodNoSideEffect in node_file.cc
All FS methods should not use it since FS operations will have side effects.
1 parent 3922d18 commit 2cf762e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/node_file.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,15 +3350,15 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data,
33503350
Isolate* isolate = isolate_data->isolate();
33513351

33523352
SetMethod(isolate, target, "access", Access);
3353-
SetMethodNoSideEffect(isolate, target, "accessSync", AccessSync);
3353+
SetMethod(isolate, target, "accessSync", AccessSync);
33543354
SetMethod(isolate, target, "close", Close);
33553355
SetMethod(isolate, target, "closeSync", CloseSync);
3356-
SetMethodNoSideEffect(isolate, target, "existsSync", ExistsSync);
3356+
SetMethod(isolate, target, "existsSync", ExistsSync);
33573357
SetMethod(isolate, target, "open", Open);
33583358
SetMethod(isolate, target, "openSync", OpenSync);
33593359
SetMethod(isolate, target, "openFileHandle", OpenFileHandle);
33603360
SetMethod(isolate, target, "read", Read);
3361-
SetMethodNoSideEffect(isolate, target, "readFileUtf8", ReadFileUtf8);
3361+
SetMethod(isolate, target, "readFileUtf8", ReadFileUtf8);
33623362
SetMethod(isolate, target, "readBuffers", ReadBuffers);
33633363
SetMethod(isolate, target, "fdatasync", Fdatasync);
33643364
SetMethod(isolate, target, "fsync", Fsync);
@@ -3384,7 +3384,7 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data,
33843384
SetMethod(isolate, target, "writeString", WriteString);
33853385
SetMethod(isolate, target, "realpath", RealPath);
33863386
SetMethod(isolate, target, "copyFile", CopyFile);
3387-
SetMethodNoSideEffect(isolate, target, "copyFileSync", CopyFileSync);
3387+
SetMethod(isolate, target, "copyFileSync", CopyFileSync);
33883388

33893389
SetMethod(isolate, target, "chmod", Chmod);
33903390
SetMethod(isolate, target, "fchmod", FChmod);

0 commit comments

Comments
 (0)