Commit c30cc4e
src: don't call DecodeWrite() on Buffers
Don't call DecodeWrite() with a Buffer as its argument because it in
turn calls StringBytes::Write() and that method expects a Local<String>.
"Why then does that function take a Local<Value>?" I hear you ask.
Good question but I don't have the answer. I added a CHECK for good
measure and what do you know, all of a sudden a large number of crypto
tests started failing.
Calling DecodeWrite(BINARY) on a buffer is nonsensical anyway: if you
want the contents of the buffer, just copy out the data, there is no
need to decode it - and that's exactly what this commit does.
Fixes a great many instances of the following run-time error in debug
builds:
FATAL ERROR: v8::String::Cast() Could not convert to string1 parent e87ceb2 commit c30cc4e
2 files changed
Lines changed: 8 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
764 | 764 | | |
765 | 765 | | |
766 | 766 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
| 767 | + | |
773 | 768 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
| 769 | + | |
781 | 770 | | |
782 | 771 | | |
783 | 772 | | |
| |||
1167 | 1156 | | |
1168 | 1157 | | |
1169 | 1158 | | |
1170 | | - | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
| 1159 | + | |
1175 | 1160 | | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
| 1161 | + | |
1179 | 1162 | | |
1180 | 1163 | | |
1181 | | - | |
| 1164 | + | |
1182 | 1165 | | |
1183 | 1166 | | |
1184 | 1167 | | |
| |||
3810 | 3793 | | |
3811 | 3794 | | |
3812 | 3795 | | |
3813 | | - | |
3814 | | - | |
3815 | 3796 | | |
3816 | 3797 | | |
3817 | 3798 | | |
| |||
3832 | 3813 | | |
3833 | 3814 | | |
3834 | 3815 | | |
3835 | | - | |
3836 | | - | |
| 3816 | + | |
3837 | 3817 | | |
3838 | 3818 | | |
3839 | 3819 | | |
| |||
3846 | 3826 | | |
3847 | 3827 | | |
3848 | 3828 | | |
3849 | | - | |
3850 | | - | |
| 3829 | + | |
3851 | 3830 | | |
3852 | 3831 | | |
3853 | 3832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| |||
0 commit comments