The Wayback Machine - https://web.archive.org/web/20250904203230/https://github.com/nodejs/node/commit/8615ea6db0
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1046,8 +1046,9 @@ void IndexOfBuffer(const FunctionCallbackInfo<Value>& args) {
10461046
10471047 enum encoding enc = static_cast <enum encoding>(args[3 ].As <Int32>()->Value ());
10481048
1049- THROW_AND_RETURN_UNLESS_BUFFER (Environment::GetCurrent (args), args[0 ]);
1050- THROW_AND_RETURN_UNLESS_BUFFER (Environment::GetCurrent (args), args[1 ]);
1049+ Environment* env = Environment::GetCurrent (args);
1050+ THROW_AND_RETURN_UNLESS_BUFFER (env, args[0 ]);
1051+ THROW_AND_RETURN_UNLESS_BUFFER (env, args[1 ]);
10511052 ArrayBufferViewContents<char > haystack_contents (args[0 ]);
10521053 ArrayBufferViewContents<char > needle_contents (args[1 ]);
10531054 int64_t offset_i64 = args[2 ].As <Integer>()->Value ();
You can’t perform that action at this time.
0 commit comments