diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc b/chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc index 2e685353655..3aebb0c255e 100644 --- a/chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc +++ b/chromium/third_party/blink/renderer/core/html/portal/portal_activate_event.cc @@ -105,7 +105,7 @@ ScriptValue PortalActivateEvent::data(ScriptState* script_state) { return ScriptValue(isolate, value); } -void PortalActivateEvent::Trace(Visitor* visitor) { +void PortalActivateEvent::Trace(Visitor* visitor) const { Event::Trace(visitor); visitor->Trace(document_); visitor->Trace(adopted_portal_); @@ -121,7 +121,8 @@ const AtomicString& PortalActivateEvent::InterfaceName() const { HTMLPortalElement* PortalActivateEvent::adoptPredecessor( ExceptionState& exception_state) { - if (!RuntimeEnabledFeatures::PortalsEnabled(document_)) { + if (!RuntimeEnabledFeatures::PortalsEnabled( + document_ ? document_->GetExecutionContext() : nullptr)) { exception_state.ThrowDOMException( DOMExceptionCode::kNotSupportedError, "Portals is not enabled in this document."); |