|
@@ -66,7 +66,7 @@ static unsigned long determine_key_code(KeyCode platform_key, u32 code_point)
|
|
|
return platform_key;
|
|
|
}
|
|
|
|
|
|
-KeyboardEvent* KeyboardEvent::create_from_platform_event(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyCode platform_key, unsigned modifiers, u32 code_point)
|
|
|
+WebIDL::ExceptionOr<JS::NonnullGCPtr<KeyboardEvent>> KeyboardEvent::create_from_platform_event(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyCode platform_key, unsigned modifiers, u32 code_point)
|
|
|
{
|
|
|
// FIXME: Figure out what these should actually contain.
|
|
|
DeprecatedString event_key = key_code_to_string(platform_key);
|
|
@@ -104,12 +104,12 @@ bool KeyboardEvent::get_modifier_state(DeprecatedString const& key_arg)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-KeyboardEvent* KeyboardEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyboardEventInit const& event_init)
|
|
|
+WebIDL::ExceptionOr<JS::NonnullGCPtr<KeyboardEvent>> KeyboardEvent::create(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyboardEventInit const& event_init)
|
|
|
{
|
|
|
- return realm.heap().allocate<KeyboardEvent>(realm, realm, event_name, event_init).release_allocated_value_but_fixme_should_propagate_errors();
|
|
|
+ return MUST_OR_THROW_OOM(realm.heap().allocate<KeyboardEvent>(realm, realm, event_name, event_init));
|
|
|
}
|
|
|
|
|
|
-KeyboardEvent* KeyboardEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyboardEventInit const& event_init)
|
|
|
+WebIDL::ExceptionOr<JS::NonnullGCPtr<KeyboardEvent>> KeyboardEvent::construct_impl(JS::Realm& realm, DeprecatedFlyString const& event_name, KeyboardEventInit const& event_init)
|
|
|
{
|
|
|
return create(realm, event_name, event_init);
|
|
|
}
|