Skip to content

Implement weak-referenceable JS-managed objects - #8147

Merged
bors-servo merged 1 commit into
servo:masterfrom
nox:weakref
Nov 13, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
nox:weakref

Conversation

@nox

@nox nox commented Oct 22, 2015

Copy link
Copy Markdown
Contributor

Review on Reviewable

@nox nox added A-content/dom Interacting with the DOM from web content A-content/bindings The DOM bindings labels Oct 22, 2015
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 22, 2015
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@nox nox added the C-has-manual-testcase A minimal testcase exists that can be run manually. label Oct 22, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #8226) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 28, 2015
@jdm jdm self-assigned this Oct 28, 2015
@Ms2ger

Ms2ger commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, 4 of 9 files at r3.
Review status: 4 of 9 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.


components/script/dom/bindings/codegen/CodegenRust.py, line 4472 [r3] (raw file):
Neither "box" nor "ptr" means anything.


components/script/dom/bindings/codegen/CodegenRust.py, line 4475 [r3] (raw file):
Assert that it was >= 1 before?


components/script/dom/bindings/codegen/CodegenRust.py, line 4480 [r3] (raw file):
drop()?


components/script/dom/bindings/weakref.rs, line 5 [r3] (raw file):
Add more docs about how it works.


components/script/dom/bindings/weakref.rs, line 30 [r3] (raw file):
Would it make sense to move the finalization code into a function here?


components/script/dom/bindings/weakref.rs, line 33 [r3] (raw file):
Where the pointee contributes one reference?


components/script/dom/bindings/weakref.rs, line 80 [r3] (raw file):
Make this private?


components/script/dom/bindings/weakref.rs, line 109 [r3] (raw file):
Assert it wasn't zero


components/script/dom/bindings/weakref.rs, line 121 [r3] (raw file):
I don't understand what this is for.


Comments from the review on Reviewable.io

@nox

nox commented Nov 4, 2015

Copy link
Copy Markdown
Contributor Author

Review status: 4 of 9 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed.


components/script/dom/bindings/codegen/CodegenRust.py, line 4472 [r3] (raw file):
Sure, suggest better names. :)


components/script/dom/bindings/codegen/CodegenRust.py, line 4475 [r3] (raw file):
Ok.


components/script/dom/bindings/weakref.rs, line 30 [r3] (raw file):
I don't think so, this way it lives only in codegen and can't be misused. The function would be on WeakBox and I don't think that's a good idea.


components/script/dom/bindings/weakref.rs, line 33 [r3] (raw file):
The pointee?


components/script/dom/bindings/weakref.rs, line 80 [r3] (raw file):
No, I intend to use it.


components/script/dom/bindings/weakref.rs, line 121 [r3] (raw file):
It's a wrapper to a weak reference, I don't plan to make WeakRef clean itself. That's the job of this structure. I plan to have other wrappers in the future, for vectors and whatnot.


Comments from the review on Reviewable.io

@jdm jdm assigned Ms2ger and unassigned jdm Nov 4, 2015
@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 4, 2015
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 5, 2015
@nox nox removed the S-needs-rebase There are merge conflict errors. label Nov 5, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #8197) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 11, 2015
@Ms2ger

Ms2ger commented Nov 12, 2015

Copy link
Copy Markdown
Contributor

Reviewed 1 of 9 files at r3, 6 of 6 files at r4.
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.


components/script/dom/bindings/codegen/CodegenRust.py, line 4757 [r4] (raw file):
assert descriptor.weakReferenceable.


components/script/dom/bindings/weakref.rs, line 33 [r3] (raw file):
The DOM object.


components/script/dom/bindings/weakref.rs, line 121 [r3] (raw file):
I still don't see the point, but whatever.


Comments from the review on Reviewable.io

This allows to take weak references of JS-managed DOM objects.
@nox

nox commented Nov 12, 2015

Copy link
Copy Markdown
Contributor Author

@nox nox removed the S-needs-rebase There are merge conflict errors. label Nov 12, 2015
@Ms2ger

Ms2ger commented Nov 12, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+


Reviewed 8 of 8 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 72c67ef has been approved by Ms2ger

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 72c67ef with merge b2747f9...

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 12, 2015
bors-servo pushed a commit that referenced this pull request Nov 12, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 12, 2015
@jdm

jdm commented Nov 12, 2015

Copy link
Copy Markdown
Member

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 72c67ef with merge 5000129...

bors-servo pushed a commit that referenced this pull request Nov 12, 2015
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 12, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 12, 2015
@nox

nox commented Nov 13, 2015

Copy link
Copy Markdown
Contributor Author

@bors-servo retry #8502

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 72c67ef with merge e63b1e8...

bors-servo pushed a commit that referenced this pull request Nov 13, 2015
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 13, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 72c67ef into servo:master Nov 13, 2015
@nox
nox deleted the weakref branch December 15, 2015 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-content/bindings The DOM bindings A-content/dom Interacting with the DOM from web content C-has-manual-testcase A minimal testcase exists that can be run manually. S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants