Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: fpdfsdk/src/javascript/JS_Object.cpp

Issue 883393007: Kill off some dodgy JS callbacks (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove more now-unreachable code. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/javascript/JavaScript.h" 7 #include "../../include/javascript/JavaScript.h"
8 #include "../../include/javascript/IJavaScript.h" 8 #include "../../include/javascript/IJavaScript.h"
9 #include "../../include/javascript/JS_Define.h" 9 #include "../../include/javascript/JS_Define.h"
10 #include "../../include/javascript/JS_Object.h" 10 #include "../../include/javascript/JS_Object.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return pTimer; 80 return pTimer;
81 } 81 }
82 82
83 void CJS_EmbedObj::EndTimer(CJS_Timer* pTimer) 83 void CJS_EmbedObj::EndTimer(CJS_Timer* pTimer)
84 { 84 {
85 ASSERT(pTimer != NULL); 85 ASSERT(pTimer != NULL);
86 pTimer->KillJSTimer(); 86 pTimer->KillJSTimer();
87 delete pTimer; 87 delete pTimer;
88 } 88 }
89 89
90 FX_BOOL CJS_EmbedObj::IsSafeMode(IFXJS_Context* cc)
91 {
92 ASSERT(cc != NULL);
93
94 return TRUE;
95 }
96
97 /* --------------------------------- CJS_Object ------------------------------- -- */ 90 /* --------------------------------- CJS_Object ------------------------------- -- */
98 void FreeObject(const v8::WeakCallbackData<v8::Object, CJS_Object>& data) 91 void FreeObject(const v8::WeakCallbackData<v8::Object, CJS_Object>& data)
99 { 92 {
100 CJS_Object* pJSObj = data.GetParameter(); 93 CJS_Object* pJSObj = data.GetParameter();
101 if(pJSObj) 94 if(pJSObj)
102 { 95 {
103 pJSObj->ExitInstance(); 96 pJSObj->ExitInstance();
104 delete pJSObj; 97 delete pJSObj;
105 } 98 }
106 v8::Local<v8::Object> obj = data.GetValue(); 99 v8::Local<v8::Object> obj = data.GetValue();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 136
144 if (pContext->IsMsgBoxEnabled()) 137 if (pContext->IsMsgBoxEnabled())
145 { 138 {
146 CPDFDoc_Environment* pApp = pContext->GetReaderApp(); 139 CPDFDoc_Environment* pApp = pContext->GetReaderApp();
147 if(pApp) 140 if(pApp)
148 pApp->JS_appAlert(swMsg, NULL, 0, 3); 141 pApp->JS_appAlert(swMsg, NULL, 0, 3);
149 } 142 }
150 } 143 }
151 144
152 145
OLDNEW
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | fpdfsdk/src/javascript/app.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698