forked from mirrors/gecko-dev
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D18488 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e4e0ca67bd
commit
14486004b6
104 changed files with 429 additions and 417 deletions
|
|
@ -591,9 +591,8 @@ static gboolean setCaretOffsetCB(AtkText* aText, gint aOffset) {
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean scrollSubstringToCB(AtkText* aText,
|
||||
gint aStartOffset, gint aEndOffset,
|
||||
AtkScrollType aType) {
|
||||
static gboolean scrollSubstringToCB(AtkText* aText, gint aStartOffset,
|
||||
gint aEndOffset, AtkScrollType aType) {
|
||||
AtkObject* atkObject = ATK_OBJECT(aText);
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(atkObject);
|
||||
if (accWrap) {
|
||||
|
|
@ -615,9 +614,8 @@ static gboolean scrollSubstringToCB(AtkText* aText,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean scrollSubstringToPointCB(AtkText* aText,
|
||||
gint aStartOffset, gint aEndOffset,
|
||||
AtkCoordType aCoords,
|
||||
static gboolean scrollSubstringToPointCB(AtkText* aText, gint aStartOffset,
|
||||
gint aEndOffset, AtkCoordType aCoords,
|
||||
gint aX, gint aY) {
|
||||
AtkObject* atkObject = ATK_OBJECT(aText);
|
||||
AccessibleWrap* accWrap = GetAccessibleWrap(atkObject);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@
|
|||
|
||||
class nsToolkitShellService : public nsIToolkitShellService {
|
||||
public:
|
||||
NS_IMETHOD IsDefaultBrowser(bool aForAllTypes,
|
||||
bool* aIsDefaultBrowser) = 0;
|
||||
NS_IMETHOD IsDefaultBrowser(bool aForAllTypes, bool* aIsDefaultBrowser) = 0;
|
||||
|
||||
NS_IMETHODIMP IsDefaultApplication(bool* aIsDefaultBrowser) {
|
||||
// Only care about the http(s) protocol. This only matters on Windows.
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ using mozilla::IsWin8OrLater;
|
|||
using namespace mozilla;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsWindowsShellService, nsIToolkitShellService, nsIShellService)
|
||||
NS_IMPL_ISUPPORTS(nsWindowsShellService, nsIToolkitShellService,
|
||||
nsIShellService)
|
||||
|
||||
static nsresult OpenKeyForReading(HKEY aKeyRoot, const nsAString& aKeyName,
|
||||
HKEY* aKey) {
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ BrowsingContext* BrowsingContext::TopLevelBrowsingContext() {
|
|||
RefPtr<BrowsingContext> context;
|
||||
if (XRE_IsParentProcess()) {
|
||||
context = new CanonicalBrowsingContext(aParent, aOpener, aName, id,
|
||||
/* aProcessId */ 0, aType);
|
||||
/* aProcessId */ 0, aType);
|
||||
} else {
|
||||
context = new BrowsingContext(aParent, aOpener, aName, id, aType);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
StaticAutoPtr<nsTArray<RefPtr<BrowsingContextGroup>>> BrowsingContextGroup::sAllGroups;
|
||||
StaticAutoPtr<nsTArray<RefPtr<BrowsingContextGroup>>>
|
||||
BrowsingContextGroup::sAllGroups;
|
||||
|
||||
/* static */ void BrowsingContextGroup::Init() {
|
||||
if (!sAllGroups) {
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ extern mozilla::LazyLogModule gUserInteractionPRLog;
|
|||
MOZ_LOG(gUserInteractionPRLog, LogLevel::Debug, (msg, ##__VA_ARGS__))
|
||||
|
||||
CanonicalBrowsingContext::CanonicalBrowsingContext(BrowsingContext* aParent,
|
||||
BrowsingContext* aOpener,
|
||||
const nsAString& aName,
|
||||
uint64_t aBrowsingContextId,
|
||||
uint64_t aProcessId,
|
||||
BrowsingContext::Type aType)
|
||||
BrowsingContext* aOpener,
|
||||
const nsAString& aName,
|
||||
uint64_t aBrowsingContextId,
|
||||
uint64_t aProcessId,
|
||||
BrowsingContext::Type aType)
|
||||
: BrowsingContext(aParent, aOpener, aName, aBrowsingContextId, aType),
|
||||
mProcessId(aProcessId) {
|
||||
// You are only ever allowed to create CanonicalBrowsingContexts in the
|
||||
|
|
@ -129,7 +129,8 @@ void CanonicalBrowsingContext::NotifySetUserGestureActivationFromIPC(
|
|||
// in bug1519229.
|
||||
}
|
||||
|
||||
void CanonicalBrowsingContext::Traverse(nsCycleCollectionTraversalCallback& cb) {
|
||||
void CanonicalBrowsingContext::Traverse(
|
||||
nsCycleCollectionTraversalCallback& cb) {
|
||||
CanonicalBrowsingContext* tmp = this;
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindowGlobals);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ class CanonicalBrowsingContext final : public BrowsingContext {
|
|||
|
||||
using Type = BrowsingContext::Type;
|
||||
CanonicalBrowsingContext(BrowsingContext* aParent, BrowsingContext* aOpener,
|
||||
const nsAString& aName, uint64_t aBrowsingContextId,
|
||||
uint64_t aProcessId, Type aType = Type::Chrome);
|
||||
const nsAString& aName, uint64_t aBrowsingContextId,
|
||||
uint64_t aProcessId, Type aType = Type::Chrome);
|
||||
|
||||
private:
|
||||
friend class BrowsingContext;
|
||||
|
|
|
|||
|
|
@ -405,7 +405,8 @@ NS_IMPL_ISUPPORTS_INHERITED(IdleDispatchRunnable, IdleRunnable,
|
|||
|
||||
JS::RootedObject global(cx);
|
||||
JS::RootedObject exports(cx);
|
||||
nsresult rv = moduleloader->Import(cx, registryLocation, &global, &exports, ignoreExports);
|
||||
nsresult rv = moduleloader->Import(cx, registryLocation, &global, &exports,
|
||||
ignoreExports);
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
StructuredCloneBlob::StructuredCloneBlob() {
|
||||
mHolder.emplace(Holder::CloningSupported,
|
||||
Holder::TransferringNotSupported,
|
||||
mHolder.emplace(Holder::CloningSupported, Holder::TransferringNotSupported,
|
||||
Holder::StructuredCloneScope::DifferentProcess);
|
||||
}
|
||||
|
||||
|
|
@ -177,9 +176,9 @@ bool StructuredCloneBlob::WriteStructuredClone(JSContext* aCx,
|
|||
return mHolder->WriteStructuredClone(aCx, aWriter, aHolder);
|
||||
}
|
||||
|
||||
bool StructuredCloneBlob::Holder::WriteStructuredClone(JSContext* aCx,
|
||||
JSStructuredCloneWriter* aWriter,
|
||||
StructuredCloneHolder* aHolder) {
|
||||
bool StructuredCloneBlob::Holder::WriteStructuredClone(
|
||||
JSContext* aCx, JSStructuredCloneWriter* aWriter,
|
||||
StructuredCloneHolder* aHolder) {
|
||||
auto& data = mBuffer->data();
|
||||
if (!JS_WriteUint32Pair(aWriter, SCTAG_DOM_STRUCTURED_CLONE_HOLDER, 0) ||
|
||||
!JS_WriteUint32Pair(aWriter, data.Size(), JS_STRUCTURED_CLONE_VERSION) ||
|
||||
|
|
@ -210,8 +209,7 @@ StructuredCloneBlob::CollectReports(nsIHandleReportCallback* aHandleReport,
|
|||
}
|
||||
|
||||
MOZ_COLLECT_REPORT("explicit/dom/structured-clone-holder", KIND_HEAP,
|
||||
UNITS_BYTES,
|
||||
size,
|
||||
UNITS_BYTES, size,
|
||||
"Memory used by StructuredCloneHolder DOM objects.");
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class StructuredCloneBlob final : public nsIMemoryReporter {
|
|||
explicit StructuredCloneBlob();
|
||||
|
||||
class Holder : public StructuredCloneHolder {
|
||||
public:
|
||||
public:
|
||||
using StructuredCloneHolder::StructuredCloneHolder;
|
||||
|
||||
bool ReadStructuredCloneInternal(JSContext* aCx,
|
||||
|
|
|
|||
|
|
@ -927,7 +927,7 @@ void TimeoutManager::RunTimeout(const TimeStamp& aNow,
|
|||
aProcessIdle ? "Deferred " : "",
|
||||
timeout->mIsInterval ? "Interval" : "Timeout",
|
||||
int(elapsed.ToMilliseconds()), int(target.ToMilliseconds()),
|
||||
int(delta.ToMilliseconds()), int(runtime.ToMilliseconds()));
|
||||
int(delta.ToMilliseconds()), int(runtime.ToMilliseconds()));
|
||||
// don't have end before start...
|
||||
profiler_add_marker(
|
||||
"setTimeout", js::ProfilingStackFrame::Category::DOM,
|
||||
|
|
|
|||
|
|
@ -196,8 +196,7 @@ class nsJSUtils {
|
|||
MOZ_MUST_USE nsresult ExecScript(JS::MutableHandle<JS::Value> aRetValue);
|
||||
};
|
||||
|
||||
static bool BinASTEncodingEnabled()
|
||||
{
|
||||
static bool BinASTEncodingEnabled() {
|
||||
#ifdef JS_BUILD_BINAST
|
||||
return mozilla::StaticPrefs::dom_script_loader_binast_encoding_enabled();
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -3829,7 +3829,6 @@ nsresult EventStateManager::SetCursor(StyleCursorKind aCursor,
|
|||
uint32_t hotspotX = 0;
|
||||
uint32_t hotspotY = 0;
|
||||
if (aContainer) {
|
||||
|
||||
// css3-ui says to use the CSS-specified hotspot if present,
|
||||
// otherwise use the intrinsic hotspot, otherwise use the top left
|
||||
// corner.
|
||||
|
|
|
|||
|
|
@ -5764,7 +5764,8 @@ void ContentParent::UnregisterRemoveWorkerActor() {
|
|||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvWindowClose(
|
||||
const BrowsingContextId& aContextId, const bool& aTrustedCaller) {
|
||||
RefPtr<CanonicalBrowsingContext> bc = CanonicalBrowsingContext::Get(aContextId);
|
||||
RefPtr<CanonicalBrowsingContext> bc =
|
||||
CanonicalBrowsingContext::Get(aContextId);
|
||||
if (!bc) {
|
||||
MOZ_LOG(BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Trying to send a message to dead or detached context "
|
||||
|
|
@ -5786,7 +5787,8 @@ mozilla::ipc::IPCResult ContentParent::RecvWindowClose(
|
|||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvWindowFocus(
|
||||
const BrowsingContextId& aContextId) {
|
||||
RefPtr<CanonicalBrowsingContext> bc = CanonicalBrowsingContext::Get(aContextId);
|
||||
RefPtr<CanonicalBrowsingContext> bc =
|
||||
CanonicalBrowsingContext::Get(aContextId);
|
||||
if (!bc) {
|
||||
MOZ_LOG(BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Trying to send a message to dead or detached context "
|
||||
|
|
@ -5804,7 +5806,8 @@ mozilla::ipc::IPCResult ContentParent::RecvWindowFocus(
|
|||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvWindowBlur(
|
||||
const BrowsingContextId& aContextId) {
|
||||
RefPtr<CanonicalBrowsingContext> bc = CanonicalBrowsingContext::Get(aContextId);
|
||||
RefPtr<CanonicalBrowsingContext> bc =
|
||||
CanonicalBrowsingContext::Get(aContextId);
|
||||
if (!bc) {
|
||||
MOZ_LOG(BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Trying to send a message to dead or detached context "
|
||||
|
|
@ -5823,7 +5826,8 @@ mozilla::ipc::IPCResult ContentParent::RecvWindowBlur(
|
|||
mozilla::ipc::IPCResult ContentParent::RecvWindowPostMessage(
|
||||
const BrowsingContextId& aContextId, const ClonedMessageData& aMessage,
|
||||
const PostMessageData& aData) {
|
||||
RefPtr<CanonicalBrowsingContext> bc = CanonicalBrowsingContext::Get(aContextId);
|
||||
RefPtr<CanonicalBrowsingContext> bc =
|
||||
CanonicalBrowsingContext::Get(aContextId);
|
||||
if (!bc) {
|
||||
MOZ_LOG(BrowsingContext::GetLog(), LogLevel::Debug,
|
||||
("ParentIPC: Trying to send a message to dead or detached context "
|
||||
|
|
|
|||
|
|
@ -241,9 +241,8 @@ mozilla::ipc::IPCResult FilePickerParent::RecvOpen(
|
|||
const nsString& aDefaultFile, const nsString& aDefaultExtension,
|
||||
InfallibleTArray<nsString>&& aFilters,
|
||||
InfallibleTArray<nsString>&& aFilterNames,
|
||||
InfallibleTArray<nsString>&& aRawFilters,
|
||||
const nsString& aDisplayDirectory, const nsString& aDisplaySpecialDirectory,
|
||||
const nsString& aOkButtonLabel) {
|
||||
InfallibleTArray<nsString>&& aRawFilters, const nsString& aDisplayDirectory,
|
||||
const nsString& aDisplaySpecialDirectory, const nsString& aOkButtonLabel) {
|
||||
if (!CreateFilePicker()) {
|
||||
Unused << Send__delete__(this, void_t(), nsIFilePicker::returnCancel);
|
||||
return IPC_OK();
|
||||
|
|
|
|||
|
|
@ -259,15 +259,12 @@ class TabParent final : public PBrowserParent,
|
|||
const nsString& aAction, nsTArray<nsCString>&& aEnabledCommands,
|
||||
nsTArray<nsCString>&& aDisabledCommands) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvSetCursor(const nsCursor& aValue,
|
||||
const bool& aHasCustomCursor,
|
||||
const nsCString& aUri,
|
||||
const uint32_t& aWidth, const uint32_t& aHeight,
|
||||
const uint32_t& aStride,
|
||||
const gfx::SurfaceFormat& aFormat,
|
||||
const uint32_t& aHotspotX,
|
||||
const uint32_t& aHotspotY,
|
||||
const bool& aForce) override;
|
||||
virtual mozilla::ipc::IPCResult RecvSetCursor(
|
||||
const nsCursor& aValue, const bool& aHasCustomCursor,
|
||||
const nsCString& aUri, const uint32_t& aWidth, const uint32_t& aHeight,
|
||||
const uint32_t& aStride, const gfx::SurfaceFormat& aFormat,
|
||||
const uint32_t& aHotspotX, const uint32_t& aHotspotY,
|
||||
const bool& aForce) override;
|
||||
|
||||
virtual mozilla::ipc::IPCResult RecvSetStatus(
|
||||
const uint32_t& aType, const nsString& aStatus) override;
|
||||
|
|
|
|||
|
|
@ -255,10 +255,10 @@ class ScriptLoadRequest
|
|||
// mNonAsyncExternalScriptInsertedRequests
|
||||
bool mIsXSLT; // True if we live in mXSLTRequests.
|
||||
bool mIsCanceled; // True if we have been explicitly canceled.
|
||||
bool mWasCompiledOMT; // True if the script has been compiled off main
|
||||
// thread.
|
||||
bool mIsTracking; // True if the script comes from a source on our
|
||||
// tracking protection list.
|
||||
bool mWasCompiledOMT; // True if the script has been compiled off main
|
||||
// thread.
|
||||
bool mIsTracking; // True if the script comes from a source on our
|
||||
// tracking protection list.
|
||||
|
||||
RefPtr<ScriptFetchOptions> mFetchOptions;
|
||||
|
||||
|
|
|
|||
|
|
@ -1307,7 +1307,8 @@ nsresult ScriptLoader::StartLoad(ScriptLoadRequest* aRequest) {
|
|||
if (httpChannel) {
|
||||
// HTTP content negotation has little value in this context.
|
||||
nsAutoCString acceptTypes("*/*");
|
||||
if (nsJSUtils::BinASTEncodingEnabled() && aRequest->ShouldAcceptBinASTEncoding()) {
|
||||
if (nsJSUtils::BinASTEncodingEnabled() &&
|
||||
aRequest->ShouldAcceptBinASTEncoding()) {
|
||||
acceptTypes = APPLICATION_JAVASCRIPT_BINAST ", */*";
|
||||
}
|
||||
rv = httpChannel->SetRequestHeader(NS_LITERAL_CSTRING("Accept"),
|
||||
|
|
|
|||
|
|
@ -64,10 +64,10 @@ class SMILMilestone {
|
|||
return !(*this < aOther);
|
||||
}
|
||||
|
||||
SMILTime mTime; // The milestone time. This may be in container time or
|
||||
// parent container time depending on where it is used.
|
||||
bool mIsEnd; // true if this milestone corresponds to an interval
|
||||
// end, false otherwise.
|
||||
SMILTime mTime; // The milestone time. This may be in container time or
|
||||
// parent container time depending on where it is used.
|
||||
bool mIsEnd; // true if this milestone corresponds to an interval
|
||||
// end, false otherwise.
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
|||
|
|
@ -318,11 +318,7 @@ class DrawTargetD2D1 : public DrawTarget {
|
|||
bool EnsureLuminanceEffect();
|
||||
RefPtr<ID2D1Effect> mLuminanceEffect;
|
||||
|
||||
enum class InitState {
|
||||
Uninitialized,
|
||||
Success,
|
||||
Failure
|
||||
};
|
||||
enum class InitState { Uninitialized, Success, Failure };
|
||||
InitState mInitState;
|
||||
RefPtr<IDXGISurface> mSurface;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,17 +19,23 @@
|
|||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
class SourceSurfaceOffset: public SourceSurface {
|
||||
public:
|
||||
SourceSurfaceOffset(RefPtr<SourceSurface> aSurface, IntPoint aOffset) :
|
||||
mSurface(aSurface),
|
||||
mOffset(aOffset) {}
|
||||
class SourceSurfaceOffset : public SourceSurface {
|
||||
public:
|
||||
SourceSurfaceOffset(RefPtr<SourceSurface> aSurface, IntPoint aOffset)
|
||||
: mSurface(aSurface), mOffset(aOffset) {}
|
||||
virtual SurfaceType GetType() const override { return SurfaceType::OFFSET; }
|
||||
virtual IntSize GetSize() const override { return mSurface->GetSize(); }
|
||||
virtual IntRect GetRect() const override { return IntRect(mOffset, mSurface->GetSize()); }
|
||||
virtual SurfaceFormat GetFormat() const override { return mSurface->GetFormat(); }
|
||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override { return mSurface->GetDataSurface(); }
|
||||
private:
|
||||
virtual IntRect GetRect() const override {
|
||||
return IntRect(mOffset, mSurface->GetSize());
|
||||
}
|
||||
virtual SurfaceFormat GetFormat() const override {
|
||||
return mSurface->GetFormat();
|
||||
}
|
||||
virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
|
||||
return mSurface->GetDataSurface();
|
||||
}
|
||||
|
||||
private:
|
||||
RefPtr<SourceSurface> mSurface;
|
||||
IntPoint mOffset;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class FilterNodeSoftware;
|
|||
*/
|
||||
class FilterInvalidationListener {
|
||||
public:
|
||||
virtual void FilterInvalidated(FilterNodeSoftware* aFilter) = 0;
|
||||
virtual void FilterInvalidated(FilterNodeSoftware *aFilter) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -46,23 +46,23 @@ class FilterNodeSoftware : public FilterNode,
|
|||
static already_AddRefed<FilterNode> Create(FilterType aType);
|
||||
|
||||
// Draw the filter, intended to be called by DrawTarget*::DrawFilter.
|
||||
void Draw(DrawTarget* aDrawTarget, const Rect& aSourceRect,
|
||||
const Point& aDestPoint, const DrawOptions& aOptions);
|
||||
void Draw(DrawTarget *aDrawTarget, const Rect &aSourceRect,
|
||||
const Point &aDestPoint, const DrawOptions &aOptions);
|
||||
|
||||
virtual FilterBackend GetBackendType() override {
|
||||
return FILTER_BACKEND_SOFTWARE;
|
||||
}
|
||||
virtual void SetInput(uint32_t aIndex, SourceSurface* aSurface) override;
|
||||
virtual void SetInput(uint32_t aIndex, FilterNode* aFilter) override;
|
||||
virtual void SetInput(uint32_t aIndex, SourceSurface *aSurface) override;
|
||||
virtual void SetInput(uint32_t aIndex, FilterNode *aFilter) override;
|
||||
|
||||
virtual const char* GetName() { return "Unknown"; }
|
||||
virtual const char *GetName() { return "Unknown"; }
|
||||
|
||||
virtual void AddInvalidationListener(FilterInvalidationListener* aListener);
|
||||
virtual void AddInvalidationListener(FilterInvalidationListener *aListener);
|
||||
virtual void RemoveInvalidationListener(
|
||||
FilterInvalidationListener* aListener);
|
||||
FilterInvalidationListener *aListener);
|
||||
|
||||
// FilterInvalidationListener implementation
|
||||
virtual void FilterInvalidated(FilterNodeSoftware* aFilter) override;
|
||||
virtual void FilterInvalidated(FilterNodeSoftware *aFilter) override;
|
||||
|
||||
protected:
|
||||
// The following methods are intended to be overriden by subclasses.
|
||||
|
|
@ -82,7 +82,7 @@ class FilterNodeSoftware : public FilterNode,
|
|||
* This method returns the intersection of the filter's output rect with
|
||||
* aInRect. Filters with unconstrained output always return aInRect.
|
||||
*/
|
||||
virtual IntRect GetOutputRectInRect(const IntRect& aInRect) = 0;
|
||||
virtual IntRect GetOutputRectInRect(const IntRect &aInRect) = 0;
|
||||
|
||||
/**
|
||||
* Return a surface with the rendered output which is of size aRect.Size().
|
||||
|
|
@ -93,21 +93,21 @@ class FilterNodeSoftware : public FilterNode,
|
|||
* pass through input surfaces unchanged.
|
||||
* Callers need to treat the returned surface as immutable.
|
||||
*/
|
||||
virtual already_AddRefed<DataSourceSurface> Render(const IntRect& aRect) = 0;
|
||||
virtual already_AddRefed<DataSourceSurface> Render(const IntRect &aRect) = 0;
|
||||
|
||||
/**
|
||||
* Call RequestRect (see below) on any input filters with the desired input
|
||||
* rect, so that the input filter knows what to cache the next time it
|
||||
* renders.
|
||||
*/
|
||||
virtual void RequestFromInputsForRect(const IntRect& aRect) {}
|
||||
virtual void RequestFromInputsForRect(const IntRect &aRect) {}
|
||||
|
||||
/**
|
||||
* This method provides a caching default implementation but can be overriden
|
||||
* by subclasses that don't want to cache their output. Those classes should
|
||||
* call Render(aRect) directly from here.
|
||||
*/
|
||||
virtual already_AddRefed<DataSourceSurface> GetOutput(const IntRect& aRect);
|
||||
virtual already_AddRefed<DataSourceSurface> GetOutput(const IntRect &aRect);
|
||||
|
||||
// The following methods are non-virtual helper methods.
|
||||
|
||||
|
|
@ -140,10 +140,10 @@ class FilterNodeSoftware : public FilterNode,
|
|||
* Each pixel row of the returned surface is guaranteed to be 16-byte aligned.
|
||||
*/
|
||||
already_AddRefed<DataSourceSurface> GetInputDataSourceSurface(
|
||||
uint32_t aInputEnumIndex, const IntRect& aRect,
|
||||
uint32_t aInputEnumIndex, const IntRect &aRect,
|
||||
FormatHint aFormatHint = CAN_HANDLE_A8,
|
||||
ConvolveMatrixEdgeMode aEdgeMode = EDGE_MODE_NONE,
|
||||
const IntRect* aTransparencyPaddedSourceRect = nullptr);
|
||||
const IntRect *aTransparencyPaddedSourceRect = nullptr);
|
||||
|
||||
/**
|
||||
* Returns the intersection of the input filter's or surface's output rect
|
||||
|
|
@ -180,15 +180,15 @@ class FilterNodeSoftware : public FilterNode,
|
|||
* GetOutput call. Expected to call RequestRect on this filter's input
|
||||
* filters.
|
||||
*/
|
||||
void RequestRect(const IntRect& aRect);
|
||||
void RequestRect(const IntRect &aRect);
|
||||
|
||||
/**
|
||||
* Set input filter and clear input surface for this input index, or set
|
||||
* input surface and clear input filter. One of aSurface and aFilter should
|
||||
* be null.
|
||||
*/
|
||||
void SetInput(uint32_t aIndex, SourceSurface* aSurface,
|
||||
FilterNodeSoftware* aFilter);
|
||||
void SetInput(uint32_t aIndex, SourceSurface *aSurface,
|
||||
FilterNodeSoftware *aFilter);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
@ -204,7 +204,7 @@ class FilterNodeSoftware : public FilterNode,
|
|||
* unsubscribe themselves from us when they let go of their reference to us.
|
||||
* This ensures that the pointers in this array are never stale.
|
||||
*/
|
||||
std::vector<FilterInvalidationListener*> mInvalidationListeners;
|
||||
std::vector<FilterInvalidationListener *> mInvalidationListeners;
|
||||
|
||||
/**
|
||||
* Lock guarding mRequestedRect, mCachedRect, and mCachedOutput. All uses
|
||||
|
|
@ -391,9 +391,9 @@ class FilterNodeTableTransferSoftware
|
|||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeTableTransferSoftware,
|
||||
override)
|
||||
virtual const char* GetName() override { return "TableTransfer"; }
|
||||
virtual const char *GetName() override { return "TableTransfer"; }
|
||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||
virtual void SetAttribute(uint32_t aIndex, const Float* aFloat,
|
||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||
uint32_t aSize) override;
|
||||
|
||||
protected:
|
||||
|
|
@ -401,7 +401,7 @@ class FilterNodeTableTransferSoftware
|
|||
uint8_t aTable[256]) override;
|
||||
|
||||
private:
|
||||
void FillLookupTableImpl(std::vector<Float>& aTableValues,
|
||||
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
||||
uint8_t aTable[256]);
|
||||
|
||||
std::vector<Float> mTableR;
|
||||
|
|
@ -415,9 +415,9 @@ class FilterNodeDiscreteTransferSoftware
|
|||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeDiscreteTransferSoftware,
|
||||
override)
|
||||
virtual const char* GetName() override { return "DiscreteTransfer"; }
|
||||
virtual const char *GetName() override { return "DiscreteTransfer"; }
|
||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||
virtual void SetAttribute(uint32_t aIndex, const Float* aFloat,
|
||||
virtual void SetAttribute(uint32_t aIndex, const Float *aFloat,
|
||||
uint32_t aSize) override;
|
||||
|
||||
protected:
|
||||
|
|
@ -425,7 +425,7 @@ class FilterNodeDiscreteTransferSoftware
|
|||
uint8_t aTable[256]) override;
|
||||
|
||||
private:
|
||||
void FillLookupTableImpl(std::vector<Float>& aTableValues,
|
||||
void FillLookupTableImpl(std::vector<Float> &aTableValues,
|
||||
uint8_t aTable[256]);
|
||||
|
||||
std::vector<Float> mTableR;
|
||||
|
|
@ -440,7 +440,7 @@ class FilterNodeLinearTransferSoftware
|
|||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeLinearTransformSoftware,
|
||||
override)
|
||||
FilterNodeLinearTransferSoftware();
|
||||
virtual const char* GetName() override { return "LinearTransfer"; }
|
||||
virtual const char *GetName() override { return "LinearTransfer"; }
|
||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ class FilterNodeGammaTransferSoftware
|
|||
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeGammaTransferSoftware,
|
||||
override)
|
||||
FilterNodeGammaTransferSoftware();
|
||||
virtual const char* GetName() override { return "GammaTransfer"; }
|
||||
virtual const char *GetName() override { return "GammaTransfer"; }
|
||||
using FilterNodeComponentTransferSoftware::SetAttribute;
|
||||
virtual void SetAttribute(uint32_t aIndex, Float aValue) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,22 +13,19 @@
|
|||
#include "mozilla/layers/CompositorManagerParent.h"
|
||||
#include "mozilla/layers/LayerTreeOwnerTracker.h"
|
||||
|
||||
int
|
||||
FuzzingInitCompositorManagerParentIPC(int* argc, char*** argv)
|
||||
{
|
||||
int FuzzingInitCompositorManagerParentIPC(int* argc, char*** argv) {
|
||||
mozilla::ipc::ProtocolFuzzerHelper::CompositorBridgeParentSetup();
|
||||
mozilla::layers::LayerTreeOwnerTracker::Initialize();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
RunCompositorManagerParentIPCFuzzing(const uint8_t* data, size_t size)
|
||||
{
|
||||
static int RunCompositorManagerParentIPCFuzzing(const uint8_t* data,
|
||||
size_t size) {
|
||||
static mozilla::layers::CompositorManagerParent* p =
|
||||
mozilla::layers::CompositorManagerParent::CreateSameProcess().take();
|
||||
mozilla::layers::CompositorManagerParent::CreateSameProcess().take();
|
||||
|
||||
static nsTArray<nsCString> ignored = mozilla::ipc::LoadIPCMessageBlacklist(
|
||||
getenv("MOZ_IPC_MESSAGE_FUZZ_BLACKLIST"));
|
||||
getenv("MOZ_IPC_MESSAGE_FUZZ_BLACKLIST"));
|
||||
|
||||
mozilla::ipc::FuzzProtocol(p, data, size, ignored);
|
||||
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ struct DIGroup {
|
|||
// we need to catch bounds changes of containers so that we continue
|
||||
// to have the correct bounds rects in the recording
|
||||
if (DetectContainerLayerPropertiesBoundsChange(aItem, aData,
|
||||
*geometry)) {
|
||||
*geometry)) {
|
||||
nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
|
||||
geometry->ComputeInvalidationRegion());
|
||||
aData->mGeometry = std::move(geometry);
|
||||
|
|
|
|||
|
|
@ -427,10 +427,12 @@ VRSystemManagerExternal::VRSystemManagerExternal(
|
|||
VRExternalShmem* aAPIShmem /* = nullptr*/)
|
||||
: mExternalShmem(aAPIShmem)
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
#if defined(XP_WIN)
|
||||
, mMutex(NULL)
|
||||
#endif // defined(XP_WIN)
|
||||
, mSameProcess(aAPIShmem != nullptr)
|
||||
# if defined(XP_WIN)
|
||||
,
|
||||
mMutex(NULL)
|
||||
# endif // defined(XP_WIN)
|
||||
,
|
||||
mSameProcess(aAPIShmem != nullptr)
|
||||
#endif // !defined(MOZ_WIDGET_ANDROID)
|
||||
{
|
||||
#if defined(XP_MACOSX)
|
||||
|
|
@ -832,10 +834,10 @@ bool VRSystemManagerExternal::PullState(
|
|||
bool status = true;
|
||||
MOZ_ASSERT(mExternalShmem);
|
||||
|
||||
#if defined(XP_WIN)
|
||||
# if defined(XP_WIN)
|
||||
WaitForMutex lock(mMutex);
|
||||
status = lock.GetStatus();
|
||||
#endif // defined(XP_WIN)
|
||||
# endif // defined(XP_WIN)
|
||||
|
||||
if (mExternalShmem && status) {
|
||||
VRExternalShmem tmp;
|
||||
|
|
@ -866,7 +868,7 @@ bool VRSystemManagerExternal::PullState(
|
|||
|
||||
return success;
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
|
||||
void VRSystemManagerExternal::PushState(VRBrowserState* aBrowserState,
|
||||
bool aNotifyCond) {
|
||||
|
|
@ -885,19 +887,20 @@ void VRSystemManagerExternal::PushState(VRBrowserState* aBrowserState,
|
|||
}
|
||||
#else
|
||||
bool status = true;
|
||||
#if defined(XP_WIN)
|
||||
# if defined(XP_WIN)
|
||||
WaitForMutex lock(mMutex);
|
||||
status = lock.GetStatus();
|
||||
#endif // defined(XP_WIN)
|
||||
# endif // defined(XP_WIN)
|
||||
if (status) {
|
||||
mExternalShmem->geckoGenerationA++;
|
||||
memcpy((void*)&(mExternalShmem->geckoState), (void*)aBrowserState,
|
||||
sizeof(VRBrowserState));
|
||||
mExternalShmem->geckoGenerationB++; mExternalShmem->geckoGenerationA++;
|
||||
sizeof(VRBrowserState));
|
||||
mExternalShmem->geckoGenerationB++;
|
||||
mExternalShmem->geckoGenerationA++;
|
||||
memcpy((void*)&(mExternalShmem->geckoState), (void*)aBrowserState,
|
||||
sizeof(VRBrowserState));
|
||||
sizeof(VRBrowserState));
|
||||
mExternalShmem->geckoGenerationB++;
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,11 +52,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool GetStatus() {
|
||||
return mStatus;
|
||||
}
|
||||
bool GetStatus() { return mStatus; }
|
||||
|
||||
private:
|
||||
private:
|
||||
HANDLE mHandle;
|
||||
bool mStatus;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ void VRService::PushState(const mozilla::gfx::VRSystemState& aState) {
|
|||
memcpy((void*)&mAPIShmem->state, &aState, sizeof(VRSystemState));
|
||||
mAPIShmem->generationB++;
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
}
|
||||
|
||||
void VRService::PullState(mozilla::gfx::VRBrowserState& aState) {
|
||||
|
|
@ -513,7 +513,7 @@ void VRService::PullState(mozilla::gfx::VRBrowserState& aState) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
#endif // defined(MOZ_WIDGET_ANDROID)
|
||||
}
|
||||
|
||||
VRExternalShmem* VRService::GetAPIShmem() { return mAPIShmem; }
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include "base/logging.h"
|
||||
#include "mozilla/RandomNum.h"
|
||||
|
||||
|
||||
namespace base {
|
||||
|
||||
int RandInt(int min, int max) {
|
||||
|
|
|
|||
|
|
@ -147,9 +147,10 @@ void InputStreamHelper::SerializeInputStream(
|
|||
aDelayedStart, aManager);
|
||||
}
|
||||
|
||||
void InputStreamHelper::SerializeInputStreamAsPipe(
|
||||
nsIInputStream* aInputStream, InputStreamParams& aParams,
|
||||
bool aDelayedStart, nsIContentChild* aManager) {
|
||||
void InputStreamHelper::SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
|
||||
InputStreamParams& aParams,
|
||||
bool aDelayedStart,
|
||||
nsIContentChild* aManager) {
|
||||
SerializeInputStreamAsPipeInternal(aInputStream, aParams, aDelayedStart,
|
||||
aManager);
|
||||
}
|
||||
|
|
@ -162,9 +163,10 @@ void InputStreamHelper::SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
|
|||
aManager);
|
||||
}
|
||||
|
||||
void InputStreamHelper::SerializeInputStreamAsPipe(
|
||||
nsIInputStream* aInputStream, InputStreamParams& aParams,
|
||||
bool aDelayedStart, nsIContentParent* aManager) {
|
||||
void InputStreamHelper::SerializeInputStreamAsPipe(nsIInputStream* aInputStream,
|
||||
InputStreamParams& aParams,
|
||||
bool aDelayedStart,
|
||||
nsIContentParent* aManager) {
|
||||
SerializeInputStreamAsPipeInternal(aInputStream, aParams, aDelayedStart,
|
||||
aManager);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -246,6 +246,6 @@ class JS_PUBLIC_API ContextOptions {
|
|||
|
||||
JS_PUBLIC_API ContextOptions& ContextOptionsRef(JSContext* cx);
|
||||
|
||||
} // namespace JS
|
||||
} // namespace JS
|
||||
|
||||
#endif // js_ContextOptions_h
|
||||
#endif // js_ContextOptions_h
|
||||
|
|
|
|||
|
|
@ -698,7 +698,8 @@ static bool WasmGcEnabled(JSContext* cx, unsigned argc, Value* vp) {
|
|||
|
||||
static bool WasmDebugSupport(JSContext* cx, unsigned argc, Value* vp) {
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setBoolean(cx->options().wasmBaseline() && wasm::BaselineCanCompile());
|
||||
args.rval().setBoolean(cx->options().wasmBaseline() &&
|
||||
wasm::BaselineCanCompile());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,9 +81,7 @@ class MOZ_STACK_CLASS LexicalScopeEmitter {
|
|||
explicit LexicalScopeEmitter(BytecodeEmitter* bce);
|
||||
|
||||
// Returns the scope object for non-empty scope.
|
||||
const EmitterScope& emitterScope() const {
|
||||
return *emitterScope_;
|
||||
}
|
||||
const EmitterScope& emitterScope() const { return *emitterScope_; }
|
||||
|
||||
MOZ_MUST_USE bool emitScope(ScopeKind kind,
|
||||
JS::Handle<LexicalScope::Data*> bindings);
|
||||
|
|
|
|||
|
|
@ -7383,7 +7383,7 @@ MOZ_NEVER_INLINE GCRuntime::IncrementalResult GCRuntime::gcCycle(
|
|||
if (shouldCollectNurseryForSlice(nonincrementalByAPI, budget)) {
|
||||
minorGC(reason, gcstats::PhaseKind::EVICT_NURSERY_FOR_MAJOR_GC);
|
||||
} else {
|
||||
++number; // This otherwise happens in minorGC().
|
||||
++number; // This otherwise happens in minorGC().
|
||||
}
|
||||
|
||||
AutoGCSession session(rt, JS::HeapState::MajorCollecting);
|
||||
|
|
|
|||
|
|
@ -405,9 +405,7 @@ class GCRuntime {
|
|||
}
|
||||
|
||||
uint64_t majorGCCount() const { return majorGCNumber; }
|
||||
void incMajorGcNumber() {
|
||||
++majorGCNumber;
|
||||
}
|
||||
void incMajorGcNumber() { ++majorGCNumber; }
|
||||
|
||||
int64_t defaultSliceBudget() const { return defaultTimeBudget_; }
|
||||
|
||||
|
|
|
|||
|
|
@ -565,8 +565,8 @@ void GCRuntime::markBufferedGrayRoots(JS::Zone* zone) {
|
|||
auto addr = uintptr_t(cell);
|
||||
if (addr < ChunkSize || addr % CellAlignBytes != 0) {
|
||||
MOZ_CRASH_UNSAFE_PRINTF(
|
||||
"Bad GC thing pointer in gray root buffer: %p at address %p",
|
||||
cell, &iter.Get());
|
||||
"Bad GC thing pointer in gray root buffer: %p at address %p", cell,
|
||||
&iter.Get());
|
||||
}
|
||||
#else
|
||||
MOZ_ASSERT(IsCellPointerValid(cell));
|
||||
|
|
|
|||
|
|
@ -55,24 +55,23 @@ void StoreBuffer::GenericBuffer::trace(JSTracer* trc) {
|
|||
}
|
||||
|
||||
StoreBuffer::StoreBuffer(JSRuntime* rt, const Nursery& nursery)
|
||||
: bufferVal(this),
|
||||
bufferCell(this),
|
||||
bufferSlot(this),
|
||||
bufferWholeCell(this),
|
||||
bufferGeneric(this),
|
||||
cancelIonCompilations_(false),
|
||||
runtime_(rt),
|
||||
nursery_(nursery),
|
||||
aboutToOverflow_(false),
|
||||
enabled_(false)
|
||||
: bufferVal(this),
|
||||
bufferCell(this),
|
||||
bufferSlot(this),
|
||||
bufferWholeCell(this),
|
||||
bufferGeneric(this),
|
||||
cancelIonCompilations_(false),
|
||||
runtime_(rt),
|
||||
nursery_(nursery),
|
||||
aboutToOverflow_(false),
|
||||
enabled_(false)
|
||||
#ifdef DEBUG
|
||||
,
|
||||
mEntered(false)
|
||||
,
|
||||
mEntered(false)
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void StoreBuffer::checkEmpty() const {
|
||||
MOZ_ASSERT(bufferVal.isEmpty());
|
||||
MOZ_ASSERT(bufferCell.isEmpty());
|
||||
|
|
|
|||
|
|
@ -83,9 +83,7 @@ class StoreBuffer {
|
|||
/* Maximum number of entries before we request a minor GC. */
|
||||
const static size_t MaxEntries = 48 * 1024 / sizeof(T);
|
||||
|
||||
explicit MonoTypeBuffer(StoreBuffer* owner)
|
||||
: last_(T()), owner_(owner)
|
||||
{}
|
||||
explicit MonoTypeBuffer(StoreBuffer* owner) : last_(T()), owner_(owner) {}
|
||||
|
||||
void clear() {
|
||||
last_ = T();
|
||||
|
|
@ -143,8 +141,7 @@ class StoreBuffer {
|
|||
StoreBuffer* owner_;
|
||||
|
||||
explicit WholeCellBuffer(StoreBuffer* owner)
|
||||
: storage_(nullptr), head_(nullptr), owner_(owner)
|
||||
{}
|
||||
: storage_(nullptr), head_(nullptr), owner_(owner) {}
|
||||
|
||||
MOZ_MUST_USE bool init();
|
||||
|
||||
|
|
@ -179,7 +176,8 @@ class StoreBuffer {
|
|||
UniquePtr<LifoAlloc> storage_;
|
||||
StoreBuffer* owner_;
|
||||
|
||||
explicit GenericBuffer(StoreBuffer* owner) : storage_(nullptr), owner_(owner) {}
|
||||
explicit GenericBuffer(StoreBuffer* owner)
|
||||
: storage_(nullptr), owner_(owner) {}
|
||||
|
||||
MOZ_MUST_USE bool init();
|
||||
|
||||
|
|
|
|||
|
|
@ -782,9 +782,9 @@ bool js::gc::CheckWeakMapEntryMarking(const WeakMapBase* map, Cell* key,
|
|||
map->markColor == MarkColor::Black ? CellColor::Black : CellColor::Gray;
|
||||
if (object && GetCellColor(object) != mapColor) {
|
||||
fprintf(stderr, "WeakMap object is marked differently to the map\n");
|
||||
fprintf(stderr, "(map %p is %s, object %p is %s)\n",
|
||||
map, CellColorName(mapColor),
|
||||
object, CellColorName(GetCellColor(object)));
|
||||
fprintf(stderr, "(map %p is %s, object %p is %s)\n", map,
|
||||
CellColorName(mapColor), object,
|
||||
CellColorName(GetCellColor(object)));
|
||||
ok = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -376,9 +376,9 @@ class Zone : public JS::shadow::Zone,
|
|||
CompartmentVector& compartments() { return compartments_.ref(); }
|
||||
|
||||
// This zone's gray roots.
|
||||
using GrayRootVector = mozilla::SegmentedVector<js::gc::Cell*,
|
||||
1024 * sizeof(js::gc::Cell*),
|
||||
js::SystemAllocPolicy>;
|
||||
using GrayRootVector =
|
||||
mozilla::SegmentedVector<js::gc::Cell*, 1024 * sizeof(js::gc::Cell*),
|
||||
js::SystemAllocPolicy>;
|
||||
|
||||
private:
|
||||
js::ZoneOrGCTaskData<GrayRootVector> gcGrayRoots_;
|
||||
|
|
|
|||
|
|
@ -11676,10 +11676,10 @@ void CodeGenerator::visitOutOfLineSwitch(
|
|||
jumpTable->setOutOfLine();
|
||||
auto& labels = jumpTable->labels();
|
||||
#if defined(JS_CODEGEN_ARM64)
|
||||
AutoForbidPools afp(&masm, (labels.length() + 1) * (sizeof(void*) / vixl::kInstructionSize));
|
||||
AutoForbidPools afp(
|
||||
&masm, (labels.length() + 1) * (sizeof(void*) / vixl::kInstructionSize));
|
||||
#endif
|
||||
|
||||
|
||||
if (tableType == SwitchTableType::OutOfLine) {
|
||||
#if defined(JS_CODEGEN_ARM)
|
||||
MOZ_CRASH("NYI: SwitchTableType::OutOfLine");
|
||||
|
|
|
|||
|
|
@ -205,7 +205,8 @@ class GraphSpewer {
|
|||
};
|
||||
|
||||
static inline void SpewBeginFunction(MIRGenerator* mir, JSScript* function) {}
|
||||
static inline void SpewBeginWasmFunction(MIRGenerator* mir, unsigned funcIndex) {}
|
||||
static inline void SpewBeginWasmFunction(MIRGenerator* mir,
|
||||
unsigned funcIndex) {}
|
||||
|
||||
class AutoSpewEndFunction {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -101,16 +101,13 @@ void MacroAssembler::guardTypeSet(const Source& address, const TypeSet* types,
|
|||
MOZ_ASSERT(!types->unknown());
|
||||
|
||||
Label matched;
|
||||
TypeSet::Type tests[] = {TypeSet::Int32Type(),
|
||||
TypeSet::UndefinedType(),
|
||||
TypeSet::BooleanType(),
|
||||
TypeSet::StringType(),
|
||||
TypeSet::Type tests[] = {TypeSet::Int32Type(), TypeSet::UndefinedType(),
|
||||
TypeSet::BooleanType(), TypeSet::StringType(),
|
||||
TypeSet::SymbolType(),
|
||||
#ifdef ENABLE_BIGINT
|
||||
TypeSet::BigIntType(),
|
||||
#endif
|
||||
TypeSet::NullType(),
|
||||
TypeSet::MagicArgType(),
|
||||
TypeSet::NullType(), TypeSet::MagicArgType(),
|
||||
TypeSet::AnyObjectType()};
|
||||
|
||||
// The double type also implies Int32.
|
||||
|
|
|
|||
|
|
@ -1115,8 +1115,9 @@ VFPRegister VFPRegister::singleOverlay(unsigned int which) const {
|
|||
return VFPRegister(code_, Single);
|
||||
}
|
||||
|
||||
static_assert(FloatRegisters::TotalDouble <= 16,
|
||||
"We assume that every Double register also has an Integer personality");
|
||||
static_assert(
|
||||
FloatRegisters::TotalDouble <= 16,
|
||||
"We assume that every Double register also has an Integer personality");
|
||||
|
||||
VFPRegister VFPRegister::sintOverlay(unsigned int which) const {
|
||||
MOZ_ASSERT(!_isInvalid);
|
||||
|
|
|
|||
|
|
@ -812,7 +812,8 @@ class js::jit::OutOfLineTableSwitch
|
|||
void CodeGeneratorARM64::visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool) {
|
||||
MTableSwitch* mir = ool->mir();
|
||||
|
||||
AutoForbidPools afp(&masm, (mir->numCases() + 1) * (sizeof(void*) / vixl::kInstructionSize));
|
||||
AutoForbidPools afp(
|
||||
&masm, (mir->numCases() + 1) * (sizeof(void*) / vixl::kInstructionSize));
|
||||
masm.haltingAlign(sizeof(void*));
|
||||
masm.bind(ool->jumpLabel());
|
||||
masm.addCodeLabel(*ool->jumpLabel());
|
||||
|
|
|
|||
|
|
@ -209,8 +209,9 @@ class LUDiv : public LBinaryMath<1> {
|
|||
public:
|
||||
LIR_HEADER(UDiv);
|
||||
|
||||
LUDiv(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& remainder)
|
||||
: LBinaryMath(classOpcode) {
|
||||
LUDiv(const LAllocation& lhs, const LAllocation& rhs,
|
||||
const LDefinition& remainder)
|
||||
: LBinaryMath(classOpcode) {
|
||||
setOperand(0, lhs);
|
||||
setOperand(1, rhs);
|
||||
setTemp(0, remainder);
|
||||
|
|
|
|||
|
|
@ -1247,8 +1247,7 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI32(FloatRegister input,
|
|||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
&isOverflow);
|
||||
loadConstantFloat32(-two_31, fpscratch);
|
||||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
rejoin);
|
||||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch, rejoin);
|
||||
}
|
||||
bind(&isOverflow);
|
||||
wasmTrap(wasm::Trap::IntegerOverflow, off);
|
||||
|
|
@ -1308,8 +1307,7 @@ void MacroAssembler::oolWasmTruncateCheckF32ToI64(FloatRegister input,
|
|||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
&isOverflow);
|
||||
loadConstantFloat32(-two_63, fpscratch);
|
||||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
rejoin);
|
||||
branchFloat(Assembler::DoubleGreaterThanOrEqual, input, fpscratch, rejoin);
|
||||
}
|
||||
bind(&isOverflow);
|
||||
wasmTrap(wasm::Trap::IntegerOverflow, off);
|
||||
|
|
@ -1339,8 +1337,7 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
|
|||
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
&isOverflow);
|
||||
loadConstantDouble(-two_63, fpscratch);
|
||||
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch,
|
||||
rejoin);
|
||||
branchDouble(Assembler::DoubleGreaterThanOrEqual, input, fpscratch, rejoin);
|
||||
}
|
||||
bind(&isOverflow);
|
||||
wasmTrap(wasm::Trap::IntegerOverflow, off);
|
||||
|
|
|
|||
|
|
@ -871,8 +871,7 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
|
|||
Label positive;
|
||||
ScratchDoubleScope fpscratch(*this);
|
||||
loadConstantDouble(0.0, fpscratch);
|
||||
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch,
|
||||
&positive);
|
||||
branchDouble(Assembler::DoubleGreaterThan, input, fpscratch, &positive);
|
||||
move64(Imm64(0), output);
|
||||
jump(rejoin);
|
||||
|
||||
|
|
@ -919,8 +918,7 @@ void MacroAssembler::oolWasmTruncateCheckF64ToI64(FloatRegister input,
|
|||
// high that the highest resolution around is much more than 1.
|
||||
ScratchDoubleScope fpscratch(*this);
|
||||
loadConstantDouble(double(int64_t(INT64_MIN)), fpscratch);
|
||||
branchDouble(Assembler::DoubleNotEqual, input, fpscratch,
|
||||
&traps.intOverflow);
|
||||
branchDouble(Assembler::DoubleNotEqual, input, fpscratch, &traps.intOverflow);
|
||||
jump(rejoin);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@
|
|||
#include "js/Utility.h" // JS::FreePolicy
|
||||
#include "js/Value.h" // JS::NullValue, JS::ObjectValue, JS::Value
|
||||
#include "jsapi-tests/tests.h"
|
||||
#include "vm/Compression.h" // js::Compressor::CHUNK_SIZE
|
||||
#include "vm/Compression.h" // js::Compressor::CHUNK_SIZE
|
||||
#include "vm/HelperThreads.h" // js::RunPendingSourceCompressions
|
||||
#include "vm/JSFunction.h" // JSFunction::getOrCreateScript
|
||||
#include "vm/JSFunction.h" // JSFunction::getOrCreateScript
|
||||
#include "vm/JSScript.h" // JSScript, js::ScriptSource::MinimumCompressibleLength
|
||||
|
||||
using mozilla::ArrayLength;
|
||||
|
|
|
|||
|
|
@ -1761,7 +1761,8 @@ extern JS_PUBLIC_API bool JS_Enumerate(JSContext* cx, JS::HandleObject obj,
|
|||
* `src` object (which must not be null) to `target` (which also must not be
|
||||
* null).
|
||||
*/
|
||||
extern JS_PUBLIC_API bool JS_AssignObject(JSContext* cx, JS::HandleObject target,
|
||||
extern JS_PUBLIC_API bool JS_AssignObject(JSContext* cx,
|
||||
JS::HandleObject target,
|
||||
JS::HandleObject src);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -212,10 +212,10 @@ BigInt* BigInt::neg(JSContext* cx, HandleBigInt x) {
|
|||
}
|
||||
|
||||
#if !defined(JS_64BIT)
|
||||
#define HAVE_TWO_DIGIT 1
|
||||
# define HAVE_TWO_DIGIT 1
|
||||
using TwoDigit = uint64_t;
|
||||
#elif defined(HAVE_INT128_SUPPORT)
|
||||
#define HAVE_TWO_DIGIT 1
|
||||
# define HAVE_TWO_DIGIT 1
|
||||
using TwoDigit = __uint128_t;
|
||||
#endif
|
||||
|
||||
|
|
@ -563,11 +563,10 @@ BigInt* BigInt::absoluteSub(JSContext* cx, HandleBigInt x, HandleBigInt y,
|
|||
//
|
||||
// This function returns false if `quotient` is an empty handle, but allocating
|
||||
// the quotient failed. Otherwise it returns true, indicating success.
|
||||
bool BigInt::absoluteDivWithDigitDivisor(JSContext* cx, HandleBigInt x,
|
||||
Digit divisor,
|
||||
const Maybe<MutableHandleBigInt>& quotient,
|
||||
Digit* remainder,
|
||||
bool quotientNegative) {
|
||||
bool BigInt::absoluteDivWithDigitDivisor(
|
||||
JSContext* cx, HandleBigInt x, Digit divisor,
|
||||
const Maybe<MutableHandleBigInt>& quotient, Digit* remainder,
|
||||
bool quotientNegative) {
|
||||
MOZ_ASSERT(divisor);
|
||||
|
||||
MOZ_ASSERT(!x->isZero());
|
||||
|
|
@ -734,11 +733,10 @@ BigInt* BigInt::absoluteLeftShiftAlwaysCopy(JSContext* cx, HandleBigInt x,
|
|||
// interested in one of them. See Knuth, Volume 2, section 4.3.1, Algorithm D.
|
||||
// Also see the overview of the algorithm by Jan Marthedal Rasmussen over at
|
||||
// https://janmr.com/blog/2014/04/basic-multiple-precision-long-division/.
|
||||
bool BigInt::absoluteDivWithBigIntDivisor(JSContext* cx, HandleBigInt dividend,
|
||||
HandleBigInt divisor,
|
||||
const Maybe<MutableHandleBigInt>& quotient,
|
||||
const Maybe<MutableHandleBigInt>& remainder,
|
||||
bool isNegative) {
|
||||
bool BigInt::absoluteDivWithBigIntDivisor(
|
||||
JSContext* cx, HandleBigInt dividend, HandleBigInt divisor,
|
||||
const Maybe<MutableHandleBigInt>& quotient,
|
||||
const Maybe<MutableHandleBigInt>& remainder, bool isNegative) {
|
||||
MOZ_ASSERT(divisor->digitLength() >= 2);
|
||||
MOZ_ASSERT(dividend->digitLength() >= divisor->digitLength());
|
||||
|
||||
|
|
@ -1155,8 +1153,9 @@ JSLinearString* BigInt::toStringBasePowerOfTwo(JSContext* cx, HandleBigInt x,
|
|||
return NewStringCopyN<allowGC>(cx, resultChars.get(), charsRequired);
|
||||
}
|
||||
|
||||
template<AllowGC allowGC>
|
||||
JSLinearString* BigInt::toStringSingleDigitBaseTen(JSContext* cx, Digit digit, bool isNegative) {
|
||||
template <AllowGC allowGC>
|
||||
JSLinearString* BigInt::toStringSingleDigitBaseTen(JSContext* cx, Digit digit,
|
||||
bool isNegative) {
|
||||
if (digit <= Digit(INT32_MAX)) {
|
||||
int32_t val = AssertedCast<int32_t>(digit);
|
||||
return Int32ToString<allowGC>(cx, isNegative ? -val : val);
|
||||
|
|
@ -3066,7 +3065,8 @@ JSLinearString* BigInt::toString(JSContext* cx, HandleBigInt x, uint8_t radix) {
|
|||
}
|
||||
|
||||
if (radix == 10 && x->digitLength() == 1) {
|
||||
return toStringSingleDigitBaseTen<allowGC>(cx, x->digit(0), x->isNegative());
|
||||
return toStringSingleDigitBaseTen<allowGC>(cx, x->digit(0),
|
||||
x->isNegative());
|
||||
}
|
||||
|
||||
// Punt on doing generic toString without GC.
|
||||
|
|
@ -3077,8 +3077,12 @@ JSLinearString* BigInt::toString(JSContext* cx, HandleBigInt x, uint8_t radix) {
|
|||
return toStringGeneric(cx, x, radix);
|
||||
}
|
||||
|
||||
template JSLinearString* BigInt::toString<js::CanGC>(JSContext* cx, HandleBigInt x, uint8_t radix);
|
||||
template JSLinearString* BigInt::toString<js::NoGC>(JSContext* cx, HandleBigInt x, uint8_t radix);
|
||||
template JSLinearString* BigInt::toString<js::CanGC>(JSContext* cx,
|
||||
HandleBigInt x,
|
||||
uint8_t radix);
|
||||
template JSLinearString* BigInt::toString<js::NoGC>(JSContext* cx,
|
||||
HandleBigInt x,
|
||||
uint8_t radix);
|
||||
|
||||
template <typename CharT>
|
||||
static inline BigInt* ParseStringBigIntLiteral(JSContext* cx,
|
||||
|
|
|
|||
|
|
@ -2264,7 +2264,8 @@ void js::CancelOffThreadCompressions(JSRuntime* runtime) {
|
|||
runtime);
|
||||
}
|
||||
|
||||
void js::AttachFinishedCompressions(JSRuntime* runtime, AutoLockHelperThreadState& lock) {
|
||||
void js::AttachFinishedCompressions(JSRuntime* runtime,
|
||||
AutoLockHelperThreadState& lock) {
|
||||
auto& finished = HelperThreadState().compressionFinishedList(lock);
|
||||
for (size_t i = 0; i < finished.length(); i++) {
|
||||
if (finished[i]->runtimeMatches(runtime)) {
|
||||
|
|
|
|||
|
|
@ -1411,7 +1411,7 @@ bool BufferGetterImpl(JSContext* cx, const CallArgs& args) {
|
|||
// ES2019 draft rev fc9ecdcd74294d0ca3146d4b274e2a8e79565dc3
|
||||
// 22.2.3.32 get %TypedArray%.prototype [ @@toStringTag ]
|
||||
static bool TypedArray_toStringTagGetter(JSContext* cx, unsigned argc,
|
||||
Value* vp) {
|
||||
Value* vp) {
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
// Steps 1-2.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#define wasm_AsmJS_h
|
||||
|
||||
#include "mozilla/Attributes.h" // MOZ_MUST_USE
|
||||
#include "mozilla/Utf8.h" // mozilla::Utf8Unit
|
||||
#include "mozilla/Utf8.h" // mozilla::Utf8Unit
|
||||
|
||||
#include <stdint.h> // uint32_t
|
||||
|
||||
|
|
|
|||
|
|
@ -834,9 +834,15 @@ class AstMemOrTableCopy : public AstExpr {
|
|||
len_(len) {}
|
||||
|
||||
bool isMem() const { return isMem_; }
|
||||
AstRef& destTable() { MOZ_ASSERT(!isMem()); return destTable_; }
|
||||
AstRef& destTable() {
|
||||
MOZ_ASSERT(!isMem());
|
||||
return destTable_;
|
||||
}
|
||||
AstExpr& dest() const { return *dest_; }
|
||||
AstRef& srcTable() { MOZ_ASSERT(!isMem()); return srcTable_; }
|
||||
AstRef& srcTable() {
|
||||
MOZ_ASSERT(!isMem());
|
||||
return srcTable_;
|
||||
}
|
||||
AstExpr& src() const { return *src_; }
|
||||
AstExpr& len() const { return *len_; }
|
||||
};
|
||||
|
|
@ -892,8 +898,14 @@ class AstMemOrTableInit : public AstExpr {
|
|||
bool isMem() const { return isMem_; }
|
||||
uint32_t segIndex() const { return segIndex_; }
|
||||
AstRef& target() { return target_; }
|
||||
AstRef& targetTable() { MOZ_ASSERT(!isMem()); return target_; }
|
||||
AstRef& targetMemory() { MOZ_ASSERT(isMem()); return target_; }
|
||||
AstRef& targetTable() {
|
||||
MOZ_ASSERT(!isMem());
|
||||
return target_;
|
||||
}
|
||||
AstRef& targetMemory() {
|
||||
MOZ_ASSERT(isMem());
|
||||
return target_;
|
||||
}
|
||||
AstExpr& dst() const { return *dst_; }
|
||||
AstExpr& src() const { return *src_; }
|
||||
AstExpr& len() const { return *len_; }
|
||||
|
|
|
|||
|
|
@ -29,10 +29,11 @@ namespace wasm {
|
|||
bool BaselineCanCompile();
|
||||
|
||||
// Generate adequate code quickly.
|
||||
MOZ_MUST_USE bool BaselineCompileFunctions(
|
||||
const ModuleEnvironment& env, LifoAlloc& lifo,
|
||||
const FuncCompileInputVector& inputs, CompiledCode* code,
|
||||
UniqueChars* error);
|
||||
MOZ_MUST_USE bool BaselineCompileFunctions(const ModuleEnvironment& env,
|
||||
LifoAlloc& lifo,
|
||||
const FuncCompileInputVector& inputs,
|
||||
CompiledCode* code,
|
||||
UniqueChars* error);
|
||||
|
||||
class BaseLocalIter {
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -73,9 +73,8 @@ uint32_t wasm::ObservedCPUFeatures() {
|
|||
#endif
|
||||
}
|
||||
|
||||
SharedCompileArgs
|
||||
CompileArgs::build(JSContext* cx, ScriptedCaller&& scriptedCaller)
|
||||
{
|
||||
SharedCompileArgs CompileArgs::build(JSContext* cx,
|
||||
ScriptedCaller&& scriptedCaller) {
|
||||
bool baseline = BaselineCanCompile() && cx->options().wasmBaseline();
|
||||
bool ion = IonCanCompile() && cx->options().wasmIon();
|
||||
#ifdef ENABLE_WASM_CRANELIFT
|
||||
|
|
@ -96,8 +95,10 @@ CompileArgs::build(JSContext* cx, ScriptedCaller&& scriptedCaller)
|
|||
// is open.
|
||||
bool debug = cx->realm()->debuggerObservesAsmJS();
|
||||
|
||||
bool sharedMemory = cx->realm()->creationOptions().getSharedMemoryAndAtomicsEnabled();
|
||||
bool forceTiering = cx->options().testWasmAwaitTier2() || JitOptions.wasmDelayTier2;
|
||||
bool sharedMemory =
|
||||
cx->realm()->creationOptions().getSharedMemoryAndAtomicsEnabled();
|
||||
bool forceTiering =
|
||||
cx->options().testWasmAwaitTier2() || JitOptions.wasmDelayTier2;
|
||||
|
||||
if (debug || gc) {
|
||||
if (!baseline) {
|
||||
|
|
@ -479,7 +480,8 @@ void CompilerEnvironment::computeParameters(Decoder& d, bool gcFeatureOptIn) {
|
|||
tier_ = hasSecondTier ? Tier::Optimized : Tier::Baseline;
|
||||
}
|
||||
|
||||
optimizedBackend_ = craneliftEnabled ? OptimizedBackend::Cranelift : OptimizedBackend::Ion;
|
||||
optimizedBackend_ =
|
||||
craneliftEnabled ? OptimizedBackend::Cranelift : OptimizedBackend::Ion;
|
||||
|
||||
debug_ = debugEnabled ? DebugEnabled::True : DebugEnabled::False;
|
||||
gcTypes_ = gcEnabled;
|
||||
|
|
@ -582,8 +584,9 @@ void wasm::CompileTier2(const CompileArgs& args, const Bytes& bytecode,
|
|||
Decoder d(bytecode, 0, &error);
|
||||
|
||||
bool gcTypesConfigured = false; // No optimized backend support yet
|
||||
OptimizedBackend optimizedBackend =
|
||||
args.craneliftEnabled ? OptimizedBackend::Cranelift : OptimizedBackend::Ion;
|
||||
OptimizedBackend optimizedBackend = args.craneliftEnabled
|
||||
? OptimizedBackend::Cranelift
|
||||
: OptimizedBackend::Ion;
|
||||
|
||||
CompilerEnvironment compilerEnv(CompileMode::Tier2, Tier::Optimized,
|
||||
optimizedBackend, DebugEnabled::False,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ struct CompileArgs : ShareableBase<CompileArgs> {
|
|||
// You should use the first one in general, unless you have a very good
|
||||
// reason (i.e. no JSContext around and you know which flags have been used).
|
||||
|
||||
static SharedCompileArgs build(JSContext* cx, ScriptedCaller&& scriptedCaller);
|
||||
static SharedCompileArgs build(JSContext* cx,
|
||||
ScriptedCaller&& scriptedCaller);
|
||||
|
||||
explicit CompileArgs(ScriptedCaller&& scriptedCaller)
|
||||
: scriptedCaller(std::move(scriptedCaller)),
|
||||
|
|
|
|||
|
|
@ -279,9 +279,7 @@ const GlobalDesc* env_global(const CraneliftModuleEnvironment* env,
|
|||
bool wasm::CraneliftCompileFunctions(const ModuleEnvironment& env,
|
||||
LifoAlloc& lifo,
|
||||
const FuncCompileInputVector& inputs,
|
||||
CompiledCode* code,
|
||||
UniqueChars* error) {
|
||||
|
||||
CompiledCode* code, UniqueChars* error) {
|
||||
MOZ_RELEASE_ASSERT(CraneliftCanCompile());
|
||||
|
||||
MOZ_ASSERT(env.tier() == Tier::Optimized);
|
||||
|
|
|
|||
|
|
@ -4011,8 +4011,7 @@ static bool EmitBodyExprs(FunctionCompiler& f) {
|
|||
|
||||
bool wasm::IonCompileFunctions(const ModuleEnvironment& env, LifoAlloc& lifo,
|
||||
const FuncCompileInputVector& inputs,
|
||||
CompiledCode* code,
|
||||
UniqueChars* error) {
|
||||
CompiledCode* code, UniqueChars* error) {
|
||||
MOZ_ASSERT(env.tier() == Tier::Optimized);
|
||||
MOZ_ASSERT(env.optimizedBackend() == OptimizedBackend::Ion);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ bool IonCanCompile();
|
|||
MOZ_MUST_USE bool IonCompileFunctions(const ModuleEnvironment& env,
|
||||
LifoAlloc& lifo,
|
||||
const FuncCompileInputVector& inputs,
|
||||
CompiledCode* code,
|
||||
UniqueChars* error);
|
||||
CompiledCode* code, UniqueChars* error);
|
||||
|
||||
} // namespace wasm
|
||||
} // namespace js
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ bool wasm::HasOptimizedCompilerTier(JSContext* cx) {
|
|||
#ifdef ENABLE_WASM_CRANELIFT
|
||||
|| (cx->options().wasmCranelift() && CraneliftCanCompile())
|
||||
#endif
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
// Return whether wasm compilation is allowed by prefs. This check
|
||||
|
|
@ -417,7 +417,8 @@ bool wasm::Eval(JSContext* cx, Handle<TypedArrayObject*> code,
|
|||
return false;
|
||||
}
|
||||
|
||||
SharedCompileArgs compileArgs = CompileArgs::build(cx, std::move(scriptedCaller));
|
||||
SharedCompileArgs compileArgs =
|
||||
CompileArgs::build(cx, std::move(scriptedCaller));
|
||||
if (!compileArgs) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1913,7 +1913,8 @@ inline bool OpIter<Policy>::readMemOrTableCopy(bool isMem,
|
|||
}
|
||||
|
||||
template <typename Policy>
|
||||
inline bool OpIter<Policy>::readDataOrElemDrop(bool isData, uint32_t* segIndex) {
|
||||
inline bool OpIter<Policy>::readDataOrElemDrop(bool isData,
|
||||
uint32_t* segIndex) {
|
||||
MOZ_ASSERT(Classify(op_) == OpKind::DataOrElemDrop);
|
||||
|
||||
if (isData) {
|
||||
|
|
|
|||
|
|
@ -137,17 +137,15 @@ static void SetupABIArguments(MacroAssembler& masm, const FuncExport& fe,
|
|||
case MIRType::Double: {
|
||||
ScratchDoubleScope fpscratch(masm);
|
||||
masm.loadDouble(src, fpscratch);
|
||||
masm.storeDouble(
|
||||
fpscratch,
|
||||
Address(masm.getStackPointer(), iter->offsetFromArgBase()));
|
||||
masm.storeDouble(fpscratch, Address(masm.getStackPointer(),
|
||||
iter->offsetFromArgBase()));
|
||||
break;
|
||||
}
|
||||
case MIRType::Float32: {
|
||||
ScratchFloat32Scope fpscratch(masm);
|
||||
masm.loadFloat32(src, fpscratch);
|
||||
masm.storeFloat32(
|
||||
fpscratch,
|
||||
Address(masm.getStackPointer(), iter->offsetFromArgBase()));
|
||||
masm.storeFloat32(fpscratch, Address(masm.getStackPointer(),
|
||||
iter->offsetFromArgBase()));
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -3677,7 +3677,8 @@ static AstMemOrTableCopy* ParseMemOrTableCopy(WasmParseContext& c,
|
|||
memOrTableSource, src, len);
|
||||
}
|
||||
|
||||
static AstDataOrElemDrop* ParseDataOrElemDrop(WasmParseContext& c, bool isData) {
|
||||
static AstDataOrElemDrop* ParseDataOrElemDrop(WasmParseContext& c,
|
||||
bool isData) {
|
||||
WasmToken segIndexTok;
|
||||
if (!c.ts.getIf(WasmToken::Index, &segIndexTok)) {
|
||||
return nullptr;
|
||||
|
|
@ -5600,8 +5601,7 @@ static bool ResolveWake(Resolver& r, AstWake& s) {
|
|||
|
||||
#ifdef ENABLE_WASM_BULKMEM_OPS
|
||||
static bool ResolveMemOrTableCopy(Resolver& r, AstMemOrTableCopy& s) {
|
||||
return ResolveExpr(r, s.dest()) &&
|
||||
ResolveExpr(r, s.src()) &&
|
||||
return ResolveExpr(r, s.dest()) && ResolveExpr(r, s.src()) &&
|
||||
ResolveExpr(r, s.len()) &&
|
||||
(s.isMem() || r.resolveTable(s.destTable())) &&
|
||||
(s.isMem() || r.resolveTable(s.srcTable()));
|
||||
|
|
@ -6370,8 +6370,7 @@ static bool EncodeWake(Encoder& e, AstWake& s) {
|
|||
|
||||
#ifdef ENABLE_WASM_BULKMEM_OPS
|
||||
static bool EncodeMemOrTableCopy(Encoder& e, AstMemOrTableCopy& s) {
|
||||
return EncodeExpr(e, s.dest()) &&
|
||||
EncodeExpr(e, s.src()) &&
|
||||
return EncodeExpr(e, s.dest()) && EncodeExpr(e, s.src()) &&
|
||||
EncodeExpr(e, s.len()) &&
|
||||
e.writeOp(s.isMem() ? MiscOp::MemCopy : MiscOp::TableCopy) &&
|
||||
e.writeVarU32(s.isMem() ? 0 : s.srcTable().index()) &&
|
||||
|
|
@ -6384,19 +6383,16 @@ static bool EncodeDataOrElemDrop(Encoder& e, AstDataOrElemDrop& s) {
|
|||
}
|
||||
|
||||
static bool EncodeMemFill(Encoder& e, AstMemFill& s) {
|
||||
return EncodeExpr(e, s.start()) &&
|
||||
EncodeExpr(e, s.val()) &&
|
||||
EncodeExpr(e, s.len()) &&
|
||||
e.writeOp(MiscOp::MemFill) &&
|
||||
e.writeVarU32(/* memory index */0);
|
||||
return EncodeExpr(e, s.start()) && EncodeExpr(e, s.val()) &&
|
||||
EncodeExpr(e, s.len()) && e.writeOp(MiscOp::MemFill) &&
|
||||
e.writeVarU32(/* memory index */ 0);
|
||||
}
|
||||
|
||||
static bool EncodeMemOrTableInit(Encoder& e, AstMemOrTableInit& s) {
|
||||
return EncodeExpr(e, s.dst()) && EncodeExpr(e, s.src()) &&
|
||||
EncodeExpr(e, s.len()) &&
|
||||
e.writeOp(s.isMem() ? MiscOp::MemInit : MiscOp::TableInit) &&
|
||||
e.writeVarU32(s.segIndex()) &&
|
||||
e.writeVarU32(s.target().index());
|
||||
e.writeVarU32(s.segIndex()) && e.writeVarU32(s.target().index());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1416,7 +1416,8 @@ static bool DecodeStructType(Decoder& d, ModuleEnvironment* env,
|
|||
#ifdef ENABLE_WASM_REFTYPES
|
||||
static bool DecodeGCFeatureOptInSection(Decoder& d, ModuleEnvironment* env) {
|
||||
MaybeSectionRange range;
|
||||
if (!d.startSection(SectionId::GcFeatureOptIn, env, &range, "gcfeatureoptin")) {
|
||||
if (!d.startSection(SectionId::GcFeatureOptIn, env, &range,
|
||||
"gcfeatureoptin")) {
|
||||
return false;
|
||||
}
|
||||
if (!range) {
|
||||
|
|
|
|||
|
|
@ -105,7 +105,8 @@ void nsHTMLButtonControlFrame::BuildDisplayList(
|
|||
rect.Deflate(border);
|
||||
nscoord radii[8];
|
||||
bool hasRadii = GetPaddingBoxBorderRadii(radii);
|
||||
clipState.ClipContainingBlockDescendants(rect, hasRadii ? radii : nullptr);
|
||||
clipState.ClipContainingBlockDescendants(rect,
|
||||
hasRadii ? radii : nullptr);
|
||||
}
|
||||
|
||||
BuildDisplayListForChild(aBuilder, mFrames.FirstChild(), set,
|
||||
|
|
|
|||
|
|
@ -405,11 +405,11 @@ class nsTextFrame : public nsFrame {
|
|||
mozilla::SVGContextPaint* contextPaint = nullptr;
|
||||
DrawPathCallbacks* callbacks = nullptr;
|
||||
enum {
|
||||
PaintText, // Normal text painting.
|
||||
GenerateTextMask // To generate a mask from a text frame. Should
|
||||
// only paint text itself with opaque color.
|
||||
// Text shadow, text selection color and text
|
||||
// decoration are all discarded in this state.
|
||||
PaintText, // Normal text painting.
|
||||
GenerateTextMask // To generate a mask from a text frame. Should
|
||||
// only paint text itself with opaque color.
|
||||
// Text shadow, text selection color and text
|
||||
// decoration are all discarded in this state.
|
||||
};
|
||||
uint8_t state = PaintText;
|
||||
explicit PaintTextParams(gfxContext* aContext) : context(aContext) {}
|
||||
|
|
|
|||
|
|
@ -8555,7 +8555,7 @@ bool nsDisplayPerspective::CreateWebRenderCommands(
|
|||
Maybe<uint64_t> scrollingRelativeTo;
|
||||
for (auto* asr = GetActiveScrolledRoot(); asr; asr = asr->mParent) {
|
||||
if (nsLayoutUtils::IsAncestorFrameCrossDoc(
|
||||
asr->mScrollableFrame->GetScrolledFrame(), perspectiveFrame)) {
|
||||
asr->mScrollableFrame->GetScrolledFrame(), perspectiveFrame)) {
|
||||
scrollingRelativeTo.emplace(asr->GetViewId());
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ void nsFontFaceLoader::StartedLoading(nsIStreamLoader* aStreamLoader) {
|
|||
|
||||
MOZ_DIAGNOSTIC_ASSERT(!loader->mInLoadTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!loader->mInStreamComplete);
|
||||
AutoRestore<bool> scope { loader->mInLoadTimerCallback };
|
||||
AutoRestore<bool> scope{loader->mInLoadTimerCallback};
|
||||
loader->mInLoadTimerCallback = true;
|
||||
|
||||
if (!loader->mFontFaceSet) {
|
||||
|
|
@ -201,7 +201,7 @@ nsFontFaceLoader::OnStreamComplete(nsIStreamLoader* aLoader,
|
|||
MOZ_DIAGNOSTIC_ASSERT(!mInLoadTimerCallback);
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mInStreamComplete);
|
||||
|
||||
AutoRestore<bool> scope { mInStreamComplete };
|
||||
AutoRestore<bool> scope{mInStreamComplete};
|
||||
mInStreamComplete = true;
|
||||
|
||||
DropChannel();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
namespace mozilla {
|
||||
|
||||
// TODO(bug 1522632): This function should be moved to NSS
|
||||
static SECItem* ExportDEREncryptedPrivateKeyInfo(
|
||||
static SECItem *ExportDEREncryptedPrivateKeyInfo(
|
||||
PK11SlotInfo *slot, /* optional, encrypt key in this slot */
|
||||
SECOidTag algTag, /* encrypt key with this algorithm */
|
||||
const SECItem *pwitem, /* password for PBE encryption */
|
||||
|
|
@ -32,7 +32,7 @@ static SECItem* ExportDEREncryptedPrivateKeyInfo(
|
|||
void *wincx) /* context for password callback ? */
|
||||
{
|
||||
SECKEYEncryptedPrivateKeyInfo *pki = PK11_ExportEncryptedPrivKeyInfo(
|
||||
slot, algTag, const_cast<SECItem*>(pwitem), pk, iteration, wincx);
|
||||
slot, algTag, const_cast<SECItem *>(pwitem), pk, iteration, wincx);
|
||||
SECItem *derPKI;
|
||||
|
||||
if (!pki) {
|
||||
|
|
@ -337,8 +337,8 @@ nsresult DtlsIdentity::ComputeFingerprint(const UniqueCERTCertificate &cert,
|
|||
MOZ_ASSERT(ho->length >= 20); // Double check
|
||||
digest->value_.resize(ho->length);
|
||||
|
||||
SECStatus rv =
|
||||
HASH_HashBuf(ho->type, digest->value_.data(), cert->derCert.data, cert->derCert.len);
|
||||
SECStatus rv = HASH_HashBuf(ho->type, digest->value_.data(),
|
||||
cert->derCert.data, cert->derCert.len);
|
||||
if (rv != SECSuccess) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,18 +25,14 @@ namespace mozilla {
|
|||
class DtlsDigest {
|
||||
public:
|
||||
const static size_t kMaxDtlsDigestLength = HASH_LENGTH_MAX;
|
||||
explicit DtlsDigest(const std::string& algorithm)
|
||||
: algorithm_(algorithm) {}
|
||||
DtlsDigest(const std::string& algorithm,
|
||||
const std::vector<uint8_t>& value)
|
||||
explicit DtlsDigest(const std::string& algorithm) : algorithm_(algorithm) {}
|
||||
DtlsDigest(const std::string& algorithm, const std::vector<uint8_t>& value)
|
||||
: algorithm_(algorithm), value_(value) {
|
||||
MOZ_ASSERT(value.size() <= kMaxDtlsDigestLength);
|
||||
}
|
||||
~DtlsDigest() = default;
|
||||
|
||||
bool operator!=(const DtlsDigest& rhs) const {
|
||||
return !operator==(rhs);
|
||||
}
|
||||
bool operator!=(const DtlsDigest& rhs) const { return !operator==(rhs); }
|
||||
|
||||
bool operator==(const DtlsDigest& rhs) const {
|
||||
if (algorithm_ != rhs.algorithm_) {
|
||||
|
|
|
|||
|
|
@ -426,8 +426,7 @@ nsresult TransportLayerDtls::SetVerificationAllowAll() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult TransportLayerDtls::SetVerificationDigest(
|
||||
const DtlsDigest &digest) {
|
||||
nsresult TransportLayerDtls::SetVerificationDigest(const DtlsDigest &digest) {
|
||||
// Defensive programming
|
||||
if (verification_mode_ != VERIFY_UNSET &&
|
||||
verification_mode_ != VERIFY_DIGEST) {
|
||||
|
|
|
|||
|
|
@ -183,16 +183,13 @@ class LoopbackTransport : public MediaTransportHandler {
|
|||
// this up internally
|
||||
const nsTArray<NrIceStunAddr>& aStunAddrs) override {}
|
||||
|
||||
void ActivateTransport(const std::string& aTransportId,
|
||||
const std::string& aLocalUfrag,
|
||||
const std::string& aLocalPwd, size_t aComponentCount,
|
||||
const std::string& aUfrag,
|
||||
const std::string& aPassword,
|
||||
const nsTArray<uint8_t>& aKeyDer,
|
||||
const nsTArray<uint8_t>& aCertDer,
|
||||
SSLKEAType aAuthType, bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested) override {}
|
||||
void ActivateTransport(
|
||||
const std::string& aTransportId, const std::string& aLocalUfrag,
|
||||
const std::string& aLocalPwd, size_t aComponentCount,
|
||||
const std::string& aUfrag, const std::string& aPassword,
|
||||
const nsTArray<uint8_t>& aKeyDer, const nsTArray<uint8_t>& aCertDer,
|
||||
SSLKEAType aAuthType, bool aDtlsClient, const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested) override {}
|
||||
|
||||
void RemoveTransportsExcept(
|
||||
const std::set<std::string>& aTransportIds) override {}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ class MediaTransportHandlerSTS : public MediaTransportHandler,
|
|||
const std::string& aLocalPwd, size_t aComponentCount,
|
||||
const std::string& aUfrag, const std::string& aPassword,
|
||||
const nsTArray<uint8_t>& aKeyDer, const nsTArray<uint8_t>& aCertDer,
|
||||
SSLKEAType aAuthType, bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests, bool aPrivacyRequested) override;
|
||||
SSLKEAType aAuthType, bool aDtlsClient, const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested) override;
|
||||
|
||||
void RemoveTransportsExcept(
|
||||
const std::set<std::string>& aTransportIds) override;
|
||||
|
|
@ -109,10 +109,12 @@ class MediaTransportHandlerSTS : public MediaTransportHandler,
|
|||
std::unique_ptr<dom::RTCStatsReportInternal>&& aReport) override;
|
||||
|
||||
private:
|
||||
RefPtr<TransportFlow> CreateTransportFlow(
|
||||
const std::string& aTransportId, bool aIsRtcp,
|
||||
RefPtr<DtlsIdentity> aDtlsIdentity, bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests, bool aPrivacyRequested);
|
||||
RefPtr<TransportFlow> CreateTransportFlow(const std::string& aTransportId,
|
||||
bool aIsRtcp,
|
||||
RefPtr<DtlsIdentity> aDtlsIdentity,
|
||||
bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested);
|
||||
|
||||
struct Transport {
|
||||
RefPtr<TransportFlow> mFlow;
|
||||
|
|
@ -416,8 +418,8 @@ void MediaTransportHandlerSTS::ActivateTransport(
|
|||
const std::string& aLocalPwd, size_t aComponentCount,
|
||||
const std::string& aUfrag, const std::string& aPassword,
|
||||
const nsTArray<uint8_t>& aKeyDer, const nsTArray<uint8_t>& aCertDer,
|
||||
SSLKEAType aAuthType, bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests, bool aPrivacyRequested) {
|
||||
SSLKEAType aAuthType, bool aDtlsClient, const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested) {
|
||||
MOZ_ASSERT(aComponentCount);
|
||||
RefPtr<DtlsIdentity> dtlsIdentity(
|
||||
DtlsIdentity::Deserialize(aKeyDer, aCertDer, aAuthType));
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#include "mozilla/RefPtr.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "sigslot.h"
|
||||
#include "transportlayer.h" // Need the State enum
|
||||
#include "dtlsidentity.h" // For DtlsDigest
|
||||
#include "transportlayer.h" // Need the State enum
|
||||
#include "dtlsidentity.h" // For DtlsDigest
|
||||
#include "mozilla/dom/PeerConnectionImplEnumsBinding.h"
|
||||
#include "mozilla/dom/RTCConfigurationBinding.h"
|
||||
#include "nricectx.h" // Need some enums
|
||||
|
|
@ -78,8 +78,8 @@ class MediaTransportHandler {
|
|||
const std::string& aLocalPwd, size_t aComponentCount,
|
||||
const std::string& aUfrag, const std::string& aPassword,
|
||||
const nsTArray<uint8_t>& aKeyDer, const nsTArray<uint8_t>& aCertDer,
|
||||
SSLKEAType aAuthType, bool aDtlsClient,
|
||||
const DtlsDigestList& aDigests, bool aPrivacyRequested) = 0;
|
||||
SSLKEAType aAuthType, bool aDtlsClient, const DtlsDigestList& aDigests,
|
||||
bool aPrivacyRequested) = 0;
|
||||
|
||||
virtual void RemoveTransportsExcept(
|
||||
const std::set<std::string>& aTransportIds) = 0;
|
||||
|
|
|
|||
|
|
@ -444,9 +444,10 @@ static nsresult RunLogQuery(const nsCString& aPattern,
|
|||
|
||||
RefPtr<MediaTransportHandler> transportHandler = ctx->GetTransportHandler();
|
||||
|
||||
InvokeAsync(
|
||||
stsThread, __func__,
|
||||
[transportHandler, aPattern]() { return transportHandler->GetIceLog(aPattern); })
|
||||
InvokeAsync(stsThread, __func__,
|
||||
[transportHandler, aPattern]() {
|
||||
return transportHandler->GetIceLog(aPattern);
|
||||
})
|
||||
->Then(GetMainThreadSerialEventTarget(), __func__,
|
||||
[aRequestId, aThisChild](Sequence<nsString>&& aLogLines) {
|
||||
OnGetLogging_m(aThisChild, aRequestId, std::move(aLogLines));
|
||||
|
|
@ -478,8 +479,10 @@ static nsresult RunLogClear() {
|
|||
|
||||
RefPtr<MediaTransportHandler> transportHandler = ctx->GetTransportHandler();
|
||||
|
||||
return RUN_ON_THREAD(stsThread, WrapRunnable(transportHandler, &MediaTransportHandler::ClearIceLog),
|
||||
NS_DISPATCH_NORMAL);
|
||||
return RUN_ON_THREAD(
|
||||
stsThread,
|
||||
WrapRunnable(transportHandler, &MediaTransportHandler::ClearIceLog),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
void WebrtcGlobalInformation::ClearLogging(const GlobalObject& aGlobal) {
|
||||
|
|
|
|||
|
|
@ -212,16 +212,17 @@ inline void ThreadLocal<T, Storage>::set(const T aValue) {
|
|||
|
||||
#if (defined(XP_WIN) || defined(MACOSX_HAS_THREAD_LOCAL)) && \
|
||||
!defined(__MINGW32__)
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
thread_local ::mozilla::detail::ThreadLocal< \
|
||||
TYPE, ::mozilla::detail::ThreadLocalNativeStorage>
|
||||
#elif defined(HAVE_THREAD_TLS_KEYWORD)
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
__thread ::mozilla::detail::ThreadLocal< \
|
||||
TYPE, ::mozilla::detail::ThreadLocalNativeStorage>
|
||||
#else
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
::mozilla::detail::ThreadLocal<TYPE, ::mozilla::detail::ThreadLocalKeyStorage>
|
||||
# define MOZ_THREAD_LOCAL(TYPE) \
|
||||
::mozilla::detail::ThreadLocal<TYPE, \
|
||||
::mozilla::detail::ThreadLocalKeyStorage>
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ NS_IMPL_COMPONENT_FACTORY(net::nsHttpsHandler) {
|
|||
return handler.forget().downcast<nsIHttpProtocolHandler>();
|
||||
}
|
||||
|
||||
|
||||
#include "nsCacheService.h"
|
||||
|
||||
nsresult nsCacheServiceConstructor(nsISupports* aOuter, const nsIID& aIID,
|
||||
|
|
@ -378,13 +377,14 @@ void nsNetShutdown() {
|
|||
gDataSniffers = nullptr;
|
||||
}
|
||||
|
||||
static const mozilla::Module kNeckoModule = {mozilla::Module::kVersion,
|
||||
nullptr,
|
||||
nullptr,
|
||||
kNeckoCategories,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mozilla::Module::ALLOW_IN_SOCKET_PROCESS};
|
||||
static const mozilla::Module kNeckoModule = {
|
||||
mozilla::Module::kVersion,
|
||||
nullptr,
|
||||
nullptr,
|
||||
kNeckoCategories,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mozilla::Module::ALLOW_IN_SOCKET_PROCESS};
|
||||
|
||||
NSMODULE_DEFN(necko) = &kNeckoModule;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ nsresult WebSocketChannelConstructor(nsISupports* aOuter, const nsIID& aIID,
|
|||
void** aResult);
|
||||
nsresult WebSocketSSLChannelConstructor(nsISupports* aOuter, const nsIID& aIID,
|
||||
void** aResult);
|
||||
}
|
||||
}
|
||||
} // namespace net
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
|
|
|||
6
netwerk/cache/nsCacheService.cpp
vendored
6
netwerk/cache/nsCacheService.cpp
vendored
|
|
@ -64,8 +64,10 @@ static const char *observerList[] = {
|
|||
"suspend_process_notification", "resume_process_notification"};
|
||||
|
||||
static const char *prefList[] = {
|
||||
OFFLINE_CACHE_ENABLE_PREF, OFFLINE_CACHE_CAPACITY_PREF,
|
||||
OFFLINE_CACHE_DIR_PREF, nullptr,
|
||||
OFFLINE_CACHE_ENABLE_PREF,
|
||||
OFFLINE_CACHE_CAPACITY_PREF,
|
||||
OFFLINE_CACHE_DIR_PREF,
|
||||
nullptr,
|
||||
};
|
||||
|
||||
class nsCacheProfilePrefObserver : public nsIObserver {
|
||||
|
|
|
|||
|
|
@ -2227,7 +2227,7 @@ HttpBaseChannel::RedirectTo(nsIURI* targetURI) {
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
HttpBaseChannel::SwitchProcessTo(mozilla::dom::Promise *aTabParent,
|
||||
HttpBaseChannel::SwitchProcessTo(mozilla::dom::Promise* aTabParent,
|
||||
uint64_t aIdentifier) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
/* Xlib headers insist on this for some reason... Nuke it because
|
||||
it'll override our member name */
|
||||
typedef Status __StatusTmp;
|
||||
#undef Status
|
||||
# undef Status
|
||||
typedef __StatusTmp Status;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
/* Xlib headers insist on this for some reason... Nuke it because
|
||||
it'll override our member name */
|
||||
typedef Status __StatusTmp;
|
||||
#undef Status
|
||||
# undef Status
|
||||
typedef __StatusTmp Status;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ bool IsInitialized() { return !!sFlashFeaturesMap[0].mFeature; }
|
|||
|
||||
} // namespace
|
||||
|
||||
UrlClassifierFeatureFlash::UrlClassifierFeatureFlash(const UrlClassifierFeatureFlash::FlashFeature& aFlashFeature)
|
||||
UrlClassifierFeatureFlash::UrlClassifierFeatureFlash(
|
||||
const UrlClassifierFeatureFlash::FlashFeature& aFlashFeature)
|
||||
: UrlClassifierFeatureBase(
|
||||
nsDependentCString(aFlashFeature.mName),
|
||||
nsDependentCString(aFlashFeature.mBlacklistPrefTables),
|
||||
|
|
@ -119,7 +120,8 @@ UrlClassifierFeatureFlash::UrlClassifierFeatureFlash(const UrlClassifierFeatureF
|
|||
|
||||
for (const FlashFeature& flashFeature : sFlashFeaturesMap) {
|
||||
MOZ_ASSERT(flashFeature.mFeature);
|
||||
if (!flashFeature.mSubdocumentOnly || contentPolicyType == nsIContentPolicy::TYPE_SUBDOCUMENT) {
|
||||
if (!flashFeature.mSubdocumentOnly ||
|
||||
contentPolicyType == nsIContentPolicy::TYPE_SUBDOCUMENT) {
|
||||
aFeatures.AppendElement(flashFeature.mFeature);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ class UrlClassifierFeaturePhishingProtection final
|
|||
|
||||
static void MaybeShutdown();
|
||||
|
||||
static void MaybeCreate(
|
||||
nsTArray<RefPtr<nsIUrlClassifierFeature>>& aFeatures);
|
||||
static void MaybeCreate(nsTArray<RefPtr<nsIUrlClassifierFeature>>& aFeatures);
|
||||
|
||||
static already_AddRefed<nsIUrlClassifierFeature> GetIfNameMatches(
|
||||
const nsACString& aName);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ class NSSCertDBTrustDomain : public mozilla::pkix::TrustDomain {
|
|||
bool mSawDistrustedCAByPolicyError;
|
||||
const OriginAttributes& mOriginAttributes;
|
||||
const Vector<mozilla::pkix::Input>& mThirdPartyRootInputs; // non-owning
|
||||
UniqueCERTCertList& mBuiltChain; // non-owning
|
||||
UniqueCERTCertList& mBuiltChain; // non-owning
|
||||
PinningTelemetryInfo* mPinningTelemetryInfo;
|
||||
const char* mHostname; // non-owning - only used for pinning checks
|
||||
nsCOMPtr<nsICertBlocklist> mCertBlocklist;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,4 @@
|
|||
class nsISupports;
|
||||
|
||||
nsresult nsUrlClassifierDBServiceConstructor(nsISupports *aOuter,
|
||||
const nsIID& aIID,
|
||||
void **aResult);
|
||||
const nsIID &aIID, void **aResult);
|
||||
|
|
|
|||
|
|
@ -693,7 +693,8 @@ static void SetElementAsString(Element* aElement, const nsAString& aValue) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
input = HTMLInputElement::FromNodeOrNull(nsFocusManager::GetRedirectedFocus(aElement));
|
||||
input = HTMLInputElement::FromNodeOrNull(
|
||||
nsFocusManager::GetRedirectedFocus(aElement));
|
||||
if (input) {
|
||||
input->SetValue(aValue, CallerType::NonSystem, rv);
|
||||
if (!rv.Failed()) {
|
||||
|
|
@ -962,7 +963,8 @@ MOZ_CAN_RUN_SCRIPT_BOUNDARY
|
|||
}
|
||||
if (aData.mXpath.WasPassed()) {
|
||||
for (auto& entry : aData.mXpath.Value().Entries()) {
|
||||
RefPtr<Element> node = FindNodeByXPath(aGlobal.Context(), aDocument, entry.mKey);
|
||||
RefPtr<Element> node =
|
||||
FindNodeByXPath(aGlobal.Context(), aDocument, entry.mKey);
|
||||
if (node == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1027,7 +1029,8 @@ static void ReadAllEntriesFromStorage(
|
|||
return;
|
||||
}
|
||||
|
||||
Record<nsString, Record<nsString, nsString>>::EntryType* recordEntry = nullptr;
|
||||
Record<nsString, Record<nsString, nsString>>::EntryType* recordEntry =
|
||||
nullptr;
|
||||
for (uint32_t i = 0; i < len; i++) {
|
||||
Record<nsString, nsString>::EntryType entry;
|
||||
mozilla::IgnoredErrorResult res;
|
||||
|
|
@ -1126,7 +1129,8 @@ static void CollectedSessionStorageInternal(
|
|||
nsCOMPtr<nsIPrincipal> principal = BasePrincipal::CreateCodebasePrincipal(
|
||||
NS_ConvertUTF16toUTF8(Substring(entry.mKey, 0, pos)));
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOMStorageManager> storageManager = do_QueryInterface(aDocShell, &rv);
|
||||
nsCOMPtr<nsIDOMStorageManager> storageManager =
|
||||
do_QueryInterface(aDocShell, &rv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1137,7 +1141,8 @@ static void CollectedSessionStorageInternal(
|
|||
// followup bug to bug 600307.
|
||||
// Null window because the current window doesn't match the principal yet
|
||||
// and loads about:blank.
|
||||
storageManager->CreateStorage(nullptr, principal, EmptyString(), false, getter_AddRefs(storage));
|
||||
storageManager->CreateStorage(nullptr, principal, EmptyString(), false,
|
||||
getter_AddRefs(storage));
|
||||
if (!storage) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@ bool SendCallToMiddleman(size_t aCallId, CallArguments* aArguments,
|
|||
return true;
|
||||
}
|
||||
|
||||
void ProcessMiddlemanCall(size_t aChildId, const char* aInputData, size_t aInputSize,
|
||||
void ProcessMiddlemanCall(size_t aChildId, const char* aInputData,
|
||||
size_t aInputSize,
|
||||
InfallibleVector<char>* aOutputData) {
|
||||
MOZ_RELEASE_ASSERT(IsMiddleman());
|
||||
|
||||
|
|
|
|||
|
|
@ -345,8 +345,8 @@ bool SendCallToMiddleman(size_t aCallId, CallArguments* aArguments,
|
|||
// In the middleman process, perform one or more calls encoded in aInputData
|
||||
// and encode their outputs to aOutputData. The calls are associated with the
|
||||
// specified child process ID.
|
||||
void ProcessMiddlemanCall(size_t aChildId,
|
||||
const char* aInputData, size_t aInputSize,
|
||||
void ProcessMiddlemanCall(size_t aChildId, const char* aInputData,
|
||||
size_t aInputSize,
|
||||
InfallibleVector<char>* aOutputData);
|
||||
|
||||
// In the middleman process, reset all call state for a child process ID.
|
||||
|
|
|
|||
|
|
@ -97,9 +97,8 @@ void ChildProcessInfo::OnIncomingMessage(const Message& aMsg,
|
|||
InfallibleVector<char> outputData;
|
||||
ProcessMiddlemanCall(GetId(), nmsg.BinaryData(), nmsg.BinaryDataSize(),
|
||||
&outputData);
|
||||
Message::UniquePtr response(
|
||||
MiddlemanCallResponseMessage::New(outputData.begin(),
|
||||
outputData.length()));
|
||||
Message::UniquePtr response(MiddlemanCallResponseMessage::New(
|
||||
outputData.begin(), outputData.length()));
|
||||
SendMessage(*response);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2547,7 +2547,8 @@ static ReturnAbortOnError CheckDowngrade(nsIFile* aProfileDir,
|
|||
static void GetBuildIDVersions(const nsACString& aFullVersion, int32_t aPos,
|
||||
nsACString& aBuildVersions) {
|
||||
// Extract the date part then the time part.
|
||||
aBuildVersions.Assign(Substring(aFullVersion, aPos, BUILDID_DATE_LENGTH) +
|
||||
aBuildVersions.Assign(
|
||||
Substring(aFullVersion, aPos, BUILDID_DATE_LENGTH) +
|
||||
NS_LITERAL_CSTRING(".") +
|
||||
Substring(aFullVersion, aPos + BUILDID_DATE_LENGTH, BUILDID_TIME_LENGTH));
|
||||
}
|
||||
|
|
@ -2564,7 +2565,8 @@ static Version GetComparableVersion(const nsCString& aVersionStr) {
|
|||
if (underscorePos == kNotFound || slashPos == kNotFound ||
|
||||
(slashPos - underscorePos) != kExpectedLength ||
|
||||
(aVersionStr.Length() - slashPos) != kExpectedLength) {
|
||||
NS_WARNING("compatibility.ini Version string does not match the expected format.");
|
||||
NS_WARNING(
|
||||
"compatibility.ini Version string does not match the expected format.");
|
||||
return Version(aVersionStr.get());
|
||||
}
|
||||
|
||||
|
|
@ -4693,7 +4695,8 @@ nsresult XREMain::XRE_mainRun() {
|
|||
AddSandboxAnnotations();
|
||||
#endif /* MOZ_CONTENT_SANDBOX */
|
||||
|
||||
static_cast<nsToolkitProfileService*>(mProfileSvc.get())->RecordStartupTelemetry();
|
||||
static_cast<nsToolkitProfileService*>(mProfileSvc.get())
|
||||
->RecordStartupTelemetry();
|
||||
|
||||
{
|
||||
rv = appStartup->Run();
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ static bool sBuildingCommandLine = false;
|
|||
void AddToCommandLine(const char* inArgText) {
|
||||
if (sArgsUsed >= sArgsAllocated - 1) {
|
||||
// realloc does not free the given pointer if allocation fails
|
||||
char** temp = static_cast<char**>(
|
||||
realloc(sArgs, (sArgsAllocated + kArgsGrowSize) * sizeof(char*)));
|
||||
char** temp =
|
||||
static_cast<char**>(realloc(sArgs, (sArgsAllocated + kArgsGrowSize) * sizeof(char*)));
|
||||
if (!temp) return;
|
||||
sArgs = temp;
|
||||
sArgsAllocated += kArgsGrowSize;
|
||||
|
|
|
|||
|
|
@ -661,33 +661,33 @@ static void ApplyUpdate(nsIFile *greDir, nsIFile *updateDir, nsIFile *appDir,
|
|||
}
|
||||
delete[] argv;
|
||||
#elif defined(XP_MACOSX)
|
||||
UpdateDriverSetupMacCommandLine(argc, argv, restart);
|
||||
// We need to detect whether elevation is required for this update. This can
|
||||
// occur when an admin user installs the application, but another admin
|
||||
// user attempts to update (see bug 394984).
|
||||
if (restart && !IsRecursivelyWritable(installDirPath.get())) {
|
||||
if (!LaunchElevatedUpdate(argc, argv, outpid)) {
|
||||
LOG(("Failed to launch elevated update!"));
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
UpdateDriverSetupMacCommandLine(argc, argv, restart);
|
||||
// We need to detect whether elevation is required for this update. This can
|
||||
// occur when an admin user installs the application, but another admin
|
||||
// user attempts to update (see bug 394984).
|
||||
if (restart && !IsRecursivelyWritable(installDirPath.get())) {
|
||||
if (!LaunchElevatedUpdate(argc, argv, outpid)) {
|
||||
LOG(("Failed to launch elevated update!"));
|
||||
exit(1);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (isStaged) {
|
||||
// Launch the updater to replace the installation with the staged updated.
|
||||
LaunchChildMac(argc, argv);
|
||||
} else {
|
||||
// Launch the updater to either stage or apply an update.
|
||||
LaunchChildMac(argc, argv, outpid);
|
||||
}
|
||||
if (isStaged) {
|
||||
// Launch the updater to replace the installation with the staged updated.
|
||||
LaunchChildMac(argc, argv);
|
||||
} else {
|
||||
// Launch the updater to either stage or apply an update.
|
||||
LaunchChildMac(argc, argv, outpid);
|
||||
}
|
||||
#else
|
||||
if (isStaged) {
|
||||
// Launch the updater to replace the installation with the staged updated.
|
||||
PR_CreateProcessDetached(updaterPath.get(), argv, nullptr, nullptr);
|
||||
} else {
|
||||
// Launch the updater to either stage or apply an update.
|
||||
*outpid = PR_CreateProcess(updaterPath.get(), argv, nullptr, nullptr);
|
||||
}
|
||||
if (isStaged) {
|
||||
// Launch the updater to replace the installation with the staged updated.
|
||||
PR_CreateProcessDetached(updaterPath.get(), argv, nullptr, nullptr);
|
||||
} else {
|
||||
// Launch the updater to either stage or apply an update.
|
||||
*outpid = PR_CreateProcess(updaterPath.get(), argv, nullptr, nullptr);
|
||||
}
|
||||
#endif
|
||||
if (restart) {
|
||||
exit(0);
|
||||
|
|
|
|||
|
|
@ -364,8 +364,8 @@ class nsChildView final : public nsBaseWidget {
|
|||
virtual bool WidgetTypeSupportsAcceleration() override;
|
||||
virtual bool ShouldUseOffMainThreadCompositing() override;
|
||||
|
||||
virtual void SetCursor(nsCursor aDefaultCursor, imgIContainer* aCursor,
|
||||
uint32_t aHotspotX, uint32_t aHotspotY) override;
|
||||
virtual void SetCursor(nsCursor aDefaultCursor, imgIContainer* aCursor, uint32_t aHotspotX,
|
||||
uint32_t aHotspotY) override;
|
||||
|
||||
virtual nsresult SetTitle(const nsAString& title) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -410,8 +410,8 @@ int GetGtkHeaderBarButtonLayout(WidgetNodeType* aButtonLayout,
|
|||
// "minimize,maximize,close:" layout means buttons are on the opposite
|
||||
// titlebar side. close button is always there.
|
||||
bool reversedButtonsPlacement = false;
|
||||
const char *closeButton = strstr(decorationLayout, "close");
|
||||
const char *separator = strchr(decorationLayout, ':');
|
||||
const char* closeButton = strstr(decorationLayout, "close");
|
||||
const char* separator = strchr(decorationLayout, ':');
|
||||
if (closeButton != nullptr && separator != nullptr) {
|
||||
reversedButtonsPlacement = closeButton < separator;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3308,7 +3308,8 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent,
|
|||
int screenNumber = GDK_SCREEN_XNUMBER(screen);
|
||||
int visualId = 0;
|
||||
if (useWebRender) {
|
||||
// WebRender rquests AlphaVisual for making readback to work correctly.
|
||||
// WebRender rquests AlphaVisual for making readback to work
|
||||
// correctly.
|
||||
needsAlphaVisual = true;
|
||||
}
|
||||
if (GLContextGLX::FindVisual(display, screenNumber, useWebRender,
|
||||
|
|
|
|||
|
|
@ -640,8 +640,8 @@ void nsBaseWidget::SetSizeMode(nsSizeMode aMode) {
|
|||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
void nsBaseWidget::SetCursor(nsCursor aCursor,
|
||||
imgIContainer*, uint32_t, uint32_t) {
|
||||
void nsBaseWidget::SetCursor(nsCursor aCursor, imgIContainer*, uint32_t,
|
||||
uint32_t) {
|
||||
// We don't support the cursor image.
|
||||
mCursor = aCursor;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ nsresult MemoryTelemetry::GatherReports(
|
|||
if (NS_SUCCEEDED(rv)) { \
|
||||
HandleMemoryReport(Telemetry::id, nsIMemoryReporter::units, amt); \
|
||||
} else if (rv != NS_ERROR_NOT_AVAILABLE) { \
|
||||
NS_WARNING("Failed to retrieve memory telemetry for " # metric); \
|
||||
NS_WARNING("Failed to retrieve memory telemetry for " #metric); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
// dynamic_cast<void*> is not supported on Windows without RTTI.
|
||||
#ifndef _WIN32
|
||||
#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
|
||||
# define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue