Chromium Code Reviews| Index: xfa/fxjse/context.cpp |
| diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp |
| index abb30c5dc525ea5b9a4e914828734f7d3490c13e..a35edbdc55a5e4208ab08e6e7ab2340e7408cce3 100644 |
| --- a/xfa/fxjse/context.cpp |
| +++ b/xfa/fxjse/context.cpp |
| @@ -20,10 +20,7 @@ FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, |
| } |
| void FXJSE_Context_Release(FXJSE_HCONTEXT hContext) { |
| - CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext); |
| - if (pContext) { |
| - delete pContext; |
| - } |
| + delete hContext; |
|
Tom Sepez
2016/04/28 21:47:23
No, there's a brutal reinterpret cast going on her
Lei Zhang
2016/04/28 22:31:10
Done.
|
| } |
| FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext) { |
| @@ -152,12 +149,8 @@ CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, |
| } |
| CFXJSE_Context::~CFXJSE_Context() { |
| - for (int32_t i = 0, count = m_rgClasses.GetSize(); i < count; i++) { |
| - CFXJSE_Class* pClass = m_rgClasses[i]; |
| - if (pClass) { |
| - delete pClass; |
| - } |
| - } |
| + for (int32_t i = 0, count = m_rgClasses.GetSize(); i < count; i++) |
| + delete m_rgClasses[i]; |
| m_rgClasses.RemoveAll(); |
| } |