mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibJS+Everywhere: Propagate Cell::initialize errors from Heap::allocate
Callers that are already in a fallible context will now TRY to allocate cells. Callers in infallible contexts get a FIXME.
This commit is contained in:
parent
109b190a19
commit
b75b7f0c0d
178 changed files with 565 additions and 565 deletions
|
@ -171,7 +171,7 @@ ErrorOr<void> TreeBuilder::create_pseudo_element_if_needed(DOM::Element& element
|
|||
pseudo_element_node->set_generated(true);
|
||||
// FIXME: Handle images, and multiple values
|
||||
if (pseudo_element_content.type == CSS::ContentData::Type::String) {
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data);
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, pseudo_element_content.data).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto text_node = document.heap().allocate_without_realm<Layout::TextNode>(document, *text);
|
||||
text_node->set_generated(true);
|
||||
push_parent(verify_cast<NodeWithStyle>(*pseudo_element_node));
|
||||
|
@ -302,7 +302,7 @@ ErrorOr<void> TreeBuilder::create_layout_tree(DOM::Node& dom_node, TreeBuilder::
|
|||
auto placeholder_style = TRY(style_computer.compute_style(input_element, CSS::Selector::PseudoElement::Placeholder));
|
||||
auto placeholder = DOM::Element::create_layout_node_for_display_type(document, placeholder_style->display(), placeholder_style, nullptr);
|
||||
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, *placeholder_value);
|
||||
auto text = document.heap().allocate<DOM::Text>(document.realm(), document, *placeholder_value).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
auto text_node = document.heap().allocate_without_realm<Layout::TextNode>(document, *text);
|
||||
text_node->set_generated(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue