What does XPCSafeJSObjectWrapper do?

What does the Mozilla Firefox XPCSafeJSObject shell actually do?

The MDC documentation is as follows:

This shell was created to solve some problems with XPCNativeWrapper. In particular, some extensions want to be able to safely access objects independent of the object, and not access the underlying JavaScript object under XPCNativeWrapper without its strong guarantees of behavior. XPCSJOW acts as a buffer between the chrome code.

It doesn’t tell me much. In particular, I cannot say how access to objects through XPCSafeObject differs from directly accessing them.

Change . I understand that the goal of the wrapper as a whole is to protect privileged code from unprivileged code. What I do not understand (and does not seem to be documented) is how XPCSafeJSObject does it.

Does it only set privileges for accessing a property?

+3
source share
3 answers

. JavaScript, - , getter - . , . . .

XPCSafeJSObject JavaScript (.. , .., ).

: , , ( .) XPCSafeJSObject DXR .

+1

XPCSafeJSObjectWrapper , ( , ). , , XSS , ( XSS ). , , XSS ( , , ), . XPCNativeWrapper, (, , ), XSS.

+4

, , , chrome. , chrome, .

+3

Source: https://habr.com/ru/post/1698752/


All Articles