summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-08 12:08:47 -0700
committerLei Zhang <thestig@chromium.org>2015-10-08 12:08:47 -0700
commitb3914936da847205d1f1d2dc34ecf2d76e74816a (patch)
tree13aa5e18cb2132da796d8ffa707e2fca9e8fa965
parent3fa115bf1d6b86fcdbc9a139c6ac789ea2294c2e (diff)
downloadpdfium-b3914936da847205d1f1d2dc34ecf2d76e74816a.tar.xz
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 .
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8.cpp1
1 files changed, 1 insertions, 0 deletions
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;