Skip to content

Commit

Permalink
Remove unnecessary handle
Browse files Browse the repository at this point in the history
Summary: This handle is not needed.

Reviewed By: avp

Differential Revision: D65241532

fbshipit-source-id: 9913799f5e6a05d5719fd155923efbf063d090f1
  • Loading branch information
Michael Leon authored and facebook-github-bot committed Nov 13, 2024
1 parent b07ef4f commit 08c6eb9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/VM/JSLib/Object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ objectConstructor(void *, Runtime &runtime, NativeArgs args) {
if (newTarget.getRaw() == runtime.objectConstructor.getRaw()) {
return args.getThisArg();
}
auto thisHandle = runtime.makeHandle(JSObject::create(runtime));
return thisHandle.getHermesValue();
return JSObject::create(runtime).getHermesValue();
}

// 3. Return ! ToObject(value).
Expand Down

0 comments on commit 08c6eb9

Please sign in to comment.