summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript
diff options
context:
space:
mode:
authorJochen Eisinger <jochen@chromium.org>2015-05-14 02:00:44 +0200
committerJochen Eisinger <jochen@chromium.org>2015-05-14 02:00:44 +0200
commit1b8a296b5d1fdd7f6d7daa099f7feef869e05e5e (patch)
treeb5abbe51992f6925bc9c3978d5444910e516c2ba /fpdfsdk/include/javascript
parent8aa1eac606d8e5030de6509f5d5d66e90db521f4 (diff)
downloadpdfium-1b8a296b5d1fdd7f6d7daa099f7feef869e05e5e.tar.xz
Use phantom handles instead of weak handles
Phantom handles allow for freeing objects with one pass of GC. However, this means that by the time the callback is invoked, the v8 object already does no longer exist. To avoid accidential access to the dead object, there are now two callbacks, where the first must only reset the handle, and the second does the clean-up work. R=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/1129253004
Diffstat (limited to 'fpdfsdk/include/javascript')
-rw-r--r--fpdfsdk/include/javascript/JS_Object.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fpdfsdk/include/javascript/JS_Object.h b/fpdfsdk/include/javascript/JS_Object.h
index 72cd9904f5..acbff840f1 100644
--- a/fpdfsdk/include/javascript/JS_Object.h
+++ b/fpdfsdk/include/javascript/JS_Object.h
@@ -46,6 +46,7 @@ public:
virtual ~CJS_Object(void);
void MakeWeak();
+ void Dispose();
virtual FX_BOOL IsType(FX_LPCSTR sClassName){return TRUE;};
virtual CFX_ByteString GetClassName(){return "";};