Skip to content

Creates empty string when passed null - #7885

Merged
bors-servo merged 1 commit into
servo:masterfrom
jimberlage:7858/null-message
Oct 9, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
jimberlage:7858/null-message

Conversation

@jimberlage

Copy link
Copy Markdown
Contributor

This should fix #7858. An empty USVString is now used when data is None.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 6, 2015
@nox nox 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 Oct 6, 2015
@nox

nox commented Oct 6, 2015

Copy link
Copy Markdown
Contributor

This is not the right fix, cf what Ms2ger says in the original issue.

@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 Oct 6, 2015
@Ms2ger

Ms2ger commented Oct 7, 2015

Copy link
Copy Markdown
Contributor

@jimberlage thank you, this is the correct fix. However, I would expect a corresponding change in websocket.rs; does Servo compile for you right now?

@jimberlage

Copy link
Copy Markdown
Contributor Author

@Ms2ger that's correct. Looks like I forgot to push it.

@Ms2ger

Ms2ger commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

Thank you! You'll also need to update the test expectations for the tests that now pass. Running

./mach test-wpt --log-raw /tmp/log html/dom/interfaces.html websockets/
./mach update-wpt /tmp/log

should create a new commit that does that.

@Ms2ger Ms2ger 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 Oct 8, 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 Oct 8, 2015
@jimberlage

Copy link
Copy Markdown
Contributor Author

I'll work on fixing this branch. Seems /tmp/log contains logging statements from running the tests with my bufferedAmount implementation. Those should be removed.

@jimberlage

Copy link
Copy Markdown
Contributor Author

There, now it contains the changes from building off commit 0bb881b.

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member

The diff still shows a lot of changes to tests for bufferedAmount :/

@jimberlage

Copy link
Copy Markdown
Contributor Author

I created a new branch in my forked repo based on 0bb881b, https://github.com/jimberlage/servo/tree/7858/null-message-new. The tests there appear to be correct, at least when comparing against servo:master on github. The easiest thing may be for me to just open a new PR against that correct branch. Sound reasonable?

@jdm

jdm commented Oct 8, 2015

Copy link
Copy Markdown
Member

Either that or force push that branch to this one, thus overwriting this one.

@jimberlage

Copy link
Copy Markdown
Contributor Author

Finally. My syntax for force pushing was incorrect.

@Ms2ger

Ms2ger commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

Please also squash all the commits, and use a commit message that describes the change. Maybe "Require the argument to WebSocket#send() (fixes #7858)."

@Ms2ger Ms2ger added S-needs-squash Some (or all) of the commits in the PR should be combined. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 8, 2015
@Ms2ger

Ms2ger commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

r+ with that

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 8, 2015
@Ms2ger

Ms2ger commented Oct 9, 2015

Copy link
Copy Markdown
Contributor

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 0ffd2f6 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. S-needs-squash Some (or all) of the commits in the PR should be combined. labels Oct 9, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 0ffd2f6 with merge 8c81d9a...

bors-servo pushed a commit that referenced this pull request Oct 9, 2015
Creates empty string when passed null

This should fix #7858.  An empty `USVString` is now used when `data` is `None`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7885)
<!-- Reviewable:end -->
@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 0ffd2f6 into servo:master Oct 9, 2015
@jimberlage
jimberlage deleted the 7858/null-message branch October 9, 2015 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

websocket.send(null) causes Servo to panic

6 participants