mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 18:07:31 +09:00
Bug 1288768 - Better error reporting for network errors in workers
This commit is contained in:
parent
8f4e22e819
commit
12f3d0302c
5 changed files with 132 additions and 26 deletions
|
|
@ -412,8 +412,17 @@ Event::Constructor(const GlobalObject& aGlobal,
|
|||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<mozilla::dom::EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
RefPtr<Event> e = new Event(t, nullptr, nullptr);
|
||||
bool trusted = e->Init(t);
|
||||
return Constructor(t, aType, aParam);
|
||||
}
|
||||
|
||||
// static
|
||||
already_AddRefed<Event>
|
||||
Event::Constructor(EventTarget* aEventTarget,
|
||||
const nsAString& aType,
|
||||
const EventInit& aParam)
|
||||
{
|
||||
RefPtr<Event> e = new Event(aEventTarget, nullptr, nullptr);
|
||||
bool trusted = e->Init(aEventTarget);
|
||||
e->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
|
||||
e->SetTrusted(trusted);
|
||||
e->SetComposed(aParam.mComposed);
|
||||
|
|
@ -1209,7 +1218,7 @@ Event::Deserialize(const IPC::Message* aMsg, PickleIterator* aIter)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP_(void)
|
||||
Event::SetOwner(mozilla::dom::EventTarget* aOwner)
|
||||
Event::SetOwner(EventTarget* aOwner)
|
||||
{
|
||||
mOwner = nullptr;
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,10 @@ public:
|
|||
LayoutDeviceIntPoint aPoint,
|
||||
CSSIntPoint aDefaultPoint);
|
||||
|
||||
static already_AddRefed<Event> Constructor(EventTarget* aEventTarget,
|
||||
const nsAString& aType,
|
||||
const EventInit& aParam);
|
||||
|
||||
static already_AddRefed<Event> Constructor(const GlobalObject& aGlobal,
|
||||
const nsAString& aType,
|
||||
const EventInit& aParam,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue