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

Issue 1129253004: Use phantom handles instead of weak handles (Closed)

Created:
5 years, 7 months ago by jochen (gone - plz use gerrit)
Modified:
5 years, 7 months ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

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= Committed: https://pdfium.googlesource.com/pdfium/+/1b8a296b5d1fdd7f6d7daa099f7feef869e05e5e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -11 lines) Patch
M fpdfsdk/include/javascript/JS_Object.h View 1 chunk +1 line, -0 lines 0 comments Download
M fpdfsdk/include/jsapi/fxjs_v8.h View 1 chunk +1 line, -0 lines 0 comments Download
M fpdfsdk/src/javascript/JS_Object.cpp View 2 chunks +18 lines, -9 lines 0 comments Download
M fpdfsdk/src/jsapi/fxjs_v8.cpp View 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
jochen (gone - plz use gerrit)
5 years, 7 months ago (2015-05-13 01:29:26 UTC) #1
Tom Sepez
lgtm
5 years, 7 months ago (2015-05-13 17:27:14 UTC) #2
jochen (gone - plz use gerrit)
5 years, 7 months ago (2015-05-14 00:00:52 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
1b8a296b5d1fdd7f6d7daa099f7feef869e05e5e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698