

The return value of evalInSandbox() and any properties attached to the Object or Date as well as a string or a primitive The detail property of a CustomEvent fired by content could be a JavaScript JavaScript objects that are not themselves DOM objects and are not
#X ray vision on code
However, there are some situations in which privileged code will access Object, and then it will be filtered out by the DOM Xray: New Date object, it will usually be created as a property of a DOM With untrusted web content manipulating objects, and web content is Most of the time this is not a problem: the main concern Xrays solve is Until recently, built-in JavaScript objects that are not part of theĭate, Error, and Object, did not get Xray vision when The same as the DOM specification, since that is defined using the This also makes the semantics of Xrays for DOM objects clear: they are Instead of filtering out modifications made by content, the Xray Object, and doesn’t go to the content’s JavaScript reflection at all. Xray just directly accesses the C++ representation of the original The dual representation enables an elegant implementation of Xrays: the JavaScript reflection and does not affect the C++ representation. Any modifications to these objects, such asĪdding expandos or redefining standard properties, stays in the Representation is in C++, and this is reflected into JavaScript for theīenefit of JavaScript code. In Gecko, DOM objects have a dual representation: the canonical Objects that represent parts of the web page. The primary use of Xray vision is for DOM objects: that is, the confirm ( "Transfer all my money?" ) // calls the native implementation Xrays for DOM objects ¶ Over content code and is protected from direct access by content The security principal defined for the sandbox determinesĮxpanded Principal is used, the sandbox is granted certain privileges Regarded as untrusted and potentially hostile, both to other websitesĪs well as these two levels of privilege, chrome code can create JavaScript loaded from normal web pages is called content code.īecause this code is being loaded from arbitrary web pages, it is If chrome-privileged code is compromised, the attacker The JavaScript code that along with the C++ core, implements theīrowser itself is called chrome code and runs using system Gecko runs JavaScript from a variety of different sources and at a Safely access objects created by less privileged code, by showing theĬaller only the native version of the objects. Xray vision helps JavaScript running in a privileged security context

Implementing specifications using WHATWG Streams API.Getting Set Up To Work On The Firefox Codebase.
