mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
Issue #1742 - Part 4: Don't trigger read barriers when comparing wrapped pointers types
This is actually an undocumented dependency of Bug 1325406 for Linux and SunOS. Ref: BZ 1308236
This commit is contained in:
parent
30a3ec27a2
commit
e632fc1e8c
9 changed files with 343 additions and 27 deletions
|
|
@ -470,7 +470,7 @@ inline
|
|||
void XPCWrappedNativeTearOff::JSObjectMoved(JSObject* obj, const JSObject* old)
|
||||
{
|
||||
MOZ_ASSERT(!IsMarked());
|
||||
MOZ_ASSERT(mJSObject.unbarrieredGetPtr() == old);
|
||||
MOZ_ASSERT(mJSObject == old);
|
||||
mJSObject = obj;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ void
|
|||
XPCWrappedNative::FlatJSObjectMoved(JSObject* obj, const JSObject* old)
|
||||
{
|
||||
JS::AutoAssertGCCallback inCallback(obj);
|
||||
MOZ_ASSERT(mFlatJSObject.unbarrieredGetPtr() == old);
|
||||
MOZ_ASSERT(mFlatJSObject == old);
|
||||
|
||||
nsWrapperCache* cache = nullptr;
|
||||
CallQueryInterface(mIdentity, &cache);
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ XPCWrappedNativeProto::CallPostCreatePrototype()
|
|||
void
|
||||
XPCWrappedNativeProto::JSProtoObjectFinalized(js::FreeOp* fop, JSObject* obj)
|
||||
{
|
||||
MOZ_ASSERT(obj == mJSProtoObject.unbarrieredGet(), "huh?");
|
||||
MOZ_ASSERT(obj == mJSProtoObject, "huh?");
|
||||
|
||||
// Only remove this proto from the map if it is the one in the map.
|
||||
ClassInfo2WrappedNativeProtoMap* map = GetScope()->GetWrappedNativeProtoMap();
|
||||
|
|
@ -129,7 +129,7 @@ XPCWrappedNativeProto::JSProtoObjectFinalized(js::FreeOp* fop, JSObject* obj)
|
|||
void
|
||||
XPCWrappedNativeProto::JSProtoObjectMoved(JSObject* obj, const JSObject* old)
|
||||
{
|
||||
MOZ_ASSERT(mJSProtoObject.unbarrieredGet() == old);
|
||||
MOZ_ASSERT(mJSProtoObject == old);
|
||||
mJSProtoObject.init(obj); // Update without triggering barriers.
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue