mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout c19edad3d359 (bug 814026) for Android bustage
This commit is contained in:
parent
bf7072426a
commit
b62ff67228
@ -331,7 +331,8 @@ EventListenerManager::DispatchEvent(JSContext* aCx, const EventTarget& aTarget,
|
||||
return false;
|
||||
}
|
||||
|
||||
js::AutoValueVector listeners(aCx);
|
||||
ContextAllocPolicy ap(aCx);
|
||||
js::Vector<JSObject*, 10, ContextAllocPolicy> listeners(ap);
|
||||
|
||||
for (PRCList* elem = PR_NEXT_LINK(&collection->mListenerHead);
|
||||
elem != &collection->mListenerHead;
|
||||
@ -341,7 +342,7 @@ EventListenerManager::DispatchEvent(JSContext* aCx, const EventTarget& aTarget,
|
||||
// Listeners that don't want untrusted events will be skipped if this is an
|
||||
// untrusted event.
|
||||
if ((eventIsTrusted || listenerData->mWantsUntrusted) &&
|
||||
!listeners.append(OBJECT_TO_JSVAL(listenerData->mListener))) {
|
||||
!listeners.append(listenerData->mListener)) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return false;
|
||||
}
|
||||
@ -364,7 +365,7 @@ EventListenerManager::DispatchEvent(JSContext* aCx, const EventTarget& aTarget,
|
||||
// out of memory or the operation callback has indicated that we should
|
||||
// stop running.
|
||||
|
||||
jsval listenerVal = listeners[index];
|
||||
jsval listenerVal = OBJECT_TO_JSVAL(listeners[index]);
|
||||
|
||||
JSObject* listenerObj;
|
||||
if (!JS_ValueToObject(aCx, listenerVal, &listenerObj)) {
|
||||
|
Loading…
Reference in New Issue
Block a user