OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |