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

Handle u32 property indices #24858

Merged
merged 1 commit into from Nov 27, 2019
Merged

Handle u32 property indices #24858

merged 1 commit into from Nov 27, 2019

Conversation

@saschanaz
Copy link
Contributor

saschanaz commented Nov 25, 2019

Tried porting from Gecko, not sure how to do void JSID check yet.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #14093
  • There are tests for these changes
@highfive
Copy link

highfive commented Nov 25, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/bindings/utils.rs
  • @KiChjang: components/script/dom/bindings/utils.rs
@highfive
Copy link

highfive commented Nov 25, 2019

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@saschanaz
Copy link
Contributor Author

saschanaz commented Nov 25, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Nov 25, 2019

Trying commit 0f9f59e with merge 6db62f1...

bors-servo added a commit that referenced this pull request Nov 25, 2019
Handle u32 property indices

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

Tried porting from Gecko, not sure how to do void JSID check yet.

---
<!-- 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
- [ ] `./mach test-tidy` does not report any errors
- [x] These changes fix #14093

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 25, 2019

☀️ Test successful - status-taskcluster
State: approved= try=True

// } else {
// IdToInt32(cx, id);

// if !RUST_JSID_IS_VOID(raw_id) {

This comment has been minimized.

@jdm

jdm Nov 25, 2019

Member

In the short term this could be if raw_id.asBits == JSID_VOID.asBits (based on https://doc.servo.org/mozjs_sys/jsid/constant.JSID_VOID.html). We can also add a RUST_JSID_IS_VOID API to https://github.com/servo/rust-mozjs/blob/master/src/glue.rs and https://github.com/servo/rust-mozjs/blob/master/src/jsglue.cpp.

let mut i: u32 = 0;
let is_array = if s.is_ascii() {
let chars = s.as_bytes();
StringIsArrayIndex1(chars.as_ptr() as *const i8, chars.len() as u32, &mut i)

This comment has been minimized.

@jdm

jdm Nov 25, 2019

Member

c_char is a different type on ARM, so we need as *const _ instead of hardcoding i8.

@saschanaz saschanaz force-pushed the saschanaz:handle-property branch from 0f9f59e to c9e080e Nov 26, 2019
bors-servo added a commit to servo/rust-mozjs that referenced this pull request Nov 26, 2019
Add JSID_IS_VOID

For servo/servo#24858.
@saschanaz saschanaz force-pushed the saschanaz:handle-property branch 3 times, most recently from b4b9a2a to ebaf585 Nov 26, 2019
@jdm
Copy link
Member

jdm commented Nov 26, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

📌 Commit ebaf585 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

Testing commit ebaf585 with merge 91b85a7...

bors-servo added a commit that referenced this pull request Nov 26, 2019
Handle u32 property indices

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

Tried porting from Gecko, not sure how to do void JSID check yet.

---
<!-- 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 #14093

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@saschanaz saschanaz force-pushed the saschanaz:handle-property branch from ebaf585 to 909cfa5 Nov 26, 2019
@saschanaz
Copy link
Contributor Author

saschanaz commented Nov 26, 2019

Ooops, last time important bit 🤯

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

Testing commit e20de3b with merge 921a53f...

bors-servo added a commit that referenced this pull request Nov 27, 2019
Handle u32 property indices

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

Tried porting from Gecko, not sure how to do void JSID check yet.

---
<!-- 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 #14093

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Nov 27, 2019

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

Testing commit e20de3b with merge 3480c7b...

bors-servo added a commit that referenced this pull request Nov 27, 2019
Handle u32 property indices

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

Tried porting from Gecko, not sure how to do void JSID check yet.

---
<!-- 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 #14093

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Nov 27, 2019

I will retry this when our CI has caught up with the existing build queue. Please do not retry in the meantime.

@saschanaz
Copy link
Contributor Author

saschanaz commented Nov 27, 2019

Starting to worry a bit, but didn't find any evidence that this PR caused those failures.

@jdm
Copy link
Member

jdm commented Nov 27, 2019

This PR is not the cause - we have several high frequency intermittent failures right now across all our CI platforms, and every time we have to do a full CI run it's very likely that we hit them. Retrying while there are builds in progress means we have to re-run all of the in-progress builds; whereas when we wait until the builds are complete, we only re-run the ones that failed.

@jdm
Copy link
Member

jdm commented Nov 27, 2019

https://treeherder.allizom.org/#/jobs?repo=servo-auto shows the view that I am looking at to determine when it's a good time to retry.

@saschanaz
Copy link
Contributor Author

saschanaz commented Nov 27, 2019

we have several high frequency intermittent failures right now across all our CI platforms

Sounds like a good reason to filter them, what's the reason not to do so?

@jdm
Copy link
Member

jdm commented Nov 27, 2019

We filter based on test filename, and these are failures that can (and do) affect any test that runs.

@jdm
Copy link
Member

jdm commented Nov 27, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

Testing commit e20de3b with merge a020522...

bors-servo added a commit that referenced this pull request Nov 27, 2019
Handle u32 property indices

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

Tried porting from Gecko, not sure how to do void JSID check yet.

---
<!-- 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 #14093

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 27, 2019

☀️ Test successful - status-taskcluster
Approved by: jdm
Pushing a020522 to master...

@bors-servo bors-servo merged commit e20de3b into servo:master Nov 27, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
@saschanaz saschanaz deleted the saschanaz:handle-property branch Nov 27, 2019
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.

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