Pass object template by value to SetUpNamedPropHandler().
v8::Local<> is already a handle to the object being modified, so there
isn't a need to pass a pointer to a handle (in general, v8::Local<> is
expected to be passed by value).
Change-Id: Ibd2be4fc604119d1cc2a55c1e2af7e801598bd8b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/81070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/xfa/cfxjse_class.cpp b/fxjs/xfa/cfxjse_class.cpp
index 20e5de3..b9a7f5b 100644
--- a/fxjs/xfa/cfxjse_class.cpp
+++ b/fxjs/xfa/cfxjse_class.cpp
@@ -242,7 +242,7 @@
}
void SetUpNamedPropHandler(v8::Isolate* pIsolate,
- v8::Local<v8::ObjectTemplate>* pObjectTemplate,
+ v8::Local<v8::ObjectTemplate> pObjectTemplate,
const FXJSE_CLASS_DESCRIPTOR* lpClassDefinition) {
v8::NamedPropertyHandlerConfiguration configuration(
lpClassDefinition->dynPropGetter ? NamedPropertyGetterCallback : nullptr,
@@ -253,7 +253,7 @@
v8::External::New(pIsolate,
const_cast<FXJSE_CLASS_DESCRIPTOR*>(lpClassDefinition)),
v8::PropertyHandlerFlags::kNonMasking);
- (*pObjectTemplate)->SetHandler(configuration);
+ pObjectTemplate->SetHandler(configuration);
}
} // namespace
@@ -289,7 +289,7 @@
hFunctionTemplate->InstanceTemplate()->SetInternalFieldCount(2);
v8::Local<v8::ObjectTemplate> hObjectTemplate =
hFunctionTemplate->InstanceTemplate();
- SetUpNamedPropHandler(pIsolate, &hObjectTemplate, lpClassDefinition);
+ SetUpNamedPropHandler(pIsolate, hObjectTemplate, lpClassDefinition);
if (lpClassDefinition->methNum) {
for (int32_t i = 0; i < lpClassDefinition->methNum; i++) {