Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't create a new BrowsingContext object for each Window #14843

Closed
asajeffrey opened this issue Jan 4, 2017 · 3 comments
Closed

Don't create a new BrowsingContext object for each Window #14843

asajeffrey opened this issue Jan 4, 2017 · 3 comments
Assignees

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jan 4, 2017

At the moment, we are creating a new BrowsingContext object for each Window, which is wrong and probably the root cause of #14312 (comment). cc @jdm @Ms2ger @cbrewster

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jan 11, 2017

IRC chat with @cbrewster: http://logs.glob.uno/?c=mozilla%23servo&s=11+Jan+2017&e=11+Jan+2017#c591494

TL;DR: we are disabling some storage tests which we suspect are failing because of this. We need to make sure they are restored later.

bors-servo added a commit that referenced this issue Jan 12, 2017
…ow, r=emilio

Remove reflow status from browsing context.

<!-- Please describe your changes on the following line: -->

This PR removes the reflow status from each browsing context. Previously, we were only using it to avoid reflowing on traversal, which is rare enough it doesn't seem worth the complexity.

This is a first step towards #14843.

---
<!-- 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 do not require tests because reflows aren't visible from script

<!-- 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/14990)
<!-- Reviewable:end -->
@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jan 19, 2017

An IRC conversation with @bzbarsky http://logs.glob.uno/?c=mozilla%23jsapi&s=19+Jan+2017&e=19+Jan+2017#c819204

TL;DR: brain transplanting, what fun.

@asajeffrey asajeffrey mentioned this issue Jan 19, 2017
4 of 4 tasks complete
bors-servo added a commit that referenced this issue Jan 27, 2017
…xts, r=jdm

Allow windows to share browsing contexts.

<!-- Please describe your changes on the following line: -->

This PR allows different `Window` objects in the same browsing context to share a `BrowsingContext` object.

SpiderMonkey requires a `WindowProxy` object to be in the same compartment as its `Window`, so when a `WindowProxy` changes `Window`, we have to brain-transplant it. In turn this requires the reflector of a `BrowsingContext` to be mutable.

---
<!-- 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 #13608 and #14843
- [X] These changes do not require tests because an existing test catches this (`/html/browsers/the-window-object/Window-document.html` is now `PASS`)

<!-- 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/15120)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jan 29, 2017
…xts, r=jdm

Allow windows to share browsing contexts.

<!-- Please describe your changes on the following line: -->

This PR allows different `Window` objects in the same browsing context to share a `BrowsingContext` object.

SpiderMonkey requires a `WindowProxy` object to be in the same compartment as its `Window`, so when a `WindowProxy` changes `Window`, we have to brain-transplant it. In turn this requires the reflector of a `BrowsingContext` to be mutable.

---
<!-- 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 #13608 and #14843
- [X] These changes do not require tests because an existing test catches this (`/html/browsers/the-window-object/Window-document.html` is now `PASS`)

<!-- 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/15120)
<!-- Reviewable:end -->
@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Mar 2, 2017

Fixed by #15120.

@asajeffrey asajeffrey closed this Mar 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.