• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2022 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/execution/arguments-inl.h"
6 #include "src/objects/js-function.h"
7 
8 namespace v8 {
9 namespace internal {
10 
RUNTIME_FUNCTION(Runtime_ShadowRealmWrappedFunctionCreate)11 RUNTIME_FUNCTION(Runtime_ShadowRealmWrappedFunctionCreate) {
12   DCHECK_EQ(2, args.length());
13   HandleScope scope(isolate);
14   Handle<NativeContext> native_context = args.at<NativeContext>(0);
15   Handle<JSReceiver> value = args.at<JSReceiver>(1);
16 
17   RETURN_RESULT_OR_FAILURE(
18       isolate, JSWrappedFunction::Create(isolate, native_context, value));
19 }
20 
21 }  // namespace internal
22 }  // namespace v8
23