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

Side by Side Diff: fpdfsdk/include/javascript/JS_Object.h

Issue 1129253004: Use phantom handles instead of weak handles (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | fpdfsdk/include/jsapi/fxjs_v8.h » ('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 #ifndef _JS_OBJECT_H_ 7 #ifndef _JS_OBJECT_H_
8 #define _JS_OBJECT_H_ 8 #define _JS_OBJECT_H_
9 9
10 #include "../fsdk_define.h" // For FX_UINT 10 #include "../fsdk_define.h" // For FX_UINT
(...skipping 28 matching lines...) Expand all
39 CJS_Object* m_pJSObject; 39 CJS_Object* m_pJSObject;
40 }; 40 };
41 41
42 class CJS_Object 42 class CJS_Object
43 { 43 {
44 public: 44 public:
45 CJS_Object(JSFXObject pObject); 45 CJS_Object(JSFXObject pObject);
46 virtual ~CJS_Object(void); 46 virtual ~CJS_Object(void);
47 47
48 void MakeWeak(); 48 void MakeWeak();
49 void Dispose();
49 50
50 virtual FX_BOOL IsType(FX_LPCSTR sClassName){ret urn TRUE;}; 51 virtual FX_BOOL IsType(FX_LPCSTR sClassName){ret urn TRUE;};
51 virtual CFX_ByteString GetClassName(){return "";}; 52 virtual CFX_ByteString GetClassName(){return "";};
52 53
53 virtual FX_BOOL InitInstance(IFXJS_Context* cc){ return TRUE;}; 54 virtual FX_BOOL InitInstance(IFXJS_Context* cc){ return TRUE;};
54 virtual FX_BOOL ExitInstance(){return TRUE;}; 55 virtual FX_BOOL ExitInstance(){return TRUE;};
55 56
56 operator JSFXObject () {return v8 ::Local<v8::Object>::New(m_pIsolate, m_pObject);} 57 operator JSFXObject () {return v8 ::Local<v8::Object>::New(m_pIsolate, m_pObject);}
57 operator CJS_EmbedObj* (){return m_pEmbedObj;}; 58 operator CJS_EmbedObj* (){return m_pEmbedObj;};
58 59
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 FX_DWORD m_dwStar tTime; 285 FX_DWORD m_dwStar tTime;
285 FX_DWORD m_dwTime Out; 286 FX_DWORD m_dwTime Out;
286 FX_DWORD m_dwElapse; 287 FX_DWORD m_dwElapse;
287 CJS_Runtime* m_pRuntime; 288 CJS_Runtime* m_pRuntime;
288 CFX_WideString m_swJScript; 289 CFX_WideString m_swJScript;
289 int m_nType; //0:Interval; 1:TimeOut 290 int m_nType; //0:Interval; 1:TimeOut
290 291
291 CPDFDoc_Environment* m_pApp; 292 CPDFDoc_Environment* m_pApp;
292 }; 293 };
293 #endif //_JS_OBJECT_H_ 294 #endif //_JS_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/jsapi/fxjs_v8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698