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

Added checks that selection is valid, and fix set_selection_range. #11906

Merged
merged 1 commit into from Jun 29, 2016

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Jun 28, 2016

Fixed range checking for text inputs. Included some debug_assert! statements to check that the selection range is always valid.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #11901.
  • These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

This change is Reviewable

@highfive
Copy link

highfive commented Jun 28, 2016

Heads up! This PR modifies the following files:

@highfive
Copy link

highfive commented Jun 28, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@cbrewster
Copy link
Member

cbrewster commented Jun 28, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2016

📌 Commit 717c14d has been approved by ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2016

Testing commit 717c14d with merge 4550188...

bors-servo added a commit that referenced this pull request Jun 28, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

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

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11906)
<!-- Reviewable:end -->
@bors-servo bors-servo mentioned this pull request Jun 28, 2016
3 of 3 tasks complete
@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2016

💔 Test failed - linux-rel

@cbrewster
Copy link
Member

cbrewster commented Jun 28, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 28, 2016

Testing commit 717c14d with merge 8802f37...

bors-servo added a commit that referenced this pull request Jun 28, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

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

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11906)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Jun 28, 2016

No test?

@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

💔 Test failed - linux-rel

@cbrewster
Copy link
Member

cbrewster commented Jun 29, 2016

@jdm yeah might be good to add a test. Would a unit test work?

@jdm
Copy link
Member

jdm commented Jun 29, 2016

If a unit test can reproduce the problem, I'm fine with it.

@jdm jdm added the S-needs-tests label Jun 29, 2016
@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 29, 2016

Some IRC chat: http://logs.glob.uno/?c=mozilla%23servo&s=29+Jun+2016&e=29+Jun+2016#c465777

TL;DR: unsigned long parameters to webIDL functions are truncated to the range 0..2^32-1

@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 29, 2016

Squashed.

@bors-servo r=ConnorGBrewster

@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

📌 Commit 7ed8408 has been approved by ConnorGBrewster

bors-servo added a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

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

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11906)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

Testing commit 7ed8408 with merge 52d48aa...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

💔 Test failed - linux-dev

@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 29, 2016

@bors-servo retry

@Manishearth Manishearth removed this from the Tech Demo milestone Jun 29, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

Testing commit 7ed8408 with merge 61b9f60...

bors-servo added a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

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

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11906)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

💔 Test failed - linux-rel

@cbrewster
Copy link
Member

cbrewster commented Jun 29, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

Testing commit 7ed8408 with merge aa91412...

bors-servo added a commit that referenced this pull request Jun 29, 2016
…ewster

Added checks that selection is valid, and fix set_selection_range.

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

Fixed range checking for text inputs. Included some `debug_assert!` statements to check that the selection range is always valid.

---
<!-- 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 #11901.
- [X] These changes do not require tests because the code includes debug_asserts to ensure invariants are maintained.

<!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11906)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Jun 29, 2016

@bors-servo bors-servo merged commit 7ed8408 into servo:master Jun 29, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.