-
Notifications
You must be signed in to change notification settings - Fork 293
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
implement brotli classes #2619
implement brotli classes #2619
Conversation
17cc7e0
to
4d2dfbc
Compare
4d2dfbc
to
1476592
Compare
GH won't let me comment on the line, but turn on the brotli tests in |
@npaun Those are the one-shot methods that this pull-request doesn't cover. |
1476592
to
42c39e9
Compare
@anonrig Right, that's my job then hehe |
42c39e9
to
dae62e3
Compare
Just flagging that there's a memory issue in the linux-asan build |
static jsg::Ref<ZlibStream> constructor(ZlibModeValue mode); | ||
explicit CompressionStream(ZlibMode _mode): context_(_mode) {} | ||
CompressionStream() = default; | ||
~CompressionStream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
~CompressionStream(); | |
~CompressionStream() noexcept(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible:
src/workerd/api/node/zlib-util.h:260:5: error: exception specification is not available until end of class definition
260 | ~CompressionStream() noexcept(false);
7a31c11
to
faa4e7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'd wait for James || Felix to approve as well before merging because it's a bigger change
faa4e7c
to
44a863b
Compare
15722d1
to
728c87d
Compare
728c87d
to
972fcf1
Compare
} | ||
|
||
protected: | ||
CompressionContext* context() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: Our typical style would be to return a CompressionContext&
here instead... and if you do want/need to provide the pointer, provide a separate CompressionContext* get()
or something.
private: | ||
// Used to store allocations in Brotli* operations. | ||
// This declaration should be physically positioned before | ||
// context to avoid `heap-use-after-free` ASan error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking nit: I would expand the comment slight to connect this more concretely with the AllocFor_
and FreeFor_
APIs above.
Implements:
new BrotliCompress()
new BrotliDecompress()
createBrotliDecompress()
createBrotliCompress()
functions and classes to
node:zlib