Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit eb45384

Browse files
committed
chakrashim: Fix SetAccessorProperty behavior
`FunctionTemplate` asserts that it can get the external data from the provided object. The assert was hitting because the caller was passing in an empty `Local<FunctionTemplate>` object. PR-URL: #454 Reviewed-By: Taylor Woll <tawoll@ntdev.microsoft.com>
1 parent 1753873 commit eb45384

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/chakrashim/src/v8template.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ void Template::SetAccessorProperty(
5757
if (properties != nullptr) {
5858
properties->SetAccessorProperty(
5959
name,
60-
getter->GetFunction(),
61-
setter->GetFunction(),
60+
!getter.IsEmpty() ? getter->GetFunction() : Local<Function>(),
61+
!setter.IsEmpty() ? setter->GetFunction() : Local<Function>(),
6262
attribute,
6363
access_control);
6464
}

0 commit comments

Comments
 (0)