Files
palemoon27/dom/base/nsWrapperCacheInlines.h
T
roytam1 df6f7b7065 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1212298 - Use inner script instead of outer script in CodeGenerator::visitCallDirectEval. r=shu (cee3f366a6)
- Bug 1233331 - CodeGenerator: Properly indent IonScript::New. r=jandem (6d110c45a3)
- Bug 1233331 - CodeGenerator: Prepare the invalidation of the recompileInfo as soon as the contraints are recorded. r=jandem (679d22dd8e)
- Bug 1238417 - Part 1: Fix wrong rebase for _SetCanonicalName call on RegExpToString. r=till (31ee926189)
- Bug 1238417 - Part 2: Fix argument count of RegExpMatcher and RegExpTester. r=till (9dc5dcadd5)
- Bug 1238417 - Part 4: Enable recover instruction for RegExpMatcher and RegExpTester. r=h4writer (5479b238ac)
- Bug 1238417 - Part 5: Add RegExpMatcher to MustCloneRegExp optimization. r=h4writer (554905fa3a)
- Bug 1238417 - Part 6: Make RegExpMatcher and RegExpTester movable. r=h4writer (72091090ee)
- Bug 1238417 - Part 7: Add comment for OutOfLineRegExpMatcher and OutOfLineRegExpTester. r=nbp (f5e4519728)
- Bug 1238630 - Fix unicode surrogate pair handling in RegExp. r=h4writer (d4c1e1d49d)
- Bug 1236600 - Properly pre-barrier sets to inline TypedObject Any-type Elements. (r=jandem) (1f23bb6d61)
- Bug 1149245 - Make DeserializedEdgeRange re-use its referents edge vector; r=vporof (ea861bfd43)
- Bug 1235631 - Odin: remove change-heap support (r=bbouvier) (940a0d58bc)
- Bug 1231224 part 11 - Add missing OOM checks in Module::setProfilingEnabled. r=luke (0d264fa46b)
- Bug 1234402 - Crash on OOM in AlternativeGenerationList constructor. r=bbouvier (baa7b3da17)
- Bug 1231224 part 12 - Use InfallibleVector in irregexp code to avoid MOZ_WARN_UNUSED_RESULT warnings. r=luke (72ac897dab)
- Bug 1231224 part 13 - Add OOM checks to Statistics::initialize. r=jonco (5033150018)
- Bug 1237508 - Odin: remove function index from Export (r=bbouvier) (d368ef7f85)
- Bug 1236541 - Odin: when enabling profiling, only patch actual callsites (r=bbouvie) (713dbcc45c)
- Bug 1235046 - Optimize JIT-code poisoning to be fast with W^X. r=bhackett (25972b36a9)
- Bug 1215479 - Turn on W^X JIT code by default. r=luke (82c4b94315)
- Bug 1235868 - Change nonWritableJITCode to ifdefs. r=jandem (4dee262ff4)
- Bug 1237508 - Add missing #include to fix non-unified builds (r=me) (327242e706)
- Bug 1236530 - Make ExecutableAllocator::reprotectRegion fallible and handle in asm.js (r=jandem) (9444127563)
- Bug 1229399: Make initialization of asm.js local variables closer to wasm; r=luke (732d40b42c)
- Bug 1229399: Store line/column info in the FuncIR rather than the bytecode stream; r=luke (483faefbdd)
- Bug 1235989 - Add a null check for filename in ModuleValidator::finish. r=luke (abc62aa437)
- Bug 1235041 - Cast value to uint64_t in order to prevent int overflow when value is greater than 2^12. r=jonco (ef754091ea)
- Bug 1182369 - Remove js/Class.h include from nsWrapperCache.h. - r=bz (cc7b3c856b)
- Bug 1231964 - Move CC participant code that touches JS out of mozglue. r=smaug (100fceeb2b)
- Bug 1120016 - Allocate short lived JS wrappers in the Nursery, r=mccr8,terrence (2a17a5484d)
- Bug 1235277 - Define MOZ_FALLTHROUGH_ASSERT to workaround -Wunreachable-code warnings about MOZ_FALLTHROUGH in debug builds. r=botond (262589e609)
- Bug 1247679, part 1 - Make ClearJSHolder publicly inherit from TraceCallbacks. r=smaug (1a3543fd31)
- Bug 1235598 - Part 1: Add better SpiderMonkey API support for tracing in C++; r=sfinxk (f23bf81919)
- Bug 1235598 - Part 2: Use TraceEdge exclusively in Gecko; r=smaug (a3ad4d0ef7)
2023-08-02 11:57:35 +08:00

57 lines
1.5 KiB
C

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef nsWrapperCacheInline_h___
#define nsWrapperCacheInline_h___
#include "nsWrapperCache.h"
#include "js/GCAPI.h"
#include "js/TracingAPI.h"
inline JSObject*
nsWrapperCache::GetWrapper() const
{
JSObject* obj = GetWrapperPreserveColor();
if (obj) {
JS::ExposeObjectToActiveJS(obj);
}
return obj;
}
inline bool
nsWrapperCache::IsBlack()
{
JSObject* o = GetWrapperPreserveColor();
return o && !JS::ObjectIsMarkedGray(o);
}
static void
SearchGray(JS::GCCellPtr aGCThing, const char* aName, void* aClosure)
{
bool* hasGrayObjects = static_cast<bool*>(aClosure);
if (!*hasGrayObjects && aGCThing && JS::GCThingIsMarkedGray(aGCThing)) {
*hasGrayObjects = true;
}
}
inline bool
nsWrapperCache::HasNothingToTrace(nsISupports* aThis)
{
nsXPCOMCycleCollectionParticipant* participant = nullptr;
CallQueryInterface(aThis, &participant);
bool hasGrayObjects = false;
participant->Trace(aThis, TraceCallbackFunc(SearchGray), &hasGrayObjects);
return !hasGrayObjects;
}
inline bool
nsWrapperCache::IsBlackAndDoesNotNeedTracing(nsISupports* aThis)
{
return IsBlack() && HasNothingToTrace(aThis);
}
#endif /* nsWrapperCache_h___ */