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

feat: Implement Rust-side const ExternalOneByteStringResource subclass #1275

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove more uselessness
  • Loading branch information
aapoalas committed Jul 10, 2023
commit 20ed04386de41b352a8b5ae9b35dadf4d23389e9
4 changes: 2 additions & 2 deletions src/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1018,8 +1018,8 @@ class ExternalStaticOneByteStringResource
class ExternalConstOneByteStringResource
aapoalas marked this conversation as resolved.
Show resolved Hide resolved
: public v8::String::ExternalOneByteStringResource {
public:
ExternalConstOneByteStringResource(const char* data, int length)
: _data(data), _length(length) {
ExternalConstOneByteStringResource(int length)
: _length(length) {
static_assert(offsetof(ExternalConstOneByteStringResource, _length) == 16,
"ExternalConstOneByteStringResource's length was not at offset 16");
static_assert(sizeof(ExternalConstOneByteStringResource) == 24,
Expand Down