mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1182369
- Remove js/Class.h include from nsWrapperCache.h. - r=bz
This commit is contained in:
parent
b36e8d0d79
commit
d1968b4589
@ -6,6 +6,7 @@
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
#include "js/Class.h"
|
||||
#include "js/Proxy.h"
|
||||
#include "mozilla/dom/DOMJSProxyHandler.h"
|
||||
#include "mozilla/HoldDropJSObjects.h"
|
||||
@ -15,6 +16,14 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#ifdef DEBUG
|
||||
/* static */ bool
|
||||
nsWrapperCache::HasJSObjectMovedOp(JSObject* aWrapper)
|
||||
{
|
||||
return js::HasObjectMovedOp(aWrapper);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* static */ void
|
||||
nsWrapperCache::HoldJSObjects(void* aScriptObjectHolder,
|
||||
nsScriptObjectTracer* aTracer)
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "js/Class.h"
|
||||
#include "js/Id.h" // must come before js/RootingAPI.h
|
||||
#include "js/Value.h" // must come before js/RootingAPI.h
|
||||
#include "js/RootingAPI.h"
|
||||
@ -66,6 +65,7 @@ class nsWindowRoot;
|
||||
* have to include some JS headers that don't play nicely with the rest of the
|
||||
* codebase. Include nsWrapperCacheInlines.h if you need to call those methods.
|
||||
*/
|
||||
|
||||
class nsWrapperCache
|
||||
{
|
||||
public:
|
||||
@ -103,11 +103,18 @@ public:
|
||||
return GetWrapperJSObject();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
private:
|
||||
static bool HasJSObjectMovedOp(JSObject* aWrapper);
|
||||
|
||||
public:
|
||||
#endif
|
||||
|
||||
void SetWrapper(JSObject* aWrapper)
|
||||
{
|
||||
MOZ_ASSERT(!PreservingWrapper(), "Clearing a preserved wrapper!");
|
||||
MOZ_ASSERT(aWrapper, "Use ClearWrapper!");
|
||||
MOZ_ASSERT(js::HasObjectMovedOp(aWrapper),
|
||||
MOZ_ASSERT(HasJSObjectMovedOp(aWrapper),
|
||||
"Object has not provided the hook to update the wrapper if it is moved");
|
||||
|
||||
SetWrapperJSObject(aWrapper);
|
||||
|
Loading…
Reference in New Issue
Block a user