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

Use JS_NewStringCopyN for the representation of interface objects #11188

Merged
merged 1 commit into from
May 16, 2016

Conversation

nox
Copy link
Contributor

@nox nox commented May 14, 2016

This removes the need for the final null byte and we can make NonCallbackInterfaceObjectClass::new safe again I guess.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/bindings/codegen/CodegenRust.py, components/script/dom/bindings/interface.rs

@highfive
Copy link

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 14, 2016
@nox
Copy link
Contributor Author

nox commented May 14, 2016

r? @Ms2ger

@highfive
Copy link

New code was committed to pull request.

@nox nox changed the title Use JS_NewStringN for the representation of interface objects Use JS_NewStringCopyN for the representation of interface objects May 14, 2016
@@ -1993,17 +1993,16 @@ def define(self):
args = {
"constructorBehavior": constructorBehavior,
"id": name,
"representation": str_to_const_array("function %s() {\\n [native code]\\n}" % name),
"representation": "b\"function %s() {\\n [native code]\\n}\"" % name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use single quotes for the python string to avoid escaping the Rust quotes; r+ with that

This removes the need for the final null byte and we can make
NonCallbackInterfaceObjectClass::new safe again I guess.
@highfive
Copy link

New code was committed to pull request.

@nox
Copy link
Contributor Author

nox commented May 16, 2016

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

📌 Commit 4af3e90 has been approved by Ms2ger

@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 May 16, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 4af3e90 with merge 252b0d8...

bors-servo pushed a commit that referenced this pull request May 16, 2016
Use JS_NewStringCopyN for the representation of interface objects

This removes the need for the final null byte and we can make NonCallbackInterfaceObjectClass::new safe again I guess.

<!-- 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/11188)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@bors-servo bors-servo merged commit 4af3e90 into servo:master May 16, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants