ladybird/Userland/Libraries/LibWeb/WebIDL/DOMException.cpp
Timothy Flynn f3db548a3d AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
2023-01-09 23:00:24 +00:00

32 lines
978 B
C++

/*
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/WebIDL/DOMException.h>
namespace Web::WebIDL {
JS::NonnullGCPtr<DOMException> DOMException::create(JS::Realm& realm, DeprecatedFlyString const& name, DeprecatedFlyString const& message)
{
return realm.heap().allocate<DOMException>(realm, realm, name, message);
}
JS::NonnullGCPtr<DOMException> DOMException::construct_impl(JS::Realm& realm, DeprecatedFlyString const& message, DeprecatedFlyString const& name)
{
return realm.heap().allocate<DOMException>(realm, realm, name, message);
}
DOMException::DOMException(JS::Realm& realm, DeprecatedFlyString const& name, DeprecatedFlyString const& message)
: PlatformObject(realm)
, m_name(name)
, m_message(message)
{
set_prototype(&Bindings::cached_web_prototype(realm, "DOMException"));
}
DOMException::~DOMException() = default;
}