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

Commit

Permalink
chakrashim: fixing lazy interceptor instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
MSLaguana authored and kfarnung committed Jan 9, 2018
1 parent 8fc6b23 commit fe59eb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/chakrashim/src/v8objecttemplate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,7 @@ void ObjectTemplate::SetNamedPropertyHandler(
SetterGetterInterceptor * sgi = objectTemplateData->setterGetterInterceptor;
if (sgi == nullptr) {
sgi = new SetterGetterInterceptor();
objectTemplateData->setterGetterInterceptor = sgi;
}
sgi->namedPropertyGetter = getter;
sgi->namedPropertySetter = setter;
Expand Down Expand Up @@ -1025,9 +1026,10 @@ void ObjectTemplate::SetIndexedPropertyHandler(
return;
}

auto sgi = objectTemplateData->setterGetterInterceptor;
SetterGetterInterceptor * sgi = objectTemplateData->setterGetterInterceptor;
if (sgi == nullptr) {
sgi = new SetterGetterInterceptor();
objectTemplateData->setterGetterInterceptor = sgi;
}
sgi->indexedPropertyGetter = getter;
sgi->indexedPropertySetter = setter;
Expand Down

0 comments on commit fe59eb3

Please sign in to comment.