Ensure input Buffer really is marked as Persistent #950

This commit is contained in:
Lovell Fuller 2017-09-16 20:17:32 +01:00
parent 18fd6ef119
commit 6a1c7b7588
4 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,12 @@
Requires libvips v8.5.5.
#### v0.18.4 - TBD
* Ensure input Buffer really is marked as Persistent, prevents mark-sweep GC.
[#950](https://github.com/lovell/sharp/issues/950)
[@lfdoherty](https://github.com/lfdoherty)
#### v0.18.3 - 13<sup>th</sup> September 2017
* Skip shrink-on-load when trimming.

View File

@ -105,7 +105,8 @@
"filter": [
"build/c++11",
"build/include",
"runtime/indentation_namespace"
"runtime/indentation_namespace",
"runtime/references"
]
}
}

View File

@ -40,7 +40,7 @@ namespace sharp {
// Create an InputDescriptor instance from a v8::Object describing an input image
InputDescriptor* CreateInputDescriptor(
v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> buffersToPersist
v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist
) {
Nan::HandleScope();
InputDescriptor *descriptor = new InputDescriptor;

View File

@ -89,7 +89,7 @@ namespace sharp {
// Create an InputDescriptor instance from a v8::Object describing an input image
InputDescriptor* CreateInputDescriptor(
v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> buffersToPersist);
v8::Handle<v8::Object> input, std::vector<v8::Local<v8::Object>> &buffersToPersist);
enum class ImageType {
JPEG,