Skip to content

Commit

Permalink
Add DCHECK in InlineStyleOverrideScope
Browse files Browse the repository at this point in the history
This is a temporary step to hopefully get more insights into what caused
the crashes.

Bug: 1330656
Change-Id: I3648f7ec58e91fe877c02a55762cb1b33e613b6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3810483
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032463}
  • Loading branch information
hanselfmu-chromium authored and Chromium LUCI CQ committed Aug 8, 2022
1 parent 189cf51 commit b9e7a2b
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -89,8 +89,10 @@ class CORE_EXPORT InspectorCSSAgent final
STACK_ALLOCATED();

public:
explicit InlineStyleOverrideScope(ExecutionContext* context)
: content_security_policy_(context->GetContentSecurityPolicy()) {
explicit InlineStyleOverrideScope(ExecutionContext* context) {
DCHECK(context);
content_security_policy_ = context->GetContentSecurityPolicy();
DCHECK(content_security_policy_);
content_security_policy_->SetOverrideAllowInlineStyle(true);
}

Expand Down

0 comments on commit b9e7a2b

Please sign in to comment.