mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920425 part.4 Use mozilla::WidgetEvent::AsScriptErrorEvent() r=smaug
This commit is contained in:
parent
4f682bdaca
commit
c084924124
@ -578,7 +578,7 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
case NS_SCRIPT_ERROR_EVENT:
|
||||
{
|
||||
InternalScriptErrorEvent* oldScriptErrorEvent =
|
||||
static_cast<InternalScriptErrorEvent*>(mEvent);
|
||||
mEvent->AsScriptErrorEvent();
|
||||
InternalScriptErrorEvent* scriptErrorEvent =
|
||||
new InternalScriptErrorEvent(false, msg);
|
||||
scriptErrorEvent->AssignScriptErrorEventData(*oldScriptErrorEvent, true);
|
||||
|
@ -176,11 +176,9 @@ nsJSEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
Optional<uint32_t> columnNumber;
|
||||
|
||||
NS_ENSURE_TRUE(aEvent, NS_ERROR_UNEXPECTED);
|
||||
WidgetEvent* event = aEvent->GetInternalNSEvent();
|
||||
if (event->message == NS_LOAD_ERROR &&
|
||||
event->eventStructType == NS_SCRIPT_ERROR_EVENT) {
|
||||
InternalScriptErrorEvent *scriptEvent =
|
||||
static_cast<InternalScriptErrorEvent*>(event);
|
||||
InternalScriptErrorEvent* scriptEvent =
|
||||
aEvent->GetInternalNSEvent()->AsScriptErrorEvent();
|
||||
if (scriptEvent && scriptEvent->message == NS_LOAD_ERROR) {
|
||||
errorMsg = scriptEvent->errorMsg;
|
||||
msgOrEvent.SetAsString() = static_cast<nsAString*>(&errorMsg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user