core: memory limits & callbacks#6914
Conversation
piscisaureus
left a comment
There was a problem hiding this comment.
Maybe you forgot to set V8_FROM_SOURCE?
|
@piscisaureus this needs a release in |
|
Yes this week. |
|
did this fail because of a flaky test? |
|
@mraerino Currently I don't think we have any flaky tests - but who knows it's always possible. Try pushing an empty commit to re-trigger CI. My guess would be that it's related to your patch. I've pulled out the relevant failure logs from Github Actions: |
|
ok, i can't explain the failures. between the two runs different things failed, so they seem non-deterministic. my changes only add new interfaces to |
|
@mraerino Looks like it was indeed something flaky. Build is good. Reviewing now... |
|
|
||
| type JSErrorCreateFn = dyn Fn(JSError) -> ErrBox; | ||
|
|
||
| type PinnedRefCell = Pin<Box<RefCell<dyn Any>>>; |
There was a problem hiding this comment.
Curious question - what does a Pin around a RefCell (boxed or not) achieve?
I'd think that, since a RefCell allows interior mutability, this kinda negates the effect of the pin.
(In other words - why do you need to pin this?)
There was a problem hiding this comment.
good point. removed.
| /// The return value of the closure is set as the new limit. | ||
| pub fn add_near_heap_limit_callback<C>(&mut self, cb: C) | ||
| where | ||
| C: FnMut(usize, usize) -> usize + 'static, |
|
Now that you say this:
I realized a small thing was missing: #7025 |
Fixes #6916