From b3914936da847205d1f1d2dc34ecf2d76e74816a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 8 Oct 2015 12:08:47 -0700 Subject: Merge to XFA: Fix a leak with g_DefaultGlobalObjectTemplate. As seen when running FXJSV8Embeddertest.Getters. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1380993003 . (cherry picked from commit eda27bd13270f5324ce3caa34a09a40cffc4026f) Review URL: https://codereview.chromium.org/1391843005 . --- fpdfsdk/src/jsapi/fxjs_v8.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp index 80def30f96..f400efbcd5 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp @@ -137,6 +137,7 @@ void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate) { void FXJS_Release() { ASSERT(!g_isolate || g_isolate_ref_count == 0); + delete g_DefaultGlobalObjectTemplate; g_DefaultGlobalObjectTemplate = nullptr; g_isolate = nullptr; -- cgit v1.2.3