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: permission stack traces in ops #26758

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

crowlKats
Copy link
Member

No description provided.

@crowlKats crowlKats added this to the 2.1.0 milestone Nov 6, 2024
@crowlKats crowlKats changed the title feat: permission stack traces in ops feat: permission stack traces in ops Nov 6, 2024
#[serde]
pub fn op_pledge_test_permissions(
state: &mut OpState,
#[serde] args: ChildPermissionsArg,
#[stack_trace] stack: Option<Vec<JsStackFrame>>,
Copy link
Member

@dsherret dsherret Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice if we instead stored this internally in the op state then had the ability to register updates to it:

state/worker.on_stack_update(|stack| permissions_container.set_current_stack(stack));

Then in the permissions container it could check what the current registred stack is. That way we don't need to pass this around so much.

@@ -1126,16 +1136,17 @@ mod deprecated {
}
}

#[op2(fast)]
#[op2(fast, reentrant)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it necessary that reentrant is on? This should not be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants