servo/components/script/dom
bors-servo 2c259f477c 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.
2014-12-29 11:57:45 -07:00
..
bindings auto merge of #4057 : jdm/servo/refcountdom, r=Ms2ger 2014-12-29 11:57:45 -07:00
webidls Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
activation.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
attr.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
blob.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
browsercontext.rs Fix warnings post-upgrade 2014-12-27 03:28:35 +05:30
canvasrenderingcontext2d.rs Remove extra spaces 2014-12-27 02:53:35 +05:30
characterdata.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
comment.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
console.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
create.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
cssstyledeclaration.rs Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
customevent.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
dedicatedworkerglobalscope.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
document.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
documentfragment.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
documenttype.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
domexception.rs Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
domimplementation.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
domparser.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
domrect.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
domrectlist.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
domstringmap.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
domtokenlist.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
element.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
errorevent.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
event.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
eventdispatcher.rs Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
eventtarget.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
file.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
formdata.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlanchorelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlappletelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlareaelement.rs AttrValue's s/from_tokenlist/from_serialized_tokenlist/ 2014-12-26 13:08:20 -04:00
htmlaudioelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlbaseelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlbodyelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlbrelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlbuttonelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlcanvaselement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlcollection.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
htmldataelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmldatalistelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmldirectoryelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmldivelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmldlistelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlelement.rs Added readonly flag for CSSStyleDeclaration 2014-12-28 17:39:07 +01:00
htmlembedelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlfieldsetelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlfontelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlformelement.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
htmlframeelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlframesetelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlheadelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlheadingelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlhrelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlhtmlelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmliframeelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlimageelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlinputelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmllabelelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmllegendelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmllielement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmllinkelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlmapelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlmediaelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlmetaelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlmeterelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlmodelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlobjectelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlolistelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmloptgroupelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmloptionelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmloutputelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlparagraphelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlparamelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlpreelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlprogresselement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlquoteelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlscriptelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlselectelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmlserializer.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
htmlsourceelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlspanelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlstyleelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltablecaptionelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltablecellelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltablecolelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltabledatacellelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltableelement.rs Remove extra spaces 2014-12-27 02:53:35 +05:30
htmltableheadercellelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltablerowelement.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
htmltablesectionelement.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
htmltemplateelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltextareaelement.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
htmltimeelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmltitleelement.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
htmltrackelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlulistelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlunknownelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
htmlvideoelement.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
keyboardevent.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
location.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
macros.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
messageevent.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
mouseevent.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
namednodemap.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
navigator.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
navigatorinfo.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
node.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
nodeiterator.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
nodelist.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
performance.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
performancetiming.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
processinginstruction.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
progressevent.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
range.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
screen.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
servohtmlparser.rs script: Remove glob imports added in #4405 2014-12-19 04:52:48 +09:00
storage.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
testbinding.rs auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallister 2014-12-27 22:12:45 -07:00
text.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
treewalker.rs Remove extra spaces 2014-12-27 02:53:35 +05:30
uievent.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
urlhelper.rs script: to_string() -> into_string() 2014-12-27 14:48:36 +01:00
urlsearchparams.rs Ensure that Reflectors are the first field 2014-12-27 02:53:36 +05:30
validitystate.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
virtualmethods.rs Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
websocket.rs Remove extra spaces 2014-12-27 02:53:35 +05:30
window.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
worker.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
workerglobalscope.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
workerlocation.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
workernavigator.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30
xmlhttprequest.rs Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed. 2014-12-29 13:53:49 -05:00
xmlhttprequesteventtarget.rs Remove extra spaces 2014-12-27 02:53:35 +05:30
xmlhttprequestupload.rs Remove manual impls of Reflectors (autogen) 2014-12-27 02:52:33 +05:30