aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlappletelement.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-29 11:57:45 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-29 11:57:45 -0700
commit2c259f477c41331e66beab8bda865971982a1ff4 (patch)
tree12b1b56eec1482d6b6e31e85383a309856a39dc7 /components/script/dom/htmlappletelement.rs
parentf76a460c53dfddef74262eceaf4b163b551adc08 (diff)
parent9a7cd3113403fe44a8919f049720b67bfa92c9f1 (diff)
downloadservo-2c259f477c41331e66beab8bda865971982a1ff4.tar.gz
servo-2c259f477c41331e66beab8bda865971982a1ff4.zip
auto merge of #4057 : jdm/servo/refcountdom, r=Ms2ger
This replaces the specialized TrustedXHRAddress and TrustedWorkerAddress code that was used for the same purpose. A non-zero refcount pins the given DOM object's reflector and prevents it from being GCed even when there are no other outstanding references visible to SpiderMonkey. This will enable us to implement asynchronous operations that refer to particular DOM objects (such as "queue a task to fire a simple event named load at the iframe element" from the spec) safely and conveniently, and paves the way for things like asynchronous network responses. Some concerns about the resulting size of XHR progress messages have been expressed, but I believe optimizations to reduce that can be implemented in subsequent PRs. r? @Ms2ger - note in particular the changes to the worker lifetime code. I couldn't figure out how to achieve an identical lifetime to the previous addref/release pairing, and I also was having trouble figuring out why the existing setup was safe. The new implementation now holds the main script task Worker object alive via the TrustedWorkerAddress field in the dedicated worker global scope, which is a significant difference.
Diffstat (limited to 'components/script/dom/htmlappletelement.rs')
0 files changed, 0 insertions, 0 deletions