mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 978042 - Part 1: AutoPushJSContext in nsEventListenerManager::CompileEventHandlerInternal. r=bholley
This commit is contained in:
parent
8f8a05d68e
commit
54871d21fd
@ -811,7 +811,7 @@ EventListenerManager::CompileEventHandlerInternal(Listener* aListener,
|
||||
NS_ENSURE_STATE(context);
|
||||
|
||||
// Push a context to make sure exceptions are reported in the right place.
|
||||
AutoPushJSContext cx(context->GetNativeContext());
|
||||
AutoPushJSContextForErrorReporting cx(context->GetNativeContext());
|
||||
JS::Rooted<JSObject*> handler(cx);
|
||||
|
||||
JS::Rooted<JSObject*> scope(cx, jsListener->GetEventScope());
|
||||
|
@ -174,6 +174,16 @@ public:
|
||||
operator JSContext*() { return mCx; }
|
||||
};
|
||||
|
||||
/**
|
||||
* AutoPushJSContextForErrorReporting has been defined for work being carried
|
||||
* out for bug 951991. It is to be used where an AutoPushJSContext is only
|
||||
* being used to make sure errors are reported using the error reporter for the
|
||||
* appropriate DOM Window and we don't want to replace it with AutoEntryScript.
|
||||
* This will make it easy to find these cases once the JSContext is no longer
|
||||
* required for error reporting.
|
||||
*/
|
||||
typedef AutoPushJSContext AutoPushJSContextForErrorReporting;
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* nsCxPusher_h */
|
||||
|
Loading…
Reference in New Issue
Block a user