Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSerializing origins #14892
Closed
Serializing origins #14892
Labels
Comments
This was referenced Jan 6, 2017
|
Did we end up moving to process-global counters rather than uuids for opaque origins? We would probably need to revert that if we want to send origins across processes. |
|
We did move away from uuids and we would have to move back if we wanted them to be global. |
|
This is needed in a few places: anywhere we're sending origins to the contstellation, and anywhere where a helper thread needs to know the origin that its acting on behalf of, notably fetch. |
bors-servo
added a commit
that referenced
this issue
Feb 22, 2017
Add ImmutableOrigin to allow for serializing origins <!-- Please describe your changes on the following line: --> This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14892. - [X] These changes do not require tests because it's a refactoring which will enable other features. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15438) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Feb 22, 2017
Add ImmutableOrigin to allow for serializing origins <!-- Please describe your changes on the following line: --> This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14892. - [X] These changes do not require tests because it's a refactoring which will enable other features. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15438) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Feb 22, 2017
Add ImmutableOrigin to allow for serializing origins <!-- Please describe your changes on the following line: --> This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14892. - [X] These changes do not require tests because it's a refactoring which will enable other features. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15438) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Feb 22, 2017
Add ImmutableOrigin to allow for serializing origins <!-- Please describe your changes on the following line: --> This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #14892. - [X] These changes do not require tests because it's a refactoring which will enable other features. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15438) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IRC conversation with @bzbarsky: http://logs.glob.uno/?c=mozilla%23servo&s=6+Jan+2017&e=6+Jan+2017#c588833
Origin objects have object identity, which can be observed in at least two ways: a) we create new opaque origins, then check their identity, and b)
document.domainallows origin objects to be mutated.This is fine for threads which share an address space, not so good for serializing origins from script to the constellation. In particular, we need to store origins in the session history, so that if an
about:blankpage is reloaded, it does so with the same origin as it had before.