Skip to content

Commit

Permalink
client: Fix RmlElement style property memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonMrBonnie committed Jul 21, 2023
1 parent 53a0cdd commit 4ae02b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/bindings/RmlElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static void StyleDeleterHandler(v8::Local<v8::Name> property, const v8::Property
V8_TO_STRING(property, name);
V8_RETURN_BOOLEAN(element->RemoveProperty(name));
}
static void StyleGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
static void StyleGetter(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
V8_GET_ISOLATE_CONTEXT_RESOURCE();
V8_GET_THIS_BASE_OBJECT(element, alt::IRmlElement);
Expand Down Expand Up @@ -575,7 +575,7 @@ extern V8Class v8RmlElement("RmlElement",

V8Helpers::SetMethod(isolate, tpl, "isPointWithinElement", &IsPointWithinElement);

V8Helpers::SetAccessor(isolate, tpl, "style", &StyleGetter);
V8Helpers::SetLazyAccessor(isolate, tpl, "style", &StyleGetter);
V8Helpers::SetMethod(isolate, tpl, "setProperty", &SetProperty);
V8Helpers::SetMethod(isolate, tpl, "removeProperty", &RemoveProperty);
V8Helpers::SetMethod(isolate, tpl, "hasProperty", &HasProperty);
Expand Down

0 comments on commit 4ae02b1

Please sign in to comment.