mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibJS+LibWeb: Port interned bytecode strings to UTF-16
This was almost a no-op, except we intern JS exception messages. So the bulk of this patch is porting exception messages to UTF-16.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
cf61171864
commit
70db474cf0
Notes:
github-actions[bot]
2025-08-14 08:28:16 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/70db474cf07 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5845 Reviewed-by: https://github.com/gmta ✅
@@ -495,18 +495,18 @@ WebIDL::ExceptionOr<void> HTMLSelectElement::show_picker()
|
||||
|
||||
// 1. If this is not mutable, then throw an "InvalidStateError" DOMException.
|
||||
if (!enabled())
|
||||
return WebIDL::InvalidStateError::create(realm(), "Element is not mutable"_string);
|
||||
return WebIDL::InvalidStateError::create(realm(), "Element is not mutable"_utf16);
|
||||
|
||||
// 2. If this's relevant settings object's origin is not same origin with this's relevant settings object's top-level origin,
|
||||
// and this is a select element, then throw a "SecurityError" DOMException.
|
||||
if (!relevant_settings_object(*this).origin().is_same_origin(relevant_settings_object(*this).top_level_origin.value())) {
|
||||
return WebIDL::SecurityError::create(realm(), "Cross origin pickers are not allowed"_string);
|
||||
return WebIDL::SecurityError::create(realm(), "Cross origin pickers are not allowed"_utf16);
|
||||
}
|
||||
|
||||
// 3. If this's relevant global object does not have transient activation, then throw a "NotAllowedError" DOMException.
|
||||
auto& global_object = relevant_global_object(*this);
|
||||
if (!as<HTML::Window>(global_object).has_transient_activation()) {
|
||||
return WebIDL::NotAllowedError::create(realm(), "Too long since user activation to show picker"_string);
|
||||
return WebIDL::NotAllowedError::create(realm(), "Too long since user activation to show picker"_utf16);
|
||||
}
|
||||
|
||||
// FIXME: 4. If this is a select element, and this is not being rendered, then throw a "NotSupportedError" DOMException.
|
||||
|
||||
Reference in New Issue
Block a user