diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/base/TextUpdater.cpp firefox-trunk-62.0~a1~hg20180620r423058/accessible/base/TextUpdater.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/base/TextUpdater.cpp 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/base/TextUpdater.cpp 2018-06-20 17:28:58.000000000 +0000 @@ -46,7 +46,7 @@ mHyperText = parent->AsHyperText(); if (!mHyperText) { - NS_ERROR("Text leaf parent is not hypertext!"); + MOZ_ASSERT_UNREACHABLE("Text leaf parent is not hypertext!"); return; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/generic/Accessible.cpp firefox-trunk-62.0~a1~hg20180620r423058/accessible/generic/Accessible.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/generic/Accessible.cpp 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/generic/Accessible.cpp 2018-06-20 17:28:58.000000000 +0000 @@ -357,7 +357,7 @@ if (deckFrame->GetContent()->IsXULElement(nsGkAtoms::tabpanels)) return states::OFFSCREEN; - NS_NOTREACHED("Children of not selected deck panel are not accessible."); + MOZ_ASSERT_UNREACHABLE("Children of not selected deck panel are not accessible."); return states::INVISIBLE; } @@ -1957,8 +1957,8 @@ return; } - NS_ASSERTION(mParent, - "Called on accessible unbound from tree. Result can be wrong."); + MOZ_ASSERT(mParent, + "Called on accessible unbound from tree. Result can be wrong."); if (frame->IsBrFrame()) { aText += kForcedNewLineChar; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/browser/browser.ini firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/browser/browser.ini --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/browser/browser.ini 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/browser/browser.ini 2018-06-20 17:28:58.000000000 +0000 @@ -11,7 +11,7 @@ [browser_shutdown_multi_acc_reference_doc.js] [browser_shutdown_multi_reference.js] [browser_shutdown_parent_own_reference.js] -skip-if = !e10s || (os == 'win' && os_version == '5.1') || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content. +skip-if = !e10s || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content. [browser_shutdown_pref.js] [browser_shutdown_proxy_acc_reference.js] skip-if = !e10s || (os == 'win') # e10s specific test for a11y start/shutdown between parent and content. @@ -22,11 +22,11 @@ [browser_shutdown_multi_proxy_acc_reference_obj.js] skip-if = !e10s || (os == 'win') || (verify && debug && (os == 'linux')) # e10s specific test for a11y start/shutdown between parent and content. [browser_shutdown_remote_no_reference.js] -skip-if = !e10s || (os == 'win' && os_version == '5.1') || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content. +skip-if = !e10s || (verify && debug && (os == 'win')) # e10s specific test for a11y start/shutdown between parent and content. [browser_shutdown_remote_only.js] -skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content. +skip-if = !e10s # e10s specific test for a11y start/shutdown between parent and content. [browser_shutdown_remote_own_reference.js] -skip-if = !e10s || (os == 'win' && os_version == '5.1') # e10s specific test for a11y start/shutdown between parent and content. +skip-if = !e10s # e10s specific test for a11y start/shutdown between parent and content. [browser_shutdown_scope_lifecycle.js] [browser_shutdown_start_restart.js] skip-if = (verify && debug) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/actions/a11y.ini firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/actions/a11y.ini --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/actions/a11y.ini 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/actions/a11y.ini 2018-06-20 17:28:58.000000000 +0000 @@ -12,7 +12,6 @@ [test_keys_menu.xul] [test_link.html] [test_media.html] -skip-if = buildapp == 'mulet' [test_select.html] [test_tree.xul] [test_treegrid.xul] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/aom/test_general.html firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/aom/test_general.html --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/aom/test_general.html 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/aom/test_general.html 2018-06-20 17:28:58.000000000 +0000 @@ -107,7 +107,7 @@ is(anode, node.accessibleNode, "an AccessibleNode is properly cached"); // Adopting node to another document doesn't change .accessibleNode - anotherDoc = document.implementation.createDocument("", "", null); + let anotherDoc = document.implementation.createDocument("", "", null); let adopted_node = anotherDoc.adoptNode(node); is(anode, adopted_node.accessibleNode, "adopting node to another document doesn't change node.accessibleNode"); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/elm/a11y.ini firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/elm/a11y.ini --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/elm/a11y.ini 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/elm/a11y.ini 2018-06-20 17:28:58.000000000 +0000 @@ -5,13 +5,11 @@ !/dom/media/test/bug461281.ogg [test_HTMLSpec.html] -skip-if = buildapp == 'mulet' [test_figure.html] [test_listbox.xul] [test_MathMLSpec.html] [test_nsApplicationAcc.html] [test_plugin.html] -skip-if = buildapp == 'mulet' [test_canvas.html] [test_shadowroot.html] support-files = test_shadowroot_subframe.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/elm/test_nsApplicationAcc.html firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/elm/test_nsApplicationAcc.html --- firefox-trunk-62.0~a1~hg20180611r422292/accessible/tests/mochitest/elm/test_nsApplicationAcc.html 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/accessible/tests/mochitest/elm/test_nsApplicationAcc.html 2018-06-20 17:28:58.000000000 +0000 @@ -13,7 +13,6 @@ src="../role.js"> diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/animation/test/crashtests/crashtests.list firefox-trunk-62.0~a1~hg20180620r423058/dom/animation/test/crashtests/crashtests.list --- firefox-trunk-62.0~a1~hg20180611r422292/dom/animation/test/crashtests/crashtests.list 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/animation/test/crashtests/crashtests.list 2018-06-20 17:29:02.000000000 +0000 @@ -40,3 +40,4 @@ load 1400022-1.html pref(dom.animations-api.core.enabled,true) load 1401809.html pref(dom.animations-api.core.enabled,true) load 1411318-1.html +load 1468294-1.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/AnonymousContent.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/AnonymousContent.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/AnonymousContent.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/AnonymousContent.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -228,7 +228,9 @@ } RefPtr cs = - new nsComputedDOMStyle(element, NS_LITERAL_STRING(""), shell, + new nsComputedDOMStyle(element, + NS_LITERAL_STRING(""), + element->OwnerDoc(), nsComputedDOMStyle::eAll); aRv = cs->GetPropertyValue(aPropertyName, aResult); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Attr.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Attr.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Attr.cpp 2018-06-11 13:02:08.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Attr.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -289,18 +289,6 @@ return NS_ERROR_NOT_IMPLEMENTED; } -nsresult -Attr::InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -void -Attr::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ -} - void Attr::RemoveChildNode(nsIContent* aKid, bool aNotify) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Attr.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Attr.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Attr.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Attr.h 2018-06-20 17:29:03.000000000 +0000 @@ -63,9 +63,6 @@ virtual int32_t ComputeIndexOf(const nsINode* aPossibleChild) const override; virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult, bool aPreallocateChildren) const override; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CharacterData.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CharacterData.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CharacterData.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CharacterData.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -634,19 +634,6 @@ return NS_OK; } -nsresult -CharacterData::InsertChildAt_Deprecated(nsIContent* aKid, - uint32_t aIndex, - bool aNotify) -{ - return NS_OK; -} - -void -CharacterData::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ -} - void CharacterData::RemoveChildNode(nsIContent* aKid, bool aNotify) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CharacterData.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CharacterData.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CharacterData.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CharacterData.h 2018-06-20 17:29:03.000000000 +0000 @@ -105,9 +105,6 @@ virtual int32_t ComputeIndexOf(const nsINode* aPossibleChild) const override; virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; virtual void GetTextContentInternal(nsAString& aTextContent, OOMReporter& aError) override diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CustomElementRegistry.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CustomElementRegistry.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CustomElementRegistry.cpp 2018-06-11 13:02:08.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CustomElementRegistry.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -981,6 +981,45 @@ return; } +static void +TryUpgrade(nsINode& aNode) +{ + Element* element = aNode.IsElement() ? aNode.AsElement() : nullptr; + if (element) { + CustomElementData* ceData = element->GetCustomElementData(); + if (ceData) { + NodeInfo* nodeInfo = element->NodeInfo(); + nsAtom* typeAtom = ceData->GetCustomElementType(); + CustomElementDefinition* definition = + nsContentUtils::LookupCustomElementDefinition(nodeInfo->GetDocument(), + nodeInfo->NameAtom(), + nodeInfo->NamespaceID(), + typeAtom); + if (definition) { + nsContentUtils::EnqueueUpgradeReaction(element, definition); + } + } + + if (ShadowRoot* root = element->GetShadowRoot()) { + for (Element* child = root->GetFirstElementChild(); child; + child = child->GetNextElementSibling()) { + TryUpgrade(*child); + } + } + } + + for (Element* child = aNode.GetFirstElementChild(); child; + child = child->GetNextElementSibling()) { + TryUpgrade(*child); + } +} + +void +CustomElementRegistry::Upgrade(nsINode& aRoot) +{ + TryUpgrade(aRoot); +} + void CustomElementRegistry::Get(JSContext* aCx, const nsAString& aName, JS::MutableHandle aRetVal) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CustomElementRegistry.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CustomElementRegistry.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/CustomElementRegistry.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/CustomElementRegistry.h 2018-06-20 17:29:03.000000000 +0000 @@ -554,6 +554,8 @@ // Chrome-only method that give JS an opportunity to only load the custom // element definition script when needed. void SetElementCreationCallback(const nsAString& aName, CustomElementCreationCallback& aCallback, ErrorResult& aRv); + + void Upgrade(nsINode& aRoot); }; class MOZ_RAII AutoCEReaction final { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DirectionalityUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DirectionalityUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DirectionalityUtils.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DirectionalityUtils.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -213,6 +213,7 @@ #include "mozilla/AutoRestore.h" #include "mozilla/DebugOnly.h" #include "mozilla/dom/Element.h" +#include "mozilla/dom/ShadowRoot.h" #include "nsUnicodeProperties.h" #include "nsTextFragment.h" #include "nsAttrValue.h" @@ -222,6 +223,7 @@ namespace mozilla { using mozilla::dom::Element; +using mozilla::dom::ShadowRoot; /** * Returns true if aElement is one of the elements whose text content should not @@ -241,7 +243,7 @@ nodeInfo->Equals(nsGkAtoms::script) || nodeInfo->Equals(nsGkAtoms::style) || nodeInfo->Equals(nsGkAtoms::textarea) || - (aElement->IsInAnonymousSubtree() && !aElement->HasDirAuto())); + aElement->IsInAnonymousSubtree()); } /** @@ -254,8 +256,7 @@ { return (DoesNotParticipateInAutoDirection(aElement) || aElement->IsHTMLElement(nsGkAtoms::bdi) || - aElement->HasFixedDir() || - aElement->IsInAnonymousSubtree()); + aElement->HasFixedDir()); } /** @@ -277,18 +278,16 @@ } } +// FIXME(bug 1100912): Should ShadowRoot children affect the host if it's +// dir=auto? Probably not at least in closed mode. inline static bool NodeAffectsDirAutoAncestor(nsINode* aTextNode) { Element* parent = aTextNode->GetParentElement(); - // In the anonymous content, we limit our implementation to only - // allow the children text node of the direct dir=auto parent in - // the same anonymous subtree to affact the direction. return (parent && !DoesNotParticipateInAutoDirection(parent) && parent->NodeOrAncestorHasDirAuto() && - (!aTextNode->IsInAnonymousSubtree() || - parent->HasDirAuto())); + !aTextNode->IsInAnonymousSubtree()); } Directionality @@ -376,7 +375,7 @@ * @return the text node containing the character that determined the direction */ static nsTextNode* -WalkDescendantsSetDirectionFromText(Element* aElement, bool aNotify = true, +WalkDescendantsSetDirectionFromText(Element* aElement, bool aNotify, nsINode* aChangedNode = nullptr) { MOZ_ASSERT(aElement, "Must have an element"); @@ -630,51 +629,69 @@ MOZ_ASSERT(!aElement->HasDirAuto(), "RecomputeDirectionality called with dir=auto"); + if (aElement->HasValidDir()) { + return aElement->GetDirectionality(); + } + Directionality dir = eDir_LTR; + if (nsINode* parent = aElement->GetParentNode()) { + if (ShadowRoot* shadow = ShadowRoot::FromNode(parent)) { + parent = shadow->GetHost(); + } - if (aElement->HasValidDir()) { - dir = aElement->GetDirectionality(); - } else { - Element* parent = aElement->GetParentElement(); - if (parent) { - // If the element doesn't have an explicit dir attribute with a valid - // value, the directionality is the same as the parent element (but - // don't propagate the parent directionality if it isn't set yet). - Directionality parentDir = parent->GetDirectionality(); + if (parent && parent->IsElement()) { + // If the node doesn't have an explicit dir attribute with a valid value, + // the directionality is the same as the parent element (but don't propagate + // the parent directionality if it isn't set yet). + Directionality parentDir = parent->AsElement()->GetDirectionality(); if (parentDir != eDir_NotSet) { dir = parentDir; } - } else { - // If there is no parent element and no dir attribute, the directionality - // is LTR. - dir = eDir_LTR; } - - aElement->SetDirectionality(dir, aNotify); } + + aElement->SetDirectionality(dir, aNotify); return dir; } -void -SetDirectionalityOnDescendants(Element* aElement, Directionality aDir, - bool aNotify) +static void +SetDirectionalityOnDescendantsInternal(nsINode* aNode, + Directionality aDir, + bool aNotify) { - for (nsIContent* child = aElement->GetFirstChild(); child; ) { + if (Element* element = Element::FromNode(aNode)) { + if (ShadowRoot* shadow = element->GetShadowRoot()) { + SetDirectionalityOnDescendantsInternal(shadow, aDir, aNotify); + } + } + + for (nsIContent* child = aNode->GetFirstChild(); child; ) { if (!child->IsElement()) { - child = child->GetNextNode(aElement); + child = child->GetNextNode(aNode); continue; } Element* element = child->AsElement(); if (element->HasValidDir() || element->HasDirAuto()) { - child = child->GetNextNonChildNode(aElement); + child = child->GetNextNonChildNode(aNode); continue; } + if (ShadowRoot* shadow = element->GetShadowRoot()) { + SetDirectionalityOnDescendantsInternal(shadow, aDir, aNotify); + } element->SetDirectionality(aDir, aNotify); - child = child->GetNextNode(aElement); + child = child->GetNextNode(aNode); } } +// We want the public version of this only to acc +void +SetDirectionalityOnDescendants(Element* aElement, Directionality aDir, + bool aNotify) +{ + return SetDirectionalityOnDescendantsInternal(aElement, aDir, aNotify); +} + /** * Walk the parent chain of a text node whose dir attribute has been removed and * reset the direction of any of its ancestors which have dir=auto and whose @@ -787,8 +804,9 @@ } } -void SetAncestorDirectionIfAuto(nsTextNode* aTextNode, Directionality aDir, - bool aNotify = true) +void +SetAncestorDirectionIfAuto(nsTextNode* aTextNode, Directionality aDir, + bool aNotify = true) { MOZ_ASSERT(aTextNode->NodeType() == nsINode::TEXT_NODE, "Must be a text node"); @@ -923,19 +941,14 @@ void ResetDirectionSetByTextNode(nsTextNode* aTextNode) { - // We used to check NodeAffectsDirAutoAncestor() in this function, but - // stopped doing that since calling IsInAnonymousSubtree() - // too late (during nsTextNode::UnbindFromTree) is impossible and this - // function was no-op when there's no directionality map. - if (!aTextNode->HasTextNodeDirectionalityMap()) { + if (!NodeAffectsDirAutoAncestor(aTextNode)) { + nsTextNodeDirectionalityMap::EnsureMapIsClearFor(aTextNode); return; } Directionality dir = GetDirectionFromText(aTextNode->GetText()); - if (dir != eDir_NotSet) { + if (dir != eDir_NotSet && aTextNode->HasTextNodeDirectionalityMap()) { nsTextNodeDirectionalityMap::ResetTextNodeDirection(aTextNode, aTextNode); - } else { - nsTextNodeDirectionalityMap::EnsureMapIsClearFor(aTextNode); } } @@ -1006,7 +1019,7 @@ } void -SetDirOnBind(mozilla::dom::Element* aElement, nsIContent* aParent) +SetDirOnBind(Element* aElement, nsIContent* aParent) { // Set the AncestorHasDirAuto flag, unless this element shouldn't affect // ancestors that have dir=auto @@ -1044,7 +1057,8 @@ } } -void ResetDir(mozilla::dom::Element* aElement) +void +ResetDir(Element* aElement) { if (aElement->HasDirAutoSet()) { nsTextNode* setByNode = diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DocGroup.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DocGroup.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DocGroup.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DocGroup.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -5,9 +5,9 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/DocGroup.h" -#include "mozilla/dom/DOMPrefs.h" #include "mozilla/dom/DOMTypes.h" #include "mozilla/dom/TabGroup.h" +#include "mozilla/StaticPrefs.h" #include "mozilla/Telemetry.h" #include "nsIDocShell.h" #include "nsDOMMutationObserver.h" @@ -52,8 +52,8 @@ : mKey(aKey), mTabGroup(aTabGroup) { // This method does not add itself to mTabGroup->mDocGroups as the caller does it for us. - if (mozilla::dom::DOMPrefs::SchedulerLoggingEnabled()) { - mPerformanceCounter = new mozilla::PerformanceCounter(aKey); + if (mozilla::StaticPrefs::dom_performance_enable_scheduler_timing()) { + mPerformanceCounter = new mozilla::PerformanceCounter(NS_LITERAL_CSTRING("DocGroup:") + aKey); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DOMPrefsInternal.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DOMPrefsInternal.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/DOMPrefsInternal.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/DOMPrefsInternal.h 2018-06-20 17:29:03.000000000 +0000 @@ -23,7 +23,6 @@ DOM_PREF(DOMCachesEnabled, "dom.caches.enabled") DOM_PREF(DOMCachesTestingEnabled, "dom.caches.testing.enabled") DOM_PREF(PerformanceLoggingEnabled, "dom.performance.enable_user_timing_logging") -DOM_PREF(SchedulerLoggingEnabled, "dom.performance.enable_scheduler_timing") DOM_PREF(NotificationEnabled, "dom.webnotifications.enabled") DOM_PREF(NotificationEnabledInServiceWorkers, "dom.webnotifications.serviceworker.enabled") DOM_PREF(NotificationRIEnabled, "dom.webnotifications.requireinteraction.enabled") diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Element.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Element.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/Element.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/Element.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -1994,16 +1994,12 @@ } if (aDeep) { - // Do the kids. Don't call GetChildCount() here since that'll force - // XUL to generate template children, which there is no need for since - // all we're going to do is unbind them anyway. - uint32_t i, n = mAttrsAndChildren.ChildCount(); - - for (i = 0; i < n; ++i) { + for (nsIContent* child = GetFirstChild(); child; + child = child->GetNextSibling()) { // Note that we pass false for aNullParent here, since we don't want // the kids to forget us. We _do_ want them to forget their binding // parent, though, since this only walks non-anonymous kids. - mAttrsAndChildren.ChildAt(i)->UnbindFromTree(true, false); + child->UnbindFromTree(true, false); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/FragmentOrElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/FragmentOrElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/FragmentOrElement.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/FragmentOrElement.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -1225,27 +1225,6 @@ return doInsertChildAt(aKid, index, aNotify, mAttrsAndChildren); } -nsresult -FragmentOrElement::InsertChildAt_Deprecated(nsIContent* aKid, - uint32_t aIndex, - bool aNotify) -{ - MOZ_ASSERT(aKid, "null ptr"); - - return doInsertChildAt(aKid, aIndex, aNotify, mAttrsAndChildren); -} - -void -FragmentOrElement::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - nsCOMPtr oldKid = mAttrsAndChildren.GetSafeChildAt(aIndex); - NS_ASSERTION(oldKid == GetChildAt_Deprecated(aIndex), "Unexpected child in RemoveChildAt_Deprecated"); - - if (oldKid) { - doRemoveChildAt(aIndex, aNotify, oldKid, mAttrsAndChildren); - } -} - void FragmentOrElement::RemoveChildNode(nsIContent* aKid, bool aNotify) { @@ -1274,8 +1253,6 @@ void FragmentOrElement::DestroyContent() { - nsIDocument* document = OwnerDoc(); - // Drop any servo data. We do this before the RemovedFromDocument call below // so that it doesn't need to try to keep the style state sane when shuffling // around the flattened tree. @@ -1286,17 +1263,28 @@ AsElement()->ClearServoData(); } + nsIDocument* document = OwnerDoc(); + document->BindingManager()->RemovedFromDocument(this, document, nsBindingManager::eRunDtor); document->ClearBoxObjectFor(this); - uint32_t i, count = mAttrsAndChildren.ChildCount(); - for (i = 0; i < count; ++i) { - // The child can remove itself from the parent in BindToTree. - mAttrsAndChildren.ChildAt(i)->DestroyContent(); +#ifdef DEBUG + uint32_t oldChildCount = GetChildCount(); +#endif + + for (nsIContent* child = GetFirstChild(); + child; + child = child->GetNextSibling()) { + child->DestroyContent(); + MOZ_ASSERT(child->GetParent() == this, + "Mutating the tree during XBL destructors is evil"); } - ShadowRoot* shadowRoot = GetShadowRoot(); - if (shadowRoot) { + + MOZ_ASSERT(oldChildCount == GetChildCount(), + "Mutating the tree during XBL destructors is evil"); + + if (ShadowRoot* shadowRoot = GetShadowRoot()) { shadowRoot->DestroyContent(); } } @@ -1304,10 +1292,14 @@ void FragmentOrElement::SaveSubtreeState() { - uint32_t i, count = mAttrsAndChildren.ChildCount(); - for (i = 0; i < count; ++i) { - mAttrsAndChildren.ChildAt(i)->SaveSubtreeState(); + for (nsIContent* child = GetFirstChild(); + child; + child = child->GetNextSibling()) { + child->SaveSubtreeState(); } + + // FIXME(bug 1469277): Pretty sure this wants to dig into shadow trees as + // well. } //---------------------------------------------------------------------- diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/FragmentOrElement.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/FragmentOrElement.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/FragmentOrElement.h 2018-06-11 13:02:08.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/FragmentOrElement.h 2018-06-20 17:29:03.000000000 +0000 @@ -98,9 +98,6 @@ virtual int32_t ComputeIndexOf(const nsINode* aPossibleChild) const override; virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; virtual void GetTextContentInternal(nsAString& aTextContent, mozilla::OOMReporter& aError) override; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsContentIterator.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsContentIterator.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsContentIterator.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsContentIterator.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -893,9 +893,7 @@ RefPtr mRange; - // these arrays all typically are used and have elements AutoTArray mEndNodes; - AutoTArray mEndOffsets; }; NS_IMPL_ADDREF_INHERITED(nsContentSubtreeIterator, nsContentIterator) @@ -1015,8 +1013,13 @@ } // cache ancestors - nsContentUtils::GetAncestorsAndOffsets(endContainer, endOffset, - &mEndNodes, &mEndOffsets); + mEndNodes.Clear(); + nsIContent* endNode = + endContainer->IsContent() ? endContainer->AsContent() : nullptr; + while (endNode) { + mEndNodes.AppendElement(endNode); + endNode = endNode->GetParent(); + } nsIContent* firstCandidate = nullptr; nsIContent* lastCandidate = nullptr; @@ -1029,7 +1032,8 @@ // no children, start at the node itself node = startContainer; } else { - nsIContent* child = startContainer->GetChildAt_Deprecated(offset); + nsIContent* child = mRange->GetChildAtStartOffset(); + MOZ_ASSERT(child == startContainer->GetChildAt_Deprecated(offset)); if (!child) { // offset after last child node = startContainer; @@ -1078,7 +1082,8 @@ if (!offset || !numChildren) { node = endContainer; } else { - lastCandidate = endContainer->GetChildAt_Deprecated(--offset); + lastCandidate = mRange->EndRef().Ref(); + MOZ_ASSERT(lastCandidate == endContainer->GetChildAt_Deprecated(--offset)); NS_ASSERTION(lastCandidate, "tree traversal trouble in nsContentSubtreeIterator::Init"); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsContentUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsContentUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsContentUtils.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsContentUtils.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -9884,11 +9884,11 @@ } } - RefPtr tagAtom = nodeInfo->NameAtom(); - RefPtr typeAtom; + nsAtom* tagAtom = nodeInfo->NameAtom(); + nsAtom* typeAtom = nullptr; bool isCustomElement = isCustomElementName || aIsAtom; if (isCustomElement) { - typeAtom = isCustomElementName ? tagAtom.get() : aIsAtom; + typeAtom = isCustomElementName ? tagAtom : aIsAtom; } MOZ_ASSERT_IF(aDefinition, isCustomElement); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsDocument.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsDocument.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsDocument.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsDocument.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -248,6 +248,7 @@ #include "mozilla/ServoStyleSet.h" #include "mozilla/StyleSheet.h" #include "mozilla/StyleSheetInlines.h" +#include "mozilla/dom/SVGDocument.h" #include "mozilla/dom/SVGSVGElement.h" #include "mozilla/dom/DocGroup.h" #include "mozilla/dom/TabGroup.h" @@ -2603,13 +2604,8 @@ bool nsIDocument::IsSynthesized() { - nsCOMPtr internalChan = do_QueryInterface(mChannel); - bool synthesized = false; - if (internalChan) { - DebugOnly rv = internalChan->GetResponseSynthesized(&synthesized); - MOZ_ASSERT(NS_SUCCEEDED(rv), "GetResponseSynthesized shouldn't fail."); - } - return synthesized; + nsCOMPtr loadInfo = mChannel ? mChannel->GetLoadInfo() : nullptr; + return loadInfo && loadInfo->GetServiceWorkerTaintingSynthesized(); } bool @@ -4085,9 +4081,9 @@ // Loop backwards because any non-elements, such as doctypes and PIs // are likely to appear before the root element. - uint32_t i; - for (i = mChildren.ChildCount(); i > 0; --i) { - if (Element* element = Element::FromNode(mChildren.ChildAt(i - 1))) { + for (nsIContent* child = GetLastChild(); child; + child = child->GetPreviousSibling()) { + if (Element* element = Element::FromNode(child)) { const_cast(this)->mCachedRootElement = element; return element; } @@ -4113,46 +4109,6 @@ return doInsertChildAt(aKid, index, aNotify, mChildren); } -nsresult -nsIDocument::InsertChildAt_Deprecated(nsIContent* aKid, - uint32_t aIndex, - bool aNotify) -{ - if (aKid->IsElement() && GetRootElement()) { - NS_WARNING("Inserting root element when we already have one"); - return NS_ERROR_DOM_HIERARCHY_REQUEST_ERR; - } - - return doInsertChildAt(aKid, aIndex, aNotify, mChildren); -} - -void -nsIDocument::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - nsCOMPtr oldKid = GetChildAt_Deprecated(aIndex); - if (!oldKid) { - return; - } - - if (oldKid->IsElement()) { - // Destroy the link map up front before we mess with the child list. - DestroyElementMaps(); - } - - // Preemptively clear mCachedRootElement, since we may be about to remove it - // from our child list, and we don't want to return this maybe-obsolete value - // from any GetRootElement() calls that happen inside of doRemoveChildAt(). - // (NOTE: for this to be useful, doRemoveChildAt() must NOT trigger any - // GetRootElement() calls until after it's removed the child from mChildren. - // Any call before that point would restore this soon-to-be-obsolete cached - // answer, and our clearing here would be fruitless.) - mCachedRootElement = nullptr; - doRemoveChildAt(aIndex, aNotify, oldKid, mChildren); - MOZ_ASSERT(mCachedRootElement != oldKid, - "Stale pointer in mCachedRootElement, after we tried to clear it " - "(maybe somebody called GetRootElement() too early?)"); -} - void nsIDocument::RemoveChildNode(nsIContent* aKid, bool aNotify) { @@ -4197,9 +4153,13 @@ // This is like |AddStyleSheetToStyleSets|, but for an agent sheet. if (nsIPresShell* shell = GetShell()) { // Note that prepending here is necessary to make sure that html.css etc. - // do not override Firefox OS/Mobile's content.css sheet. Maybe we should - // have an insertion point to match the order of + // does not override Firefox OS/Mobile's content.css sheet. + // + // Maybe we should have an insertion point to match the order of // nsDocumentViewer::CreateStyleSet though? + // + // FIXME(emilio): We probably should, randomly prepending stuff here is + // very prone to subtle bugs, behavior differences... shell->StyleSet()->PrependStyleSheet(SheetType::Agent, aSheet); shell->ApplicableStylesChanged(); } @@ -5398,6 +5358,12 @@ return nullptr; } + // We're about to insert random content here that will be rendered. We're + // going to need more than svg.css here... + if (IsSVGDocument()) { + AsSVGDocument()->EnsureNonSVGUserAgentStyleSheetsLoaded(); + } + nsAutoScriptBlocker scriptBlocker; nsCOMPtr container = shell->GetCanvasFrame() ->GetCustomContentContainer(); @@ -8125,10 +8091,18 @@ bool oldVal = mInUnlinkOrDeletion; mInUnlinkOrDeletion = true; - uint32_t i, count = mChildren.ChildCount(); - for (i = 0; i < count; ++i) { - mChildren.ChildAt(i)->DestroyContent(); + +#ifdef DEBUG + uint32_t oldChildCount = GetChildCount(); +#endif + + for (nsIContent* child = GetFirstChild(); child; + child = child->GetNextSibling()) { + child->DestroyContent(); + MOZ_ASSERT(child->GetParentNode() == this); } + MOZ_ASSERT(oldChildCount == GetChildCount()); + mInUnlinkOrDeletion = oldVal; mLayoutHistoryState = nullptr; @@ -8148,9 +8122,9 @@ mRemovedFromDocShell = true; EnumerateActivityObservers(NotifyActivityChanged, nullptr); - uint32_t i, count = mChildren.ChildCount(); - for (i = 0; i < count; ++i) { - mChildren.ChildAt(i)->SaveSubtreeState(); + for (nsIContent* child = GetFirstChild(); child; + child = child->GetNextSibling()) { + child->SaveSubtreeState(); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsFocusManager.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsFocusManager.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsFocusManager.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsFocusManager.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -3486,10 +3486,11 @@ } } - // If aStartContent is not in scope owned by aRootContent - // (e.g., aStartContent is already in shadow DOM), + // If aStartContent is not in a scope owned by the root element + // (i.e. aStartContent is already in shadow DOM), // search from scope including aStartContent - if (aRootContent != FindOwner(aStartContent)) { + nsIContent* rootElement = aRootContent->OwnerDoc()->GetRootElement(); + if (rootElement != FindOwner(aStartContent)) { nsIContent* contentToFocus = GetNextTabbableContentInAncestorScopes(&aStartContent, aOriginalStartContent, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsGlobalWindowOuter.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsGlobalWindowOuter.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsGlobalWindowOuter.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsGlobalWindowOuter.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -6691,35 +6691,12 @@ const nsAString& aPseudoElt, bool aDefaultStylesOnly) { - if (!mDocShell) { + if (!mDoc) { return nullptr; } - nsCOMPtr presShell = mDocShell->GetPresShell(); - - if (!presShell) { - // Try flushing frames on our parent in case there's a pending - // style change that will create the presshell. - auto* parent = nsGlobalWindowOuter::Cast(GetPrivateParent()); - if (!parent) { - return nullptr; - } - - parent->FlushPendingNotifications(FlushType::Frames); - - // Might have killed mDocShell - if (!mDocShell) { - return nullptr; - } - - presShell = mDocShell->GetPresShell(); - if (!presShell) { - return nullptr; - } - } - RefPtr compStyle = - NS_NewComputedDOMStyle(&aElt, aPseudoElt, presShell, + NS_NewComputedDOMStyle(&aElt, aPseudoElt, mDoc, aDefaultStylesOnly ? nsComputedDOMStyle::eDefaultOnly : nsComputedDOMStyle::eAll); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsIDocument.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsIDocument.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsIDocument.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsIDocument.h 2018-06-20 17:29:03.000000000 +0000 @@ -548,9 +548,6 @@ nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) final; void RemoveChildNode(nsIContent* aKid, bool aNotify) final; nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode **aResult, @@ -4594,13 +4591,29 @@ return OwnerDoc(); } +// ShouldUseXBLScope is defined here as a template so that we can get the faster +// version of IsInAnonymousSubtree if we're statically known to be an +// nsIContent. we could try defining ShouldUseXBLScope separately on nsINode +// and nsIContent, but then we couldn't put its nsINode implementation here +// (because this header does not include nsIContent) and we can't put it in +// nsIContent.h, because the definition of nsIContent::IsInAnonymousSubtree is +// in nsIContentInlines.h. And then we get include hell from people trying to +// call nsINode::GetParentObject but not including nsIContentInlines.h and with +// no really good way to include it. +template +inline bool ShouldUseXBLScope(const T* aNode) +{ + return aNode->IsInAnonymousSubtree() && + !aNode->IsAnonymousContentInSVGUseSubtree(); +} + inline mozilla::dom::ParentObject nsINode::GetParentObject() const { mozilla::dom::ParentObject p(OwnerDoc()); // Note that mUseXBLScope is a no-op for chrome, and other places where we // don't use XBL scopes. - p.mUseXBLScope = IsInAnonymousSubtree() && !IsAnonymousContentInSVGUseSubtree(); + p.mUseXBLScope = ShouldUseXBLScope(this); return p; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsINode.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsINode.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsINode.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsINode.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -33,6 +33,7 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/PromiseNativeHandler.h" #include "mozilla/dom/ShadowRoot.h" +#include "mozilla/dom/ScriptSettings.h" #include "nsAttrValueOrString.h" #include "nsBindingManager.h" #include "nsCCUncollectableMarker.h" @@ -532,7 +533,7 @@ nsINode* nsINode::RemoveChild(nsINode& aOldChild, ErrorResult& aError) { - if (IsCharacterData()) { + if (!aOldChild.IsContent()) { // aOldChild can't be one of our children. aError.Throw(NS_ERROR_DOM_NOT_FOUND_ERR); return nullptr; @@ -542,14 +543,16 @@ nsContentUtils::MaybeFireNodeRemoved(&aOldChild, this); } - int32_t index = ComputeIndexOf(&aOldChild); - if (index == -1) { + // Check again, we may not be the child's parent anymore. + // Can be triggered by dom/base/crashtests/293388-1.html + if (aOldChild.AsContent()->IsRootOfAnonymousSubtree() || + aOldChild.GetParentNode() != this) { // aOldChild isn't one of our children. aError.Throw(NS_ERROR_DOM_NOT_FOUND_ERR); return nullptr; } - RemoveChildAt_Deprecated(index, true); + RemoveChildNode(aOldChild.AsContent(), true); return &aOldChild; } @@ -639,7 +642,7 @@ "Should always have a parent unless " "mutation events messed us up"); if (parent) { - parent->RemoveChildAt_Deprecated(parent->ComputeIndexOf(node), true); + parent->RemoveChildNode(node, true); } } } @@ -1299,6 +1302,49 @@ } } +static nsresult +ReparentWrappersInSubtree(nsIContent* aRoot) +{ + MOZ_ASSERT(ShouldUseXBLScope(aRoot)); + // Start off with no global so we don't fire any error events on failure. + AutoJSAPI jsapi; + jsapi.Init(); + + JSContext* cx = jsapi.cx(); + + nsIGlobalObject* docGlobal = aRoot->OwnerDoc()->GetScopeObject(); + if (NS_WARN_IF(!docGlobal)) { + return NS_ERROR_UNEXPECTED; + } + + JS::Rooted rootedGlobal(cx, docGlobal->GetGlobalJSObject()); + if (NS_WARN_IF(!rootedGlobal)) { + return NS_ERROR_UNEXPECTED; + } + + rootedGlobal = xpc::GetXBLScope(cx, rootedGlobal); + + ErrorResult rv; + JS::Rooted reflector(cx); + for (nsIContent* cur = aRoot; cur; cur = cur->GetNextNode(aRoot)) { + if ((reflector = cur->GetWrapper())) { + JSAutoRealm ar(cx, reflector); + ReparentWrapper(cx, reflector, rv); + rv.WouldReportJSException(); + if (rv.Failed()) { + // We _could_ consider BlastSubtreeToPieces here, but it's not really + // needed. Having some nodes in here accessible to content while others + // are not is probably OK. We just need to fail out of the actual + // insertion, so they're not in the DOM. Returning a failure here will + // do that. + return rv.StealNSResult(); + } + } + } + + return NS_OK; +} + nsresult nsINode::doInsertChildAt(nsIContent* aKid, uint32_t aIndex, bool aNotify, nsAttrAndChildArray& aChildArray) @@ -1350,9 +1396,15 @@ nsIContent* parent = IsContent() ? AsContent() : nullptr; + bool wasInXBLScope = ShouldUseXBLScope(aKid); rv = aKid->BindToTree(doc, parent, parent ? parent->GetBindingParent() : nullptr, true); + if (NS_SUCCEEDED(rv) && !wasInXBLScope && ShouldUseXBLScope(aKid)) { + MOZ_ASSERT(ShouldUseXBLScope(this), + "Why does the kid need to use an XBL scope?"); + rv = ReparentWrappersInSubtree(aKid); + } if (NS_FAILED(rv)) { if (GetFirstChild() == aKid) { mFirstChild = aKid->GetNextSibling(); @@ -1947,11 +1999,12 @@ } // Record the node to insert before, if any - nsINode* nodeToInsertBefore; + nsIContent* nodeToInsertBefore; if (aReplace) { nodeToInsertBefore = aRefChild->GetNextSibling(); } else { - nodeToInsertBefore = aRefChild; + // Since aRefChild is our child, it must be an nsIContent object. + nodeToInsertBefore = aRefChild ? aRefChild->AsContent() : nullptr; } if (nodeToInsertBefore == aNewChild) { // We're going to remove aNewChild from its parent, so use its next sibling @@ -1965,14 +2018,6 @@ nsIContent* newContent = aNewChild->AsContent(); nsCOMPtr oldParent = newContent->GetParentNode(); if (oldParent) { - int32_t removeIndex = oldParent->ComputeIndexOf(newContent); - if (removeIndex < 0) { - // newContent is anonymous. We can't deal with this, so just bail - NS_ERROR("How come our flags didn't catch this?"); - aError.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR); - return nullptr; - } - // Hold a strong ref to nodeToInsertBefore across the removal of newContent nsCOMPtr kungFuDeathGrip = nodeToInsertBefore; @@ -1984,11 +2029,14 @@ { mozAutoDocUpdate batch(newContent->GetComposedDoc(), true); nsAutoMutationBatch mb(oldParent, true, true); - oldParent->RemoveChildAt_Deprecated(removeIndex, true); + // ScriptBlocker ensures previous and next stay alive. + nsIContent* previous = aNewChild->GetPreviousSibling(); + nsIContent* next = aNewChild->GetNextSibling(); + oldParent->RemoveChildNode(aNewChild->AsContent(), true); if (nsAutoMutationBatch::GetCurrentBatch() == &mb) { mb.RemovalDone(); - mb.SetPrevSibling(oldParent->GetChildAt_Deprecated(removeIndex - 1)); - mb.SetNextSibling(oldParent->GetChildAt_Deprecated(removeIndex)); + mb.SetPrevSibling(previous); + mb.SetNextSibling(next); } } @@ -2027,7 +2075,7 @@ if (aReplace) { nodeToInsertBefore = aRefChild->GetNextSibling(); } else { - nodeToInsertBefore = aRefChild; + nodeToInsertBefore = aRefChild ? aRefChild->AsContent() : nullptr; } } } @@ -2062,8 +2110,8 @@ mozAutoDocUpdate batch(newContent->GetComposedDoc(), true); nsAutoMutationBatch mb(newContent, false, true); - for (uint32_t i = count; i > 0;) { - newContent->RemoveChildAt_Deprecated(--i, true); + while (newContent->HasChildren()) { + newContent->RemoveChildNode(newContent->GetLastChild(), true); } } @@ -2101,7 +2149,8 @@ if (aReplace) { nodeToInsertBefore = aRefChild->GetNextSibling(); } else { - nodeToInsertBefore = aRefChild; + // If aRefChild has 'this' as a parent, it must be an nsIContent. + nodeToInsertBefore = aRefChild ? aRefChild->AsContent() : nullptr; } // And verify that newContent is still allowed as our child. Sadly, we @@ -2132,23 +2181,6 @@ mozAutoDocUpdate batch(GetComposedDoc(), true); nsAutoMutationBatch mb; - // Figure out which index we want to insert at. Note that we use - // nodeToInsertBefore to determine this, because it's possible that - // aRefChild == aNewChild, in which case we just removed it from the - // parent list. - int32_t insPos; - if (nodeToInsertBefore) { - insPos = ComputeIndexOf(nodeToInsertBefore); - if (insPos < 0) { - // XXXbz How the heck would _that_ happen, exactly? - aError.Throw(NS_ERROR_DOM_NOT_FOUND_ERR); - return nullptr; - } - } - else { - insPos = GetChildCount(); - } - // If we're replacing and we haven't removed aRefChild yet, do so now if (aReplace && aRefChild != aNewChild) { mb.Init(this, true, true); @@ -2158,11 +2190,11 @@ NS_ASSERTION(aRefChild->GetNextSibling() == nodeToInsertBefore, "Unexpected nodeToInsertBefore"); - // An since nodeToInsertBefore is at index insPos, we want to remove - // at the previous index. - NS_ASSERTION(insPos >= 1, "insPos too small"); - RemoveChildAt_Deprecated(insPos-1, true); - --insPos; + nsIContent* toBeRemoved = nodeToInsertBefore ? + nodeToInsertBefore->GetPreviousSibling() : GetLastChild(); + MOZ_ASSERT(toBeRemoved); + + RemoveChildNode(toBeRemoved, true); } // Move new child over to our document if needed. Do this after removing @@ -2196,8 +2228,9 @@ nsAutoMutationBatch* mutationBatch = nsAutoMutationBatch::GetCurrentBatch(); if (mutationBatch) { mutationBatch->RemovalDone(); - mutationBatch->SetPrevSibling(GetChildAt_Deprecated(insPos - 1)); - mutationBatch->SetNextSibling(GetChildAt_Deprecated(insPos)); + mutationBatch->SetPrevSibling(nodeToInsertBefore ? + nodeToInsertBefore->GetPreviousSibling() : GetLastChild()); + mutationBatch->SetNextSibling(nodeToInsertBefore); } uint32_t count = fragChildren->Length(); @@ -2205,16 +2238,16 @@ return result; } - bool appending = !IsDocument() && uint32_t(insPos) == GetChildCount(); + bool appending = !IsDocument() && !nodeToInsertBefore; nsIContent* firstInsertedContent = fragChildren->ElementAt(0); // Iterate through the fragment's children, and insert them in the new // parent - for (uint32_t i = 0; i < count; ++i, ++insPos) { + for (uint32_t i = 0; i < count; ++i) { // XXXbz how come no reparenting here? That seems odd... // Insert the child. - aError = InsertChildAt_Deprecated(fragChildren->ElementAt(i), insPos, - !appending); + aError = InsertChildBefore(fragChildren->ElementAt(i), nodeToInsertBefore, + !appending); if (aError.Failed()) { // Make sure to notify on any children that we did succeed to insert if (appending && i != 0) { @@ -2250,13 +2283,13 @@ // We need to reparent here for nodes for which the parent of their // wrapper is not the wrapper for their ownerDocument (XUL elements, // form controls, ...). Also applies in the fragment code above. - if (nsAutoMutationBatch::GetCurrentBatch() == &mb) { mb.RemovalDone(); - mb.SetPrevSibling(GetChildAt_Deprecated(insPos - 1)); - mb.SetNextSibling(GetChildAt_Deprecated(insPos)); + mb.SetPrevSibling(nodeToInsertBefore ? + nodeToInsertBefore->GetPreviousSibling() : GetLastChild()); + mb.SetNextSibling(nodeToInsertBefore); } - aError = InsertChildAt_Deprecated(newContent, insPos, true); + aError = InsertChildBefore(newContent, nodeToInsertBefore, true); if (aError.Failed()) { return nullptr; } @@ -2490,6 +2523,9 @@ Element* nsINode::QuerySelector(const nsAString& aSelector, ErrorResult& aResult) { + AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING( + "nsINode::QuerySelector", DOM, aSelector); + const RawServoSelectorList* list = ParseSelectorList(aSelector, aResult); if (!list) { return nullptr; @@ -2502,6 +2538,9 @@ already_AddRefed nsINode::QuerySelectorAll(const nsAString& aSelector, ErrorResult& aResult) { + AUTO_PROFILER_LABEL_DYNAMIC_LOSSY_NSSTRING( + "nsINode::QuerySelectorAll", DOM, aSelector); + RefPtr contentList = new nsSimpleContentList(this); const RawServoSelectorList* list = ParseSelectorList(aSelector, aResult); if (!list) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsINode.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsINode.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsINode.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsINode.h 2018-06-20 17:29:03.000000000 +0000 @@ -822,29 +822,6 @@ bool aNotify) = 0; /** - * Insert a content node at a particular index. This method handles calling - * BindToTree on the child appropriately. - * - * @param aKid the content to insert - * @param aIndex the index it is being inserted at (the index it will have - * after it is inserted) - * @param aNotify whether to notify the document (current document for - * nsIContent, and |this| for nsIDocument) that the insert has - * occurred - * - * @throws NS_ERROR_DOM_HIERARCHY_REQUEST_ERR if one attempts to have more - * than one element node as a child of a document. Doing this will also - * assert -- you shouldn't be doing it! Check with - * nsIDocument::GetRootElement() first if you're not sure. Apart from this - * one constraint, this doesn't do any checking on whether aKid is a valid - * child of |this|. - * - * @throws NS_ERROR_OUT_OF_MEMORY in some cases (from BindToTree). - */ - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) = 0; - - /** * Append a content node to the end of the child list. This method handles * calling BindToTree on the child appropriately. * @@ -864,26 +841,10 @@ */ nsresult AppendChildTo(nsIContent* aKid, bool aNotify) { - return InsertChildAt_Deprecated(aKid, GetChildCount(), aNotify); + return InsertChildBefore(aKid, nullptr, aNotify); } /** - * NOTE: this function is going to be removed soon (hopefully!) Don't use it - * in new code. - * - * Remove a child from this node. This method handles calling UnbindFromTree - * on the child appropriately. - * - * @param aIndex the index of the child to remove - * @param aNotify whether to notify the document (current document for - * nsIContent, and |this| for nsIDocument) that the remove has - * occurred - * - * Note: If there is no child at aIndex, this method will simply do nothing. - */ - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) = 0; - - /** * Remove a child from this node. This method handles calling UnbindFromTree * on the child appropriately. * diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsJSEnvironment.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsJSEnvironment.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/nsJSEnvironment.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/nsJSEnvironment.cpp 2018-06-20 17:29:02.000000000 +0000 @@ -1281,7 +1281,9 @@ if (!aDeadline.IsNull()) { if (aDeadline < now) { // This slice overflowed the idle period. - idleDuration = aDeadline - startTimeStamp; + if (aDeadline > startTimeStamp) { + idleDuration = aDeadline - startTimeStamp; + } } else { idleDuration = duration; } @@ -2261,9 +2263,9 @@ nsString mMessage; public: - explicit NotifyGCEndRunnable(const nsString& aMessage) + explicit NotifyGCEndRunnable(nsString&& aMessage) : mozilla::Runnable("NotifyGCEndRunnable") - , mMessage(aMessage) + , mMessage(std::move(aMessage)) { } @@ -2321,7 +2323,7 @@ Telemetry::CanRecordExtended()) { nsString json; json.Adopt(aDesc.formatJSON(aCx, PR_Now())); - RefPtr notify = new NotifyGCEndRunnable(json); + RefPtr notify = new NotifyGCEndRunnable(std::move(json)); SystemGroup::Dispatch(TaskCategory::GarbageCollection, notify.forget()); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TabGroup.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TabGroup.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TabGroup.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TabGroup.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -9,6 +9,7 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/TabChild.h" #include "mozilla/dom/DocGroup.h" +#include "mozilla/dom/TimeoutManager.h" #include "mozilla/AbstractThread.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticPtr.h" @@ -23,6 +24,8 @@ static StaticRefPtr sChromeTabGroup; +LinkedList* TabGroup::sTabGroups = nullptr; + TabGroup::TabGroup(bool aIsChrome) : mLastWindowLeft(false) , mThrottledQueuesInitialized(false) @@ -31,6 +34,11 @@ , mIsChrome(aIsChrome) , mForegroundCount(0) { + if (!sTabGroups) { + sTabGroups = new LinkedList(); + } + sTabGroups->insertBack(this); + CreateEventTargets(/* aNeedValidation = */ !aIsChrome); // Do not throttle runnables from chrome windows. In theory we should @@ -54,6 +62,15 @@ MOZ_ASSERT(mDocGroups.IsEmpty()); MOZ_ASSERT(mWindows.IsEmpty()); MOZ_RELEASE_ASSERT(mLastWindowLeft || mIsChrome); + + LinkedListElement* listElement = + static_cast*>(this); + listElement->remove(); + + if (sTabGroups->isEmpty()) { + delete sTabGroups; + sTabGroups = nullptr; + } } void @@ -323,5 +340,37 @@ return count; } +/*static*/ bool +TabGroup::HasOnlyThrottableTabs() +{ + if (!sTabGroups) { + return false; + } + + for (TabGroup* tabGroup = sTabGroups->getFirst(); tabGroup; + tabGroup = + static_cast*>(tabGroup)->getNext()) { + for (auto iter = tabGroup->Iter(); !iter.Done(); iter.Next()) { + DocGroup* docGroup = iter.Get()->mDocGroup; + for (auto* documentInDocGroup : *docGroup) { + if (documentInDocGroup->IsCurrentActiveDocument()) { + nsPIDOMWindowInner* win = + documentInDocGroup->GetInnerWindow(); + if (win && win->IsCurrentInnerWindow()) { + nsPIDOMWindowOuter* outer = win->GetOuterWindow(); + if (outer) { + TimeoutManager& tm = win->TimeoutManager(); + if (!tm.BudgetThrottlingEnabled(outer->IsBackground())) { + return false; + } + } + } + } + } + } + } + return true; +} + } // namespace dom } // namespace mozilla diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TabGroup.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TabGroup.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TabGroup.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TabGroup.h 2018-06-20 17:29:03.000000000 +0000 @@ -46,7 +46,8 @@ class DocGroup; class TabChild; -class TabGroup final : public SchedulerGroup +class TabGroup final : public SchedulerGroup, + public LinkedListElement { private: class HashEntry : public nsCStringHashKey @@ -146,6 +147,16 @@ return mNumOfIndexedDBDatabases; } + static LinkedList* GetTabGroupList() + { + return sTabGroups; + } + + // This returns true if all the window objects in all the TabGroups are + // either inactive (for example in bfcache) or are in background tabs which + // can be throttled. + static bool HasOnlyThrottableTabs(); + private: virtual AbstractThread* AbstractMainThreadForImpl(TaskCategory aCategory) override; @@ -167,6 +178,8 @@ DocGroupMap mDocGroups; nsTArray mWindows; uint32_t mForegroundCount; + + static LinkedList* sTabGroups; }; } // namespace dom diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/chrome.ini firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/chrome.ini --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/chrome.ini 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/chrome.ini 2018-06-20 17:29:03.000000000 +0000 @@ -28,7 +28,6 @@ [test_fragment_sanitization.xul] [test_messagemanager_principal.html] [test_messagemanager_send_principal.html] -skip-if = buildapp == 'mulet' [test_mozbrowser_apis_allowed.html] [test_navigator_resolve_identity_xrays.xul] support-files = file_navigator_resolve_identity_xrays.xul diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/test_intersectionobservers.html firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/test_intersectionobservers.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/test_intersectionobservers.html 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/test_intersectionobservers.html 2018-06-20 17:29:02.000000000 +0000 @@ -56,21 +56,16 @@ } var callbacks = []; - function callDelayed(fn, delay) { - callbacks.push({ - fn: fn, - time: +new Date() + delay - }); + function callDelayed(fn) { + callbacks.push(fn); } requestAnimationFrame(function tick() { var i = callbacks.length; while (i--) { var cb = callbacks[i]; - if (+new Date() >= cb.time) { - SimpleTest.executeSoon(cb.fn); - callbacks.splice(i, 1); - } + SimpleTest.executeSoon(function() { SimpleTest.executeSoon(cb) }); + callbacks.splice(i, 1); } requestAnimationFrame(tick); }); @@ -333,7 +328,7 @@ callDelayed(function() { expect(spy.callCount).to.be(1); done(); - }, ASYNC_TIMEOUT); + }); }); @@ -348,7 +343,7 @@ callDelayed(function() { expect(spy.callCount).to.be(0); done(); - }, ASYNC_TIMEOUT); + }); }); it('triggers if target or root becomes invisible', @@ -485,7 +480,7 @@ callDelayed(function() { expect(spy.callCount).to.be(2); done(); - }, ASYNC_TIMEOUT); + }); }, function(done) { targetEl1.style.left = '-10px'; @@ -809,14 +804,14 @@ runSequence([ function(done) { io.observe(targetEl1); - callDelayed(done, 0); + callDelayed(done); }, function(done) { document.getElementById('fixtures').appendChild(rootEl); callDelayed(function() { expect(spy.callCount).to.be(1); done(); - }, ASYNC_TIMEOUT); + }); }, function(done) { parentEl.insertBefore(targetEl1, targetEl2); @@ -876,7 +871,7 @@ io.observe(targetEl3); callDelayed(function() { parentEl.scrollLeft = 40; - }, 0); + }); }); @@ -900,7 +895,7 @@ io.observe(targetEl1); callDelayed(function() { targetEl1.style.transform = 'translateX(-40px) translateY(-40px)'; - }, 0); + }); }); @@ -925,7 +920,7 @@ callDelayed(function () { expect(spy.callCount).to.be(1); done(); - }, ASYNC_TIMEOUT); + }); }); }); @@ -945,7 +940,7 @@ callDelayed(function() { expect(spy.callCount).to.be(0); done(); - }, ASYNC_TIMEOUT); + }); } targetEl4.src = "intersectionobserver_iframe.html"; @@ -1005,7 +1000,7 @@ expect(lastestRecords.length).to.be(1); expect(lastestRecords[0].intersectionRatio).to.be(1); done(); - }, ASYNC_TIMEOUT); + }); }); }); @@ -1056,7 +1051,7 @@ callDelayed(function() { expect(spy.callCount).to.be(2); done(); - }, ASYNC_TIMEOUT); + }); } ], done); @@ -1095,7 +1090,7 @@ callDelayed(function() { expect(spy.callCount).to.be(1); done(); - }, ASYNC_TIMEOUT); + }); } ], done); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/unit/test_chromeutils_base64.js firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/unit/test_chromeutils_base64.js --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/test/unit/test_chromeutils_base64.js 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/test/unit/test_chromeutils_base64.js 2018-06-20 17:29:04.000000000 +0000 @@ -75,9 +75,11 @@ if (paddedValue.length > input.length) { throws(_ => ChromeUtils.base64URLDecode(paddedValue, { padding: "reject" }), + /NS_ERROR_ILLEGAL_VALUE/, paddedValue + " with padding rejected should throw"); throws(_ => ChromeUtils.base64URLDecode(input, { padding: "require" }), + /NS_ERROR_ILLEGAL_VALUE/, input + " with padding required should throw"); buffer = ChromeUtils.base64URLDecode(paddedValue, { padding: "require" }); @@ -91,6 +93,7 @@ throws(_ => ChromeUtils.base64URLDecode("", {}), /TypeError/, "Decoding should require the padding option"); throws(_ => ChromeUtils.base64URLDecode("", { padding: "chocolate" }), + /TypeError/, "Decoding should throw for invalid padding policy"); for (let {decoded, encoded} of binaryTests) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TimeoutManager.h firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TimeoutManager.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/base/TimeoutManager.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/base/TimeoutManager.h 2018-06-20 17:29:03.000000000 +0000 @@ -111,6 +111,8 @@ nsIEventTarget* EventTarget(); + bool BudgetThrottlingEnabled(bool aIsBackground) const; + static const uint32_t InvalidFiringId; private: @@ -149,8 +151,6 @@ void UpdateBudget(const TimeStamp& aNow, const TimeDuration& aDuration = TimeDuration()); - bool BudgetThrottlingEnabled(bool aIsBackground) const; - private: struct Timeouts { explicit Timeouts(const TimeoutManager& aManager) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/Bindings.conf firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/Bindings.conf --- firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/Bindings.conf 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/Bindings.conf 2018-06-20 17:29:03.000000000 +0000 @@ -173,16 +173,6 @@ 'headerFile': 'mozilla/css/GroupRule.h', }, -'CSSCounterStyleRule': { - 'nativeType': 'mozilla::ServoCounterStyleRule', - 'headerFile': 'mozilla/ServoCounterStyleRule.h', -}, - -'CSSFontFaceRule': { - 'nativeType': 'mozilla::ServoFontFaceRule', - 'headerFile': 'mozilla/ServoFontFaceRule.h', -}, - 'CSSGroupingRule': { 'concrete': False, 'nativeType': 'mozilla::css::GroupRule', diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/BindingUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/BindingUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/BindingUtils.cpp 2018-06-11 13:02:10.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/BindingUtils.cpp 2018-06-20 17:29:03.000000000 +0000 @@ -4010,23 +4010,19 @@ nsIDocument::DeprecatedOperations mOperation; public: - DeprecationWarningRunnable(WorkerPrivate* aWorkerPrivate, - nsIDocument::DeprecatedOperations aOperation) - : WorkerProxyToMainThreadRunnable(aWorkerPrivate) - , mOperation(aOperation) - { - MOZ_ASSERT(aWorkerPrivate); - aWorkerPrivate->AssertIsOnWorkerThread(); - } + explicit DeprecationWarningRunnable(nsIDocument::DeprecatedOperations aOperation) + : mOperation(aOperation) + {} private: void - RunOnMainThread() override + RunOnMainThread(WorkerPrivate* aWorkerPrivate) override { MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(aWorkerPrivate); // Walk up to our containing page - WorkerPrivate* wp = mWorkerPrivate; + WorkerPrivate* wp = aWorkerPrivate; while (wp->GetParent()) { wp = wp->GetParent(); } @@ -4038,7 +4034,7 @@ } void - RunBackOnWorkerThreadForCleanup() override + RunBackOnWorkerThreadForCleanup(WorkerPrivate* aWorkerPrivate) override {} }; @@ -4076,8 +4072,8 @@ } RefPtr runnable = - new DeprecationWarningRunnable(workerPrivate, aOperation); - runnable->Dispatch(); + new DeprecationWarningRunnable(aOperation); + runnable->Dispatch(workerPrivate); } namespace binding_detail { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/BindingUtils.h firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/BindingUtils.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/BindingUtils.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/BindingUtils.h 2018-06-20 17:29:02.000000000 +0000 @@ -3062,8 +3062,7 @@ } } - if (aInitStandardClasses && - !JS_InitStandardClasses(aCx, aGlobal)) { + if (aInitStandardClasses && !JS::InitRealmStandardClasses(aCx)) { NS_WARNING("Failed to init standard classes"); return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/ErrorResult.h firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/ErrorResult.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/ErrorResult.h 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/ErrorResult.h 2018-06-20 17:29:02.000000000 +0000 @@ -566,7 +566,7 @@ // reference, not by value. TErrorResult(const TErrorResult&) = delete; void operator=(const TErrorResult&) = delete; -}; +} JS_HAZ_ROOTED; struct JustAssertCleanupPolicy { static const bool assertHandled = true; @@ -838,7 +838,7 @@ // to SuppressException (one from us, one from the ErrorResult destructor // after asserting). binding_danger::TErrorResult mInner; -}; +} JS_HAZ_ROOTED; /****************************************************************************** ** Macros for checking results diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/test/test_dom_xrays.html firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/test/test_dom_xrays.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/bindings/test/test_dom_xrays.html 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/bindings/test/test_dom_xrays.html 2018-06-20 17:29:04.000000000 +0000 @@ -275,6 +275,14 @@ isnot(typeof Object.getOwnPropertyDescriptor(win.Node.prototype, "ELEMENT_NODE"), "undefined", "Should see constant property on prototype objects"); + // Adopting nodes should not lose expandos. + var elem = doc.createElement("span"); + elem.expando = 5; + is(elem.expando, 5, "We just set this property"); + document.adoptNode(elem); + is(elem.wrappedJSObject, undefined, "Shouldn't be an Xray anymore"); + is(elem.expando, 5, "Expando should not get lost"); + SimpleTest.finish(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/cache/test/mochitest/mochitest.ini firefox-trunk-62.0~a1~hg20180620r423058/dom/cache/test/mochitest/mochitest.ini --- firefox-trunk-62.0~a1~hg20180611r422292/dom/cache/test/mochitest/mochitest.ini 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/cache/test/mochitest/mochitest.ini 2018-06-20 17:29:02.000000000 +0000 @@ -46,7 +46,7 @@ [test_cache_orphaned_body.html] scheme=https [test_cache_padding.html] -skip-if = verify +skip-if = verify || os == 'android' # bug 1468434 for android [test_cache_untrusted.html] [test_cache_updateUsage.html] [test_chrome_constructor.html] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/ImageBitmap.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/ImageBitmap.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/ImageBitmap.cpp 2018-06-11 13:02:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/ImageBitmap.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -12,6 +12,7 @@ #include "mozilla/dom/Promise.h" #include "mozilla/dom/StructuredCloneTags.h" #include "mozilla/dom/WorkerPrivate.h" +#include "mozilla/dom/WorkerRef.h" #include "mozilla/dom/WorkerRunnable.h" #include "mozilla/gfx/2D.h" #include "mozilla/gfx/Swizzle.h" @@ -1219,7 +1220,6 @@ } class CreateImageBitmapFromBlobRunnable; -class CreateImageBitmapFromBlobHolder; class CreateImageBitmapFromBlob final : public CancelableRunnable , public imgIContainerCallback @@ -1249,7 +1249,7 @@ return NS_OK; } - // Called by the WorkerHolder. + // Called by the WorkerRef. void WorkerShuttingDown(); private: @@ -1301,7 +1301,7 @@ // The access to this object is protected by mutex but is always nullified on // the owning thread. - UniquePtr mWorkerHolder; + RefPtr mWorkerRef; // Touched only on the owning thread. RefPtr mPromise; @@ -1348,39 +1348,6 @@ nsresult mStatus; }; -// This class keeps the worker alive and it informs CreateImageBitmapFromBlob -// when it goes away. -class CreateImageBitmapFromBlobHolder final : public WorkerHolder -{ -public: - CreateImageBitmapFromBlobHolder(WorkerPrivate* aWorkerPrivate, - CreateImageBitmapFromBlob* aTask) - : WorkerHolder("CreateImageBitmapFromBlobHolder") - , mWorkerPrivate(aWorkerPrivate) - , mTask(aTask) - , mNotified(false) - {} - - bool Notify(WorkerStatus aStatus) override - { - if (!mNotified) { - mNotified = true; - mTask->WorkerShuttingDown(); - } - return true; - } - - WorkerPrivate* GetWorkerPrivate() const - { - return mWorkerPrivate; - } - -private: - WorkerPrivate* mWorkerPrivate; - RefPtr mTask; - bool mNotified; -}; - static void AsyncCreateImageBitmapFromBlob(Promise* aPromise, nsIGlobalObject* aGlobal, Blob& aBlob, const Maybe& aCropRect) @@ -2204,19 +2171,21 @@ return task.forget(); } - // Let's use a WorkerHolder to keep the worker alive if this is not the + // Let's use a WorkerRef to keep the worker alive if this is not the // main-thread. WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); MOZ_ASSERT(workerPrivate); - UniquePtr holder( - new CreateImageBitmapFromBlobHolder(workerPrivate, task)); - - if (!holder->HoldWorker(workerPrivate, Terminating)) { + RefPtr workerRef = + StrongWorkerRef::Create(workerPrivate, "CreateImageBitmapFromBlob", + [task]() { + task->WorkerShuttingDown(); + }); + if (NS_WARN_IF(!workerRef)) { return nullptr; } - task->mWorkerHolder = std::move(holder); + task->mWorkerRef = new ThreadSafeWorkerRef(workerRef); return task.forget(); } @@ -2339,13 +2308,13 @@ if (!IsCurrentThread()) { MutexAutoLock lock(mMutex); - if (!mWorkerHolder) { + if (!mWorkerRef) { // The worker is already gone. return; } RefPtr r = - new CreateImageBitmapFromBlobRunnable(mWorkerHolder->GetWorkerPrivate(), + new CreateImageBitmapFromBlobRunnable(mWorkerRef->Private(), this, aImage, aStatus); r->Dispatch(); return; @@ -2368,7 +2337,7 @@ // Let's release what has to be released on the owning thread. auto raii = MakeScopeExit([&] { // Doing this we also release the worker. - mWorkerHolder = nullptr; + mWorkerRef = nullptr; mPromise = nullptr; mGlobalObject = nullptr; @@ -2409,7 +2378,7 @@ MutexAutoLock lock(mMutex); // Let's release all the non-thread-safe objects now. - mWorkerHolder = nullptr; + mWorkerRef = nullptr; mPromise = nullptr; mGlobalObject = nullptr; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/test/webgl-conf/generated-mochitest.ini firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/test/webgl-conf/generated-mochitest.ini --- firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/test/webgl-conf/generated-mochitest.ini 2018-06-11 13:02:10.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/test/webgl-conf/generated-mochitest.ini 2018-06-20 17:29:05.000000000 +0000 @@ -4,7 +4,7 @@ [DEFAULT] subsuite = webgl -skip-if = (os == 'linux') && (buildapp == 'mulet') +skip-if = os == 'linux' support-files = always-fail.html checkout/00_test_list.txt diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/test/webgl-conf/mochitest-errata.ini firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/test/webgl-conf/mochitest-errata.ini --- firefox-trunk-62.0~a1~hg20180611r422292/dom/canvas/test/webgl-conf/mochitest-errata.ini 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/canvas/test/webgl-conf/mochitest-errata.ini 2018-06-20 17:29:06.000000000 +0000 @@ -23,8 +23,7 @@ [DEFAULT] subsuite = webgl -# Bug 1136181 disabled on Mulet for intermittent failures -skip-if = (os == 'linux') && (buildapp == 'mulet') +skip-if = os == 'linux' [generated/test_..__always-fail.html] fail-if = 1 @@ -199,7 +198,7 @@ [generated/test_conformance__misc__type-conversion-test.html] fail-if = (os == 'linux') # Resets device on Android 2.3. -# Crashes on desktop Linux, and Mulet Linux x64. +# Crashes on desktop Linux. skip-if = (os == 'android') || (os == 'linux') [generated/test_conformance__misc__object-deletion-behaviour.html] @@ -362,10 +361,9 @@ ######################################################################## # "tst-linux{32,64}-spot-NNN" Slaves: -# Android 2.3, Linux, and Mulet. +# Android 2.3 and Linux. # Android: os == 'android'. (Not enough info to separate out 2.3) # Linux: os == 'linux'. -# Mulet: buildapp == 'mulet'. [generated/test_conformance__glsl__bugs__temp-expressions-should-not-crash.html] # Coincidentally enough, crashes on Linux and Android 4.0. skip-if = (os == 'android') || (os == 'linux') diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/chrome-webidl/InspectorUtils.webidl firefox-trunk-62.0~a1~hg20180620r423058/dom/chrome-webidl/InspectorUtils.webidl --- firefox-trunk-62.0~a1~hg20180611r422292/dom/chrome-webidl/InspectorUtils.webidl 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/chrome-webidl/InspectorUtils.webidl 2018-06-20 17:29:04.000000000 +0000 @@ -20,7 +20,6 @@ unsigned long getRuleColumn(CSSRule rule); unsigned long getRelativeRuleLine(CSSRule rule); boolean hasRulesModifiedByCSSOM(CSSStyleSheet sheet); - [NewObject] CSSLexer getCSSLexer(DOMString text); unsigned long getSelectorCount(CSSStyleRule rule); [Throws] DOMString getSelectorText(CSSStyleRule rule, unsigned long selectorIndex); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/console/Console.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/console/Console.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/console/Console.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/console/Console.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -667,8 +667,7 @@ { public: explicit ConsoleWorkerRunnable(Console* aConsole) - : WorkerProxyToMainThreadRunnable(GetCurrentThreadWorkerPrivate()) - , mConsole(aConsole) + : mConsole(aConsole) {} ~ConsoleWorkerRunnable() override = default; @@ -676,14 +675,15 @@ bool Dispatch(JSContext* aCx) { - mWorkerPrivate->AssertIsOnWorkerThread(); + WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); + MOZ_ASSERT(workerPrivate); if (NS_WARN_IF(!PreDispatch(aCx))) { - RunBackOnWorkerThreadForCleanup(); + RunBackOnWorkerThreadForCleanup(workerPrivate); return false; } - if (NS_WARN_IF(!WorkerProxyToMainThreadRunnable::Dispatch())) { + if (NS_WARN_IF(!WorkerProxyToMainThreadRunnable::Dispatch(workerPrivate))) { // RunBackOnWorkerThreadForCleanup() will be called by // WorkerProxyToMainThreadRunnable::Dispatch(). return false; @@ -694,27 +694,29 @@ protected: void - RunOnMainThread() override + RunOnMainThread(WorkerPrivate* aWorkerPrivate) override { + MOZ_ASSERT(aWorkerPrivate); AssertIsOnMainThread(); // Walk up to our containing page - WorkerPrivate* wp = mWorkerPrivate; + WorkerPrivate* wp = aWorkerPrivate; while (wp->GetParent()) { wp = wp->GetParent(); } nsPIDOMWindowInner* window = wp->GetWindow(); if (!window) { - RunWindowless(); + RunWindowless(aWorkerPrivate); } else { - RunWithWindow(window); + RunWithWindow(aWorkerPrivate, window); } } void - RunWithWindow(nsPIDOMWindowInner* aWindow) + RunWithWindow(WorkerPrivate* aWorkerPrivate, nsPIDOMWindowInner* aWindow) { + MOZ_ASSERT(aWorkerPrivate); AssertIsOnMainThread(); AutoJSAPI jsapi; @@ -730,15 +732,16 @@ return; } - RunConsole(jsapi.cx(), outerWindow, aWindow); + RunConsole(jsapi.cx(), aWorkerPrivate, outerWindow, aWindow); } void - RunWindowless() + RunWindowless(WorkerPrivate* aWorkerPrivate) { + MOZ_ASSERT(aWorkerPrivate); AssertIsOnMainThread(); - WorkerPrivate* wp = mWorkerPrivate; + WorkerPrivate* wp = aWorkerPrivate; while (wp->GetParent()) { wp = wp->GetParent(); } @@ -761,13 +764,14 @@ JSAutoRealm ar(cx, global); - RunConsole(cx, nullptr, nullptr); + RunConsole(cx, aWorkerPrivate, nullptr, nullptr); } void - RunBackOnWorkerThreadForCleanup() override + RunBackOnWorkerThreadForCleanup(WorkerPrivate* aWorkerPrivate) override { - mWorkerPrivate->AssertIsOnWorkerThread(); + MOZ_ASSERT(aWorkerPrivate); + aWorkerPrivate->AssertIsOnWorkerThread(); ReleaseData(); mConsole = nullptr; } @@ -778,7 +782,8 @@ // This method is called in the main-thread. virtual void - RunConsole(JSContext* aCx, nsPIDOMWindowOuter* aOuterWindow, + RunConsole(JSContext* aCx, WorkerPrivate* aWorkerPrivate, + nsPIDOMWindowOuter* aOuterWindow, nsPIDOMWindowInner* aInnerWindow) = 0; // This method is called in the owning thread of the Console object. @@ -802,7 +807,6 @@ , mCallData(aCallData) { MOZ_ASSERT(aCallData); - mWorkerPrivate->AssertIsOnWorkerThread(); mCallData->AssertIsOnOwningThread(); // Marking this CallData as in use. @@ -822,9 +826,11 @@ } void - RunConsole(JSContext* aCx, nsPIDOMWindowOuter* aOuterWindow, + RunConsole(JSContext* aCx, WorkerPrivate* aWorkerPrivate, + nsPIDOMWindowOuter* aOuterWindow, nsPIDOMWindowInner* aInnerWindow) override { + MOZ_ASSERT(aWorkerPrivate); AssertIsOnMainThread(); // The windows have to run in parallel. @@ -840,13 +846,13 @@ nsString id = frame.mFilename; nsString innerID; - if (mWorkerPrivate->IsSharedWorker()) { + if (aWorkerPrivate->IsSharedWorker()) { innerID = NS_LITERAL_STRING("SharedWorker"); - } else if (mWorkerPrivate->IsServiceWorker()) { + } else if (aWorkerPrivate->IsServiceWorker()) { innerID = NS_LITERAL_STRING("ServiceWorker"); // Use scope as ID so the webconsole can decide if the message should // show up per tab - CopyASCIItoUTF16(mWorkerPrivate->ServiceWorkerScope(), id); + CopyASCIItoUTF16(aWorkerPrivate->ServiceWorkerScope(), id); } else { innerID = NS_LITERAL_STRING("Worker"); } @@ -961,7 +967,8 @@ } void - RunConsole(JSContext* aCx, nsPIDOMWindowOuter* aOuterWindow, + RunConsole(JSContext* aCx, WorkerPrivate* aWorkerPrivate, + nsPIDOMWindowOuter* aOuterWindow, nsPIDOMWindowInner* aInnerWindow) override { AssertIsOnMainThread(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/crypto/WebCryptoTask.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/crypto/WebCryptoTask.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/crypto/WebCryptoTask.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/crypto/WebCryptoTask.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -19,7 +19,7 @@ #include "mozilla/dom/WebCryptoCommon.h" #include "mozilla/dom/WebCryptoTask.h" #include "mozilla/dom/WebCryptoThreadPool.h" -#include "mozilla/dom/WorkerHolder.h" +#include "mozilla/dom/WorkerRef.h" #include "mozilla/dom/WorkerPrivate.h" // Template taken from security/nss/lib/util/templates.c @@ -135,47 +135,6 @@ JSContext* mCx; }; -class WebCryptoTask::InternalWorkerHolder final : public WorkerHolder -{ - InternalWorkerHolder() - : WorkerHolder("WebCryptoTask::InternalWorkerHolder") - { } - - ~InternalWorkerHolder() - { - NS_ASSERT_OWNINGTHREAD(InternalWorkerHolder); - // Nothing to do here since the parent destructor releases the - // worker automatically. - } - -public: - static already_AddRefed - Create() - { - MOZ_ASSERT(!NS_IsMainThread()); - WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); - MOZ_ASSERT(workerPrivate); - RefPtr ref = new InternalWorkerHolder(); - if (NS_WARN_IF(!ref->HoldWorker(workerPrivate, Canceling))) { - return nullptr; - } - return ref.forget(); - } - - virtual bool - Notify(WorkerStatus aStatus) override - { - NS_ASSERT_OWNINGTHREAD(InternalWorkerHolder); - // Do nothing here. Since WebCryptoTask dispatches back to - // the worker thread using nsThread::Dispatch() instead of - // WorkerRunnable it will always be able to execute its - // runnables. - return true; - } - - NS_INLINE_DECL_REFCOUNTING(WebCryptoTask::InternalWorkerHolder) -}; - template static nsresult GetAlgorithmName(JSContext* aCx, const OOS& aAlgorithm, nsString& aName) @@ -385,11 +344,15 @@ // private may get torn down before we dispatch back to complete // the transaction. if (!NS_IsMainThread()) { - mWorkerHolder = InternalWorkerHolder::Create(); - // If we can't register a holder then the worker is already - // shutting down. Don't start new work. - if (!mWorkerHolder) { + WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); + MOZ_ASSERT(workerPrivate); + + RefPtr workerRef = + StrongWorkerRef::Create(workerPrivate, "WebCryptoTask"); + if (NS_WARN_IF(!workerRef)) { mEarlyRv = NS_BINDING_ABORTED; + } else { + mWorkerRef = new ThreadSafeWorkerRef(workerRef); } } MAYBE_EARLY_FAIL(mEarlyRv); @@ -416,7 +379,7 @@ // Stop holding the worker thread alive now that the async work has // been completed. - mWorkerHolder = nullptr; + mWorkerRef = nullptr; return NS_OK; } @@ -440,7 +403,7 @@ mResultPromise->MaybeReject(aRv); // Manually release mResultPromise while we're on the main thread mResultPromise = nullptr; - mWorkerHolder = nullptr; + mWorkerRef = nullptr; Cleanup(); } @@ -3675,14 +3638,7 @@ { } -WebCryptoTask::~WebCryptoTask() -{ - if (mWorkerHolder) { - NS_ProxyRelease( - "WebCryptoTask::mWorkerHolder", - mOriginalEventTarget, mWorkerHolder.forget()); - } -} +WebCryptoTask::~WebCryptoTask() = default; } // namespace dom } // namespace mozilla diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/crypto/WebCryptoTask.h firefox-trunk-62.0~a1~hg20180620r423058/dom/crypto/WebCryptoTask.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/crypto/WebCryptoTask.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/crypto/WebCryptoTask.h 2018-06-20 17:29:06.000000000 +0000 @@ -17,6 +17,8 @@ namespace mozilla { namespace dom { +class ThreadSafeWorkerRef; + typedef ArrayBufferViewOrArrayBuffer CryptoOperationData; typedef ArrayBufferViewOrArrayBuffer KeyData; @@ -187,10 +189,8 @@ NS_IMETHOD Run() final; nsresult Cancel() final; - class InternalWorkerHolder; - nsCOMPtr mOriginalEventTarget; - RefPtr mWorkerHolder; + RefPtr mWorkerRef; nsresult mRv; }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/EventDispatcher.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/events/EventDispatcher.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/EventDispatcher.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/EventDispatcher.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -236,11 +236,13 @@ MOZ_ASSERT(aTouchEvent, "mRetargetedTouchTargets should be empty when dispatching non-touch events."); - WidgetTouchEvent::TouchArray& touches = aTouchEvent->mTouches; - MOZ_ASSERT(!touches.Length() || - touches.Length() == mRetargetedTouchTargets->Length()); - for (uint32_t i = 0; i < touches.Length(); ++i) { - touches[i]->mTarget = mRetargetedTouchTargets->ElementAt(i); + if (mRetargetedTouchTargets.isSome()) { + WidgetTouchEvent::TouchArray& touches = aTouchEvent->mTouches; + MOZ_ASSERT(!touches.Length() || + touches.Length() == mRetargetedTouchTargets->Length()); + for (uint32_t i = 0; i < touches.Length(); ++i) { + touches[i]->mTarget = mRetargetedTouchTargets->ElementAt(i); + } } if (aDOMEvent) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/EventStateManager.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/events/EventStateManager.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/EventStateManager.cpp 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/EventStateManager.cpp 2018-06-20 17:29:05.000000000 +0000 @@ -234,6 +234,8 @@ , mCurrentTarget(nullptr) // init d&d gesture state machine variables , mGestureDownPoint(0,0) + , mGestureModifiers(0) + , mGestureDownButtons(0) , mPresContext(nullptr) , mLClickCount(0) , mMClickCount(0) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/IMEContentObserver.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/events/IMEContentObserver.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/IMEContentObserver.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/IMEContentObserver.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -198,6 +198,7 @@ IMEContentObserver::IMEContentObserver() : mESM(nullptr) , mIMENotificationRequests(nullptr) + , mPreAttrChangeLength(0) , mSuppressNotifications(0) , mPreCharacterDataChangeLength(-1) , mSendingNotification(NOTIFY_IME_OF_NOTHING) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/test/pointerevents/mochitest.ini firefox-trunk-62.0~a1~hg20180620r423058/dom/events/test/pointerevents/mochitest.ini --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/test/pointerevents/mochitest.ini 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/test/pointerevents/mochitest.ini 2018-06-20 17:29:05.000000000 +0000 @@ -142,8 +142,6 @@ pointerevent_touch-action-pan-left-css_touch-manual.html pointerevent_touch-action-pan-right-css_touch-manual.html pointerevent_touch-action-pan-up-css_touch-manual.html - # bug 1429521 for webrender, bug 1432914 for why this isn't an inline comment - skip-if = webrender [test_trigger_fullscreen_by_pointer_events.html] support-files = file_test_trigger_fullscreen.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TextComposition.h firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TextComposition.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TextComposition.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TextComposition.h 2018-06-20 17:29:04.000000000 +0000 @@ -577,6 +577,7 @@ CompositionEventDispatcher() : Runnable("TextComposition::CompositionEventDispatcher") + , mEventMessage(eVoidEvent) , mIsSynthesizedEvent(false){}; }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TouchEvent.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TouchEvent.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TouchEvent.cpp 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TouchEvent.cpp 2018-06-20 17:29:05.000000000 +0000 @@ -222,6 +222,32 @@ // static bool +TouchEvent::PlatformSupportsTouch() +{ +#if defined(MOZ_WIDGET_ANDROID) + // Touch support is always enabled on android. + return true; +#elif defined(XP_WIN) || defined(MOZ_WIDGET_GTK) + static bool sDidCheckTouchDeviceSupport = false; + static bool sIsTouchDeviceSupportPresent = false; + // On Windows and GTK3 we auto-detect based on device support. + if (!sDidCheckTouchDeviceSupport) { + sDidCheckTouchDeviceSupport = true; + sIsTouchDeviceSupportPresent = WidgetUtils::IsTouchDeviceSupportPresent(); + // But touch events are only actually supported if APZ is enabled. If + // APZ is disabled globally, we can check that once and incorporate that + // into the cached state. If APZ is enabled, we need to further check + // based on the widget, which we do below (and don't cache that result). + sIsTouchDeviceSupportPresent &= gfxPlatform::AsyncPanZoomEnabled(); + } + return sIsTouchDeviceSupportPresent; +#else + return false; +#endif +} + +// static +bool TouchEvent::PrefEnabled(nsIDocShell* aDocShell) { static bool sPrefCached = false; @@ -244,23 +270,20 @@ enabled = false; } else { if (sPrefCacheValue == 2) { -#if defined(MOZ_WIDGET_ANDROID) - // Touch support is always enabled on B2G and android. - enabled = true; -#elif defined(XP_WIN) || defined(MOZ_WIDGET_GTK) - static bool sDidCheckTouchDeviceSupport = false; - static bool sIsTouchDeviceSupportPresent = false; - // On Windows and GTK3 we auto-detect based on device support. - if (!sDidCheckTouchDeviceSupport) { - sDidCheckTouchDeviceSupport = true; - sIsTouchDeviceSupportPresent = WidgetUtils::IsTouchDeviceSupportPresent(); - // But touch events are only actually supported if APZ is enabled. If - // APZ is disabled globally, we can check that once and incorporate that - // into the cached state. If APZ is enabled, we need to further check - // based on the widget, which we do below (and don't cache that result). - sIsTouchDeviceSupportPresent &= gfxPlatform::AsyncPanZoomEnabled(); + enabled = PlatformSupportsTouch(); + + static bool firstTime = true; + // The touch screen data seems to be inaccurate in the parent process, + // and we really need the crash annotation in child processes. + if (firstTime && !XRE_IsParentProcess()) { + CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("HasDeviceTouchScreen"), + enabled ? + NS_LITERAL_CSTRING("1") : + NS_LITERAL_CSTRING("0")); + firstTime = false; } - enabled = sIsTouchDeviceSupportPresent; + +#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) if (enabled && aDocShell) { // APZ might be disabled on this particular widget, in which case // TouchEvent support will also be disabled. Try to detect that. @@ -270,8 +293,6 @@ enabled &= pc->GetRootWidget()->AsyncPanZoomEnabled(); } } -#else - enabled = false; #endif } else { enabled = !!sPrefCacheValue; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TouchEvent.h firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TouchEvent.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/TouchEvent.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/TouchEvent.h 2018-06-20 17:29:04.000000000 +0000 @@ -128,6 +128,7 @@ TouchList* aTargetTouches, TouchList* aChangedTouches); + static bool PlatformSupportsTouch(); static bool PrefEnabled(JSContext* aCx, JSObject* aGlobal); static bool PrefEnabled(nsIDocShell* aDocShell); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/WheelHandlingHelper.h firefox-trunk-62.0~a1~hg20180620r423058/dom/events/WheelHandlingHelper.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/WheelHandlingHelper.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/WheelHandlingHelper.h 2018-06-20 17:29:06.000000000 +0000 @@ -280,6 +280,10 @@ */ explicit WheelDeltaHorizontalizer(WidgetWheelEvent& aWheelEvent) : mWheelEvent(aWheelEvent) + , mOldDeltaX(0.0) + , mOldDeltaZ(0.0) + , mOldOverflowDeltaX(0.0) + , mOldLineOrPageDeltaX(0) , mHorizontalized(false) { } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/events/XULCommandEvent.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/events/XULCommandEvent.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/events/XULCommandEvent.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/events/XULCommandEvent.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -16,6 +16,7 @@ : UIEvent(aOwner, aPresContext, aEvent ? aEvent : new WidgetInputEvent(false, eVoidEvent, nullptr)) + , mInputSource(0) { if (aEvent) { mEventIsInternal = false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BaseBlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BaseBlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BaseBlobImpl.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BaseBlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -102,6 +102,11 @@ return 0; } + size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const override + { + return GetAllocationSize(); + } + virtual uint64_t GetSerialNumber() const override { return mSerialNumber; } virtual already_AddRefed diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobImpl.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -52,6 +52,7 @@ virtual void GetType(nsAString& aType) = 0; virtual size_t GetAllocationSize() const = 0; + virtual size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const = 0; /** * An effectively-unique serial number identifying this instance of FileImpl. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobSet.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobSet.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobSet.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobSet.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -29,9 +29,7 @@ memcpy((char*)data, aData, aLength); RefPtr blobImpl = new MemoryBlobImpl(data, aLength, EmptyString()); - mBlobImpls.AppendElement(blobImpl); - - return NS_OK; + return AppendBlobImpl(blobImpl); } nsresult @@ -61,7 +59,9 @@ BlobSet::AppendBlobImpl(BlobImpl* aBlobImpl) { NS_ENSURE_ARG_POINTER(aBlobImpl); - mBlobImpls.AppendElement(aBlobImpl); + if (NS_WARN_IF(!mBlobImpls.AppendElement(aBlobImpl, fallible))) { + return NS_ERROR_OUT_OF_MEMORY; + } return NS_OK; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobSet.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobSet.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/BlobSet.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/BlobSet.h 2018-06-20 17:29:06.000000000 +0000 @@ -20,16 +20,16 @@ class BlobSet final { public: - nsresult AppendVoidPtr(const void* aData, uint32_t aLength); + MOZ_MUST_USE nsresult AppendVoidPtr(const void* aData, uint32_t aLength); - nsresult AppendString(const nsAString& aString, bool nativeEOL); + MOZ_MUST_USE nsresult AppendString(const nsAString& aString, bool nativeEOL); - nsresult AppendBlobImpl(BlobImpl* aBlobImpl); + MOZ_MUST_USE nsresult AppendBlobImpl(BlobImpl* aBlobImpl); - nsTArray>& GetBlobImpls() { return mBlobImpls; } + FallibleTArray>& GetBlobImpls() { return mBlobImpls; } private: - nsTArray> mBlobImpls; + FallibleTArray> mBlobImpls; }; } // namespace dom diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/ipc/IPCBlobUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/ipc/IPCBlobUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/ipc/IPCBlobUtils.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/ipc/IPCBlobUtils.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -61,12 +61,12 @@ RefPtr blobImpl; if (aIPCBlob.file().type() == IPCFileUnion::Tvoid_t) { - blobImpl = StreamBlobImpl::Create(inputStream, + blobImpl = StreamBlobImpl::Create(inputStream.forget(), aIPCBlob.type(), aIPCBlob.size()); } else { const IPCFile& file = aIPCBlob.file().get_IPCFile(); - blobImpl = StreamBlobImpl::Create(inputStream, + blobImpl = StreamBlobImpl::Create(inputStream.forget(), file.name(), aIPCBlob.type(), file.lastModified(), diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MemoryBlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MemoryBlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MemoryBlobImpl.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MemoryBlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -58,6 +58,11 @@ return mLength; } + size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const override + { + return GetAllocationSize(); + } + class DataOwner final : public mozilla::LinkedListElement { public: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MultipartBlobImpl.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MultipartBlobImpl.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MultipartBlobImpl.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MultipartBlobImpl.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -59,6 +59,18 @@ { *aStream = nullptr; + uint32_t length = mBlobImpls.Length(); + if (length == 0) { + aRv = NS_NewCStringInputStream(aStream, EmptyCString()); + return; + } + + if (length == 1) { + BlobImpl* blobImpl = mBlobImpls.ElementAt(0); + blobImpl->CreateInputStream(aStream, aRv); + return; + } + nsCOMPtr stream = do_CreateInstance("@mozilla.org/io/multiplex-input-stream;1"); if (NS_WARN_IF(!stream)) { @@ -67,7 +79,7 @@ } uint32_t i; - for (i = 0; i < mBlobImpls.Length(); i++) { + for (i = 0; i < length; i++) { nsCOMPtr scratchStream; BlobImpl* blobImpl = mBlobImpls.ElementAt(i).get(); @@ -182,7 +194,10 @@ if (data.IsBlob()) { RefPtr blob = data.GetAsBlob().get(); - blobSet.AppendBlobImpl(blob->Impl()); + aRv = blobSet.AppendBlobImpl(blob->Impl()); + if (aRv.Failed()) { + return; + } } else if (data.IsUSVString()) { @@ -383,7 +398,11 @@ } BlobSet blobSet; - blobSet.AppendBlobImpl(static_cast(blob.get())->Impl()); + rv = blobSet.AppendBlobImpl(static_cast(blob.get())->Impl()); + if (NS_WARN_IF(NS_FAILED(rv))) { + return rv; + } + mBlobImpls = blobSet.GetBlobImpls(); SetLengthAndModifiedDate(error); @@ -412,9 +431,30 @@ size_t MultipartBlobImpl::GetAllocationSize() const { + FallibleTArray visitedBlobs; + + // We want to report the unique blob allocation, avoiding duplicated blobs in + // the multipart blob tree. size_t total = 0; for (uint32_t i = 0; i < mBlobImpls.Length(); ++i) { - total += mBlobImpls[i]->GetAllocationSize(); + total += mBlobImpls[i]->GetAllocationSize(visitedBlobs); + } + + return total; +} + +size_t MultipartBlobImpl::GetAllocationSize(FallibleTArray& aVisitedBlobs) const +{ + FallibleTArray visitedBlobs; + + size_t total = 0; + for (BlobImpl* blobImpl : mBlobImpls) { + if (!aVisitedBlobs.Contains(blobImpl)) { + if (NS_WARN_IF(!aVisitedBlobs.AppendElement(blobImpl, fallible))) { + return 0; + } + total += blobImpl->GetAllocationSize(aVisitedBlobs); + } } return total; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MultipartBlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MultipartBlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/MultipartBlobImpl.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/MultipartBlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -93,6 +93,7 @@ virtual bool MayBeClonedToOtherThreads() const override; size_t GetAllocationSize() const override; + size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const override; protected: MultipartBlobImpl(nsTArray>&& aBlobImpls, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StreamBlobImpl.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StreamBlobImpl.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StreamBlobImpl.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StreamBlobImpl.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "EmptyBlobImpl.h" +#include "mozilla/InputStreamLengthWrapper.h" #include "mozilla/SlicedInputStream.h" #include "StreamBlobImpl.h" #include "nsStreamUtils.h" @@ -17,48 +18,52 @@ NS_IMPL_ISUPPORTS_INHERITED(StreamBlobImpl, BlobImpl, nsIMemoryReporter) /* static */ already_AddRefed -StreamBlobImpl::Create(nsIInputStream* aInputStream, +StreamBlobImpl::Create(already_AddRefed aInputStream, const nsAString& aContentType, uint64_t aLength) { + nsCOMPtr inputStream = std::move(aInputStream); + RefPtr blobImplStream = - new StreamBlobImpl(aInputStream, aContentType, aLength); + new StreamBlobImpl(inputStream.forget(), aContentType, aLength); blobImplStream->MaybeRegisterMemoryReporter(); return blobImplStream.forget(); } /* static */ already_AddRefed -StreamBlobImpl::Create(nsIInputStream* aInputStream, +StreamBlobImpl::Create(already_AddRefed aInputStream, const nsAString& aName, const nsAString& aContentType, int64_t aLastModifiedDate, uint64_t aLength) { + nsCOMPtr inputStream = std::move(aInputStream); + RefPtr blobImplStream = - new StreamBlobImpl(aInputStream, aName, aContentType, aLastModifiedDate, - aLength); + new StreamBlobImpl(inputStream.forget(), aName, aContentType, + aLastModifiedDate, aLength); blobImplStream->MaybeRegisterMemoryReporter(); return blobImplStream.forget(); } -StreamBlobImpl::StreamBlobImpl(nsIInputStream* aInputStream, +StreamBlobImpl::StreamBlobImpl(already_AddRefed aInputStream, const nsAString& aContentType, uint64_t aLength) : BaseBlobImpl(aContentType, aLength) - , mInputStream(aInputStream) + , mInputStream(std::move(aInputStream)) , mIsDirectory(false) , mFileId(-1) { mImmutable = true; } -StreamBlobImpl::StreamBlobImpl(nsIInputStream* aInputStream, +StreamBlobImpl::StreamBlobImpl(already_AddRefed aInputStream, const nsAString& aName, const nsAString& aContentType, int64_t aLastModifiedDate, uint64_t aLength) : BaseBlobImpl(aName, aContentType, aLength, aLastModifiedDate) - , mInputStream(aInputStream) + , mInputStream(std::move(aInputStream)) , mIsDirectory(false) , mFileId(-1) { @@ -86,7 +91,10 @@ mInputStream = replacementStream.forget(); } - clonedStream.forget(aStream); + nsCOMPtr wrappedStream = + InputStreamLengthWrapper::MaybeWrap(clonedStream.forget(), mLength); + + wrappedStream.forget(aStream); } already_AddRefed @@ -120,7 +128,7 @@ MOZ_ASSERT(clonedStream); RefPtr impl = - new StreamBlobImpl(clonedStream, aContentType, aLength); + new StreamBlobImpl(clonedStream.forget(), aContentType, aLength); return impl.forget(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StreamBlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StreamBlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StreamBlobImpl.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StreamBlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -23,12 +23,12 @@ NS_DECL_NSIMEMORYREPORTER static already_AddRefed - Create(nsIInputStream* aInputStream, + Create(already_AddRefed aInputStream, const nsAString& aContentType, uint64_t aLength); static already_AddRefed - Create(nsIInputStream* aInputStream, + Create(already_AddRefed aInputStream, const nsAString& aName, const nsAString& aContentType, int64_t aLastModifiedDate, @@ -79,12 +79,17 @@ size_t GetAllocationSize() const override; + size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const override + { + return GetAllocationSize(); + } + private: - StreamBlobImpl(nsIInputStream* aInputStream, + StreamBlobImpl(already_AddRefed aInputStream, const nsAString& aContentType, uint64_t aLength); - StreamBlobImpl(nsIInputStream* aInputStream, + StreamBlobImpl(already_AddRefed aInputStream, const nsAString& aName, const nsAString& aContentType, int64_t aLastModifiedDate, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StringBlobImpl.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StringBlobImpl.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/StringBlobImpl.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/StringBlobImpl.h 2018-06-20 17:29:06.000000000 +0000 @@ -37,6 +37,11 @@ return mData.Length(); } + size_t GetAllocationSize(FallibleTArray& aVisitedBlobImpls) const override + { + return GetAllocationSize(); + } + private: StringBlobImpl(const nsACString& aData, const nsAString& aContentType); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLChannel.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLChannel.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLChannel.cpp 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLChannel.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -0,0 +1,92 @@ +/* -*- 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/. */ + +#include "BlobURLChannel.h" + +using namespace mozilla::dom; + +BlobURLChannel::BlobURLChannel(nsIURI* aURI, + nsILoadInfo* aLoadInfo) + : mInitialized(false) +{ + SetURI(aURI); + SetOriginalURI(aURI); + SetLoadInfo(aLoadInfo); + + // If we're sandboxed, make sure to clear any owner the channel + // might already have. + if (aLoadInfo && aLoadInfo->GetLoadingSandboxed()) { + SetOwner(nullptr); + } +} + +BlobURLChannel::~BlobURLChannel() = default; + +void +BlobURLChannel::InitFailed() +{ + MOZ_ASSERT(!mInitialized); + MOZ_ASSERT(!mInputStream); + mInitialized = true; +} + +void +BlobURLChannel::Initialize(BlobImpl* aBlobImpl) +{ + MOZ_ASSERT(!mInitialized); + + nsAutoString contentType; + aBlobImpl->GetType(contentType); + SetContentType(NS_ConvertUTF16toUTF8(contentType)); + + if (aBlobImpl->IsFile()) { + nsString filename; + aBlobImpl->GetName(filename); + SetContentDispositionFilename(filename); + } + + ErrorResult rv; + uint64_t size = aBlobImpl->GetSize(rv); + if (NS_WARN_IF(rv.Failed())) { + InitFailed(); + return; + } + + SetContentLength(size); + + aBlobImpl->CreateInputStream(getter_AddRefs(mInputStream), rv); + if (NS_WARN_IF(rv.Failed())) { + InitFailed(); + return; + } + + MOZ_ASSERT(mInputStream); + mInitialized = true; +} + +nsresult +BlobURLChannel::OpenContentStream(bool aAsync, nsIInputStream** aResult, + nsIChannel** aChannel) +{ + MOZ_ASSERT(mInitialized); + + if (!mInputStream) { + return NS_ERROR_MALFORMED_URI; + } + + EnableSynthesizedProgressEvents(true); + + nsCOMPtr stream = mInputStream; + stream.forget(aResult); + + return NS_OK; +} + +void +BlobURLChannel::OnChannelDone() +{ + mInputStream = nullptr; +} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLChannel.h firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLChannel.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLChannel.h 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLChannel.h 2018-06-20 17:29:06.000000000 +0000 @@ -0,0 +1,53 @@ +/* -*- 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 mozilla_dom_BlobURLChannel_h +#define mozilla_dom_BlobURLChannel_h + +#include "nsBaseChannel.h" +#include "nsCOMPtr.h" +#include "nsIInputStream.h" + +class nsIURI; + +namespace mozilla { +namespace dom { + +class BlobImpl; + +class BlobURLChannel final : public nsBaseChannel +{ +public: + BlobURLChannel(nsIURI* aURI, nsILoadInfo* aLoadInfo); + + // This method is called when there is not a valid BlobImpl for this channel. + // This method will make ::OpenContentStream to return NS_ERROR_MALFORMED_URI. + void InitFailed(); + + // There is a valid BlobImpl for the channel. The blob's inputStream will be + // used when ::OpenContentStream is called. + void Initialize(BlobImpl* aBlobImpl); + +private: + ~BlobURLChannel(); + + nsresult OpenContentStream(bool aAsync, nsIInputStream** aResult, + nsIChannel** aChannel) override; + + void OnChannelDone() override; + + // If Initialize() is called, this will contain the blob's inputStream. + nsCOMPtr mInputStream; + + // This boolean is used to check that InitFailed() or Initialize() are called + // just once. + bool mInitialized; +}; + +} // dom namespace +} // mozilla namespace + +#endif /* mozilla_dom_BlobURLChannel_h */ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLProtocolHandler.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLProtocolHandler.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/BlobURLProtocolHandler.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/BlobURLProtocolHandler.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "BlobURLProtocolHandler.h" +#include "BlobURLChannel.h" #include "mozilla/dom/BlobURL.h" #include "mozilla/dom/ChromeUtils.h" @@ -841,29 +842,34 @@ } NS_IMETHODIMP -BlobURLProtocolHandler::NewChannel2(nsIURI* uri, +BlobURLProtocolHandler::NewChannel2(nsIURI* aURI, nsILoadInfo* aLoadInfo, - nsIChannel** result) + nsIChannel** aResult) { - *result = nullptr; + RefPtr channel = new BlobURLChannel(aURI, aLoadInfo); - DataInfo* info = GetDataInfoFromURI(uri, true /*aAlsoIfRevoked */); + auto raii = MakeScopeExit([&] { + channel->InitFailed(); + channel.forget(aResult); + }); + + DataInfo* info = GetDataInfoFromURI(aURI, true /*aAlsoIfRevoked */); if (!info || info->mObjectType != DataInfo::eBlobImpl || !info->mBlobImpl) { - return NS_ERROR_DOM_BAD_URI; + return NS_OK; } RefPtr blobImpl = info->mBlobImpl; - nsCOMPtr uriPrinc = do_QueryInterface(uri); + nsCOMPtr uriPrinc = do_QueryInterface(aURI); if (!uriPrinc) { - return NS_ERROR_DOM_BAD_URI; + return NS_OK; } nsCOMPtr principal; nsresult rv = uriPrinc->GetPrincipal(getter_AddRefs(principal)); - NS_ENSURE_SUCCESS(rv, rv); + NS_ENSURE_SUCCESS(rv, NS_OK); if (!principal) { - return NS_ERROR_DOM_BAD_URI; + return NS_OK; } MOZ_ASSERT(info->mPrincipal == principal); @@ -881,47 +887,13 @@ !nsContentUtils::IsSystemPrincipal(aLoadInfo->LoadingPrincipal()) && !ChromeUtils::IsOriginAttributesEqualIgnoringFPD(aLoadInfo->GetOriginAttributes(), BasePrincipal::Cast(principal)->OriginAttributesRef())) { - return NS_ERROR_DOM_BAD_URI; - } - - ErrorResult error; - nsCOMPtr stream; - blobImpl->CreateInputStream(getter_AddRefs(stream), error); - if (NS_WARN_IF(error.Failed())) { - return error.StealNSResult(); - } - - nsAutoString contentType; - blobImpl->GetType(contentType); - - nsCOMPtr channel; - rv = NS_NewInputStreamChannelInternal(getter_AddRefs(channel), - uri, - stream.forget(), - NS_ConvertUTF16toUTF8(contentType), - EmptyCString(), // aContentCharset - aLoadInfo); - if (NS_WARN_IF(NS_FAILED(rv))) { - return rv; - } - - if (blobImpl->IsFile()) { - nsString filename; - blobImpl->GetName(filename); - channel->SetContentDispositionFilename(filename); - } - - uint64_t size = blobImpl->GetSize(error); - if (NS_WARN_IF(error.Failed())) { - return error.StealNSResult(); + return NS_OK; } - channel->SetOriginalURI(uri); - channel->SetContentType(NS_ConvertUTF16toUTF8(contentType)); - channel->SetContentLength(size); - - channel.forget(result); + raii.release(); + channel->Initialize(blobImpl); + channel.forget(aResult); return NS_OK; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/moz.build firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/moz.build --- firefox-trunk-62.0~a1~hg20180611r422292/dom/file/uri/moz.build 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/file/uri/moz.build 2018-06-20 17:29:04.000000000 +0000 @@ -15,12 +15,14 @@ UNIFIED_SOURCES += [ 'BlobURL.cpp', + 'BlobURLChannel.cpp', 'BlobURLProtocolHandler.cpp', 'FontTableURIProtocolHandler.cpp', ] LOCAL_INCLUDES += [ '/dom/file', + '/netwerk/base', ] include('/ipc/chromium/chromium-config.mozbuild') diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/filesystem/FileSystemTaskBase.h firefox-trunk-62.0~a1~hg20180620r423058/dom/filesystem/FileSystemTaskBase.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/filesystem/FileSystemTaskBase.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/filesystem/FileSystemTaskBase.h 2018-06-20 17:29:06.000000000 +0000 @@ -188,6 +188,7 @@ public: FileSystemTaskParentBase() : Runnable("FileSystemTaskParentBase") + , mErrorValue(NS_ERROR_NOT_INITIALIZED) {} /* diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLFieldSetElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLFieldSetElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLFieldSetElement.cpp 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLFieldSetElement.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -171,64 +171,6 @@ return rv; } -nsresult -HTMLFieldSetElement::InsertChildAt_Deprecated(nsIContent* aChild, - uint32_t aIndex, - bool aNotify) -{ - bool firstLegendHasChanged = false; - - if (aChild->IsHTMLElement(nsGkAtoms::legend)) { - if (!mFirstLegend) { - mFirstLegend = aChild; - // We do not want to notify the first time mFirstElement is set. - } else { - // If mFirstLegend is before aIndex, we do not change it. - // Otherwise, mFirstLegend is now aChild. - if (int32_t(aIndex) <= ComputeIndexOf(mFirstLegend)) { - mFirstLegend = aChild; - firstLegendHasChanged = true; - } - } - } - - nsresult rv = - nsGenericHTMLFormElement::InsertChildAt_Deprecated(aChild, aIndex, aNotify); - NS_ENSURE_SUCCESS(rv, rv); - - if (firstLegendHasChanged) { - NotifyElementsForFirstLegendChange(aNotify); - } - - return rv; -} - -void -HTMLFieldSetElement::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - bool firstLegendHasChanged = false; - - if (mFirstLegend && (GetChildAt_Deprecated(aIndex) == mFirstLegend)) { - // If we are removing the first legend we have to found another one. - nsIContent* child = mFirstLegend->GetNextSibling(); - mFirstLegend = nullptr; - firstLegendHasChanged = true; - - for (; child; child = child->GetNextSibling()) { - if (child->IsHTMLElement(nsGkAtoms::legend)) { - mFirstLegend = child; - break; - } - } - } - - nsGenericHTMLFormElement::RemoveChildAt_Deprecated(aIndex, aNotify); - - if (firstLegendHasChanged) { - NotifyElementsForFirstLegendChange(aNotify); - } -} - void HTMLFieldSetElement::RemoveChildNode(nsIContent* aKid, bool aNotify) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLFieldSetElement.h firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLFieldSetElement.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLFieldSetElement.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLFieldSetElement.h 2018-06-20 17:29:06.000000000 +0000 @@ -42,9 +42,6 @@ virtual nsresult InsertChildBefore(nsIContent* aChild, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aChild, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; // nsIFormControl diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLOptGroupElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLOptGroupElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLOptGroupElement.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLOptGroupElement.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -86,28 +86,6 @@ return rv; } -nsresult -HTMLOptGroupElement::InsertChildAt_Deprecated(nsIContent* aKid, - uint32_t aIndex, - bool aNotify) -{ - SafeOptionListMutation safeMutation(GetSelect(), this, aKid, aIndex, aNotify); - nsresult rv = nsGenericHTMLElement::InsertChildAt_Deprecated(aKid, aIndex, - aNotify); - if (NS_FAILED(rv)) { - safeMutation.MutationFailed(); - } - return rv; -} - -void -HTMLOptGroupElement::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - SafeOptionListMutation safeMutation(GetSelect(), this, nullptr, aIndex, - aNotify); - nsGenericHTMLElement::RemoveChildAt_Deprecated(aIndex, aNotify); -} - void HTMLOptGroupElement::RemoveChildNode(nsIContent* aKid, bool aNotify) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLOptGroupElement.h firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLOptGroupElement.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLOptGroupElement.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLOptGroupElement.h 2018-06-20 17:29:06.000000000 +0000 @@ -28,9 +28,6 @@ // nsINode virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; // nsIContent diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLPictureElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLPictureElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLPictureElement.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLPictureElement.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -31,32 +31,6 @@ NS_IMPL_ELEMENT_CLONE(HTMLPictureElement) void -HTMLPictureElement::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - nsCOMPtr child = GetChildAt_Deprecated(aIndex); - - if (child && child->IsHTMLElement(nsGkAtoms::img)) { - HTMLImageElement* img = HTMLImageElement::FromNode(child); - if (img) { - img->PictureSourceRemoved(child->AsContent()); - } - } else if (child && child->IsHTMLElement(nsGkAtoms::source)) { - // Find all img siblings after this to notify them of its demise - nsCOMPtr nextSibling = child->GetNextSibling(); - if (nextSibling && nextSibling->GetParentNode() == this) { - do { - HTMLImageElement* img = HTMLImageElement::FromNode(nextSibling); - if (img) { - img->PictureSourceRemoved(child->AsContent()); - } - } while ( (nextSibling = nextSibling->GetNextSibling()) ); - } - } - - nsGenericHTMLElement::RemoveChildAt_Deprecated(aIndex, aNotify); -} - -void HTMLPictureElement::RemoveChildNode(nsIContent* aKid, bool aNotify) { if (aKid && aKid->IsHTMLElement(nsGkAtoms::img)) { @@ -89,35 +63,6 @@ NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_TRUE(aKid, rv); - - if (aKid->IsHTMLElement(nsGkAtoms::img)) { - HTMLImageElement* img = HTMLImageElement::FromNode(aKid); - if (img) { - img->PictureSourceAdded(aKid->AsContent()); - } - } else if (aKid->IsHTMLElement(nsGkAtoms::source)) { - // Find all img siblings after this to notify them of its insertion - nsCOMPtr nextSibling = aKid->GetNextSibling(); - if (nextSibling && nextSibling->GetParentNode() == this) { - do { - HTMLImageElement* img = HTMLImageElement::FromNode(nextSibling); - if (img) { - img->PictureSourceAdded(aKid->AsContent()); - } - } while ( (nextSibling = nextSibling->GetNextSibling()) ); - } - } - - return rv; -} - -nsresult -HTMLPictureElement::InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, bool aNotify) -{ - nsresult rv = nsGenericHTMLElement::InsertChildAt_Deprecated(aKid, aIndex, aNotify); - - NS_ENSURE_SUCCESS(rv, rv); - NS_ENSURE_TRUE(aKid, rv); if (aKid->IsHTMLElement(nsGkAtoms::img)) { HTMLImageElement* img = HTMLImageElement::FromNode(aKid); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLPictureElement.h firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLPictureElement.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLPictureElement.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLPictureElement.h 2018-06-20 17:29:06.000000000 +0000 @@ -23,12 +23,9 @@ virtual nsresult Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult, bool aPreallocateChildren) const override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; protected: virtual ~HTMLPictureElement(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSelectElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSelectElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSelectElement.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSelectElement.cpp 2018-06-20 17:29:04.000000000 +0000 @@ -217,28 +217,6 @@ return rv; } -nsresult -HTMLSelectElement::InsertChildAt_Deprecated(nsIContent* aKid, - uint32_t aIndex, - bool aNotify) -{ - SafeOptionListMutation safeMutation(this, this, aKid, aIndex, aNotify); - nsresult rv = - nsGenericHTMLFormElementWithState::InsertChildAt_Deprecated(aKid, aIndex, - aNotify); - if (NS_FAILED(rv)) { - safeMutation.MutationFailed(); - } - return rv; -} - -void -HTMLSelectElement::RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) -{ - SafeOptionListMutation safeMutation(this, this, nullptr, aIndex, aNotify); - nsGenericHTMLFormElementWithState::RemoveChildAt_Deprecated(aIndex, aNotify); -} - void HTMLSelectElement::RemoveChildNode(nsIContent* aKid, bool aNotify) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSelectElement.h firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSelectElement.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSelectElement.h 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSelectElement.h 2018-06-20 17:29:06.000000000 +0000 @@ -247,9 +247,6 @@ virtual bool IsHTMLFocusable(bool aWithMouse, bool* aIsFocusable, int32_t* aTabIndex) override; virtual nsresult InsertChildBefore(nsIContent* aKid, nsIContent* aBeforeThis, bool aNotify) override; - virtual nsresult InsertChildAt_Deprecated(nsIContent* aKid, uint32_t aIndex, - bool aNotify) override; - virtual void RemoveChildAt_Deprecated(uint32_t aIndex, bool aNotify) override; virtual void RemoveChildNode(nsIContent* aKid, bool aNotify) override; // Overriden nsIFormControl methods diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSlotElement.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSlotElement.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/HTMLSlotElement.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/HTMLSlotElement.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -130,15 +130,15 @@ // If assignedNodes is empty, use children of slot as fallback content. if (assignedNodes.IsEmpty()) { - for (nsIContent* child = aSlot->AsContent()->GetFirstChild(); + for (nsIContent* child = aSlot->GetFirstChild(); child; child = child->GetNextSibling()) { if (!child->IsSlotable()) { continue; } - if (child->IsHTMLElement(nsGkAtoms::slot)) { - FlattenAssignedNodes(HTMLSlotElement::FromNode(child), aNodes); + if (auto* slot = HTMLSlotElement::FromNode(child)) { + FlattenAssignedNodes(slot, aNodes); } else { aNodes.AppendElement(child); } @@ -146,11 +146,9 @@ return; } - for (uint32_t i = 0; i < assignedNodes.Length(); i++) { - nsINode* assignedNode = assignedNodes[i]; - if (assignedNode->IsHTMLElement(nsGkAtoms::slot)) { - FlattenAssignedNodes( - HTMLSlotElement::FromNode(assignedNode->AsContent()), aNodes); + for (const RefPtr& assignedNode : assignedNodes) { + if (auto* slot = HTMLSlotElement::FromNode(assignedNode)) { + FlattenAssignedNodes(slot, aNodes); } else { aNodes.AppendElement(assignedNode); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/nsHTMLDocument.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/html/nsHTMLDocument.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/nsHTMLDocument.cpp 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/nsHTMLDocument.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -1068,6 +1068,24 @@ return nullptr; } pbChannel->SetPrivate(loadContext->UsePrivateBrowsing()); + + nsCOMPtr docHTTPChannel = + do_QueryInterface(GetChannel()); + if (docHTTPChannel) { + bool isTracking = docHTTPChannel->GetIsTrackingResource(); + if (isTracking) { + // If our document channel is from a tracking resource, we must + // override our channel's tracking status. + nsCOMPtr httpChannel = + do_QueryInterface(channel); + MOZ_ASSERT(httpChannel, "How come we're coming from an HTTP doc but " + "we don't have an HTTP channel here?"); + if (httpChannel) { + httpChannel->OverrideTrackingResource(isTracking); + } + } + } + return channel.forget(); } @@ -1355,13 +1373,46 @@ // The open occurred after the document finished loading. // So we reset the document and then reinitialize it. + nsCOMPtr curDocShell = GetDocShell(); + nsCOMPtr parent; + if (curDocShell) { + curDocShell->GetSameTypeParent(getter_AddRefs(parent)); + } + + // We are using the same technique as in nsDocShell to figure + // out the content policy type. If there is no same type parent, + // we know we are loading a new top level document. + nsContentPolicyType policyType; + if (!parent) { + policyType = nsIContentPolicy::TYPE_DOCUMENT; + } else { + Element* requestingElement = nullptr; + nsPIDOMWindowInner* window = GetInnerWindow(); + if (window) { + nsPIDOMWindowOuter* outer = + nsPIDOMWindowOuter::GetFromCurrentInner(window); + if (outer) { + nsGlobalWindowOuter* win = nsGlobalWindowOuter::Cast(outer); + requestingElement = win->AsOuter()->GetFrameElementInternal(); + } + } + if (requestingElement) { + policyType = requestingElement->IsHTMLElement(nsGkAtoms::iframe) ? + nsIContentPolicy::TYPE_INTERNAL_IFRAME : nsIContentPolicy::TYPE_INTERNAL_FRAME; + } else { + // If we have lost our frame element by now, just assume we're + // an iframe since that's more common. + policyType = nsIContentPolicy::TYPE_INTERNAL_IFRAME; + } + } + nsCOMPtr channel; nsCOMPtr group = do_QueryReferent(mDocumentLoadGroup); aError = NS_NewChannel(getter_AddRefs(channel), uri, callerDoc, nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL, - nsIContentPolicy::TYPE_OTHER, + policyType, nullptr, // PerformanceStorage group); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/html/reftests/reftest.list firefox-trunk-62.0~a1~hg20180620r423058/dom/html/reftests/reftest.list --- firefox-trunk-62.0~a1~hg20180611r422292/dom/html/reftests/reftest.list 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/html/reftests/reftest.list 2018-06-20 17:29:06.000000000 +0000 @@ -62,7 +62,7 @@ pref(permissions.default.image,2) HTTP == bug1196784-with-srcset.html bug1196784-no-srcset.html # Test video with rotation information can be rotated. -fails-if(webrender) == bug1228601-video-rotation-90.html bug1228601-video-rotated-ref.html +== bug1228601-video-rotation-90.html bug1228601-video-rotated-ref.html # Test that dynamically setting body margin attributes updates style appropriately == body-topmargin-dynamic.html body-topmargin-ref.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/FileSnapshot.h firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/FileSnapshot.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/FileSnapshot.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/FileSnapshot.h 2018-06-20 17:29:05.000000000 +0000 @@ -114,6 +114,12 @@ return mBlobImpl->GetAllocationSize(); } + size_t + GetAllocationSize(FallibleTArray& aVisitedBlobs) const override + { + return mBlobImpl->GetAllocationSize(aVisitedBlobs); + } + virtual uint64_t GetSerialNumber() const override { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBObjectStore.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBObjectStore.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBObjectStore.cpp 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBObjectStore.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -657,7 +657,8 @@ } else { nsCOMPtr stream(new WasmCompiledModuleStream(module)); - blobImpl = StreamBlobImpl::Create(stream, EmptyString(), UINT64_MAX); + blobImpl = StreamBlobImpl::Create(stream.forget(), EmptyString(), + UINT64_MAX); } RefPtr compiledBlob = Blob::Create(nullptr, blobImpl); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBTransaction.cpp firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBTransaction.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBTransaction.cpp 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBTransaction.cpp 2018-06-20 17:29:06.000000000 +0000 @@ -15,9 +15,10 @@ #include "mozilla/EventDispatcher.h" #include "mozilla/dom/DOMException.h" #include "mozilla/dom/DOMStringList.h" -#include "mozilla/dom/WorkerHolder.h" +#include "mozilla/dom/WorkerRef.h" #include "mozilla/dom/WorkerPrivate.h" #include "mozilla/ipc/BackgroundChild.h" +#include "mozilla/ScopeExit.h" #include "nsAutoPtr.h" #include "nsPIDOMWindow.h" #include "nsQueryObject.h" @@ -35,40 +36,6 @@ using namespace mozilla::dom::indexedDB; using namespace mozilla::ipc; -class IDBTransaction::WorkerHolder final : public mozilla::dom::WorkerHolder -{ - WorkerPrivate* mWorkerPrivate; - - // The IDBTransaction owns this object so we only need a weak reference back - // to it. - IDBTransaction* mTransaction; - -public: - WorkerHolder(WorkerPrivate* aWorkerPrivate, IDBTransaction* aTransaction) - : mozilla::dom::WorkerHolder("IDBTransaction::WorkerHolder") - , mWorkerPrivate(aWorkerPrivate) - , mTransaction(aTransaction) - { - MOZ_ASSERT(aWorkerPrivate); - MOZ_ASSERT(aTransaction); - aWorkerPrivate->AssertIsOnWorkerThread(); - aTransaction->AssertIsOnOwningThread(); - - MOZ_COUNT_CTOR(IDBTransaction::WorkerHolder); - } - - ~WorkerHolder() - { - mWorkerPrivate->AssertIsOnWorkerThread(); - - MOZ_COUNT_DTOR(IDBTransaction::WorkerHolder); - } - -private: - virtual bool - Notify(WorkerStatus aStatus) override; -}; - IDBTransaction::IDBTransaction(IDBDatabase* aDatabase, const nsTArray& aObjectStoreNames, Mode aMode) @@ -231,9 +198,17 @@ workerPrivate->AssertIsOnWorkerThread(); - nsAutoPtr workerHolder( - new WorkerHolder(workerPrivate, transaction)); - if (NS_WARN_IF(!workerHolder->HoldWorker(workerPrivate, Canceling))) { + RefPtr workerRef = + StrongWorkerRef::Create(workerPrivate, "IDBTransaction", + [transaction]() { + transaction->AssertIsOnOwningThread(); + if (!transaction->IsCommittingOrDone()) { + IDB_REPORT_INTERNAL_ERR(); + transaction->AbortInternal(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR, + nullptr); + } + }); + if (NS_WARN_IF(!workerRef)) { // Silence the destructor assertion if we never made this object live. #ifdef DEBUG MOZ_ASSERT(!transaction->mSentCommitOrAbort); @@ -242,7 +217,7 @@ return nullptr; } - transaction->mWorkerHolder = std::move(workerHolder); + transaction->mWorkerRef = std::move(workerRef); } nsCOMPtr runnable = do_QueryObject(transaction); @@ -820,8 +795,10 @@ mFiredCompleteOrAbort = true; #endif - // Make sure we drop the WorkerHolder when this function completes. - nsAutoPtr workerHolder = std::move(mWorkerHolder); + // Make sure we drop the WorkerRef when this function completes. + auto scopeExit = MakeScopeExit([&] { + mWorkerRef = nullptr; + }); RefPtr event; if (NS_SUCCEEDED(aResult)) { @@ -1070,27 +1047,5 @@ return NS_OK; } -bool -IDBTransaction:: -WorkerHolder::Notify(WorkerStatus aStatus) -{ - MOZ_ASSERT(mWorkerPrivate); - mWorkerPrivate->AssertIsOnWorkerThread(); - MOZ_ASSERT(aStatus > Running); - - if (mTransaction && aStatus > Terminating) { - mTransaction->AssertIsOnOwningThread(); - - RefPtr transaction = std::move(mTransaction); - - if (!transaction->IsCommittingOrDone()) { - IDB_REPORT_INTERNAL_ERR(); - transaction->AbortInternal(NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR, nullptr); - } - } - - return true; -} - } // namespace dom } // namespace mozilla diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBTransaction.h firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBTransaction.h --- firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/IDBTransaction.h 2018-06-11 13:02:11.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/IDBTransaction.h 2018-06-20 17:29:05.000000000 +0000 @@ -31,6 +31,7 @@ class IDBObjectStore; class IDBOpenDBRequest; class IDBRequest; +class StrongWorkerRef; namespace indexedDB { class BackgroundCursorChild; @@ -80,7 +81,7 @@ nsTArray mObjectStoreNames; nsTArray> mObjectStores; nsTArray> mDeletedObjectStores; - nsAutoPtr mWorkerHolder; + RefPtr mWorkerRef; // Tagged with mMode. If mMode is VERSION_CHANGE then mBackgroundActor will be // a BackgroundVersionChangeTransactionChild. Otherwise it will be a diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/test/browser_forgetThisSiteAdd.html firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/test/browser_forgetThisSiteAdd.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/indexedDB/test/browser_forgetThisSiteAdd.html 2018-06-11 13:02:12.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/indexedDB/test/browser_forgetThisSiteAdd.html 2018-06-20 17:29:06.000000000 +0000 @@ -7,7 +7,6 @@ Indexed Database Test diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/tests/browser/ping_worker.html firefox-trunk-62.0~a1~hg20180620r423058/dom/tests/browser/ping_worker.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/tests/browser/ping_worker.html 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/tests/browser/ping_worker.html 2018-06-20 17:29:06.000000000 +0000 @@ -1,12 +1,13 @@ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/tests/mochitest/geolocation/test_timerRestartWatch.html firefox-trunk-62.0~a1~hg20180620r423058/dom/tests/mochitest/geolocation/test_timerRestartWatch.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/tests/mochitest/geolocation/test_timerRestartWatch.html 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/tests/mochitest/geolocation/test_timerRestartWatch.html 2018-06-20 17:29:07.000000000 +0000 @@ -31,7 +31,8 @@ var times = 0; function errorCallback(err) { - is(err.code, err.TIMEOUT, "ensure error is a timeout."); + ok(err.code === err.TIMEOUT || + err.code === err.POSITION_UNAVAILABLE, `check error code: ${err.code}`); times++; isnot(times, 0, "times should be nonzero"); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/dom/url/tests/test_url.html firefox-trunk-62.0~a1~hg20180620r423058/dom/url/tests/test_url.html --- firefox-trunk-62.0~a1~hg20180611r422292/dom/url/tests/test_url.html 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/dom/url/tests/test_url.html 2018-06-20 17:29:07.000000000 +0000 @@ -479,7 +479,7 @@ // we don't implement a spec-compliant parser yet. // make sure we are bug compatible with existing implementations. url = new URL("data:text/html,Link"); - is(url.href, "data:text/html,Link"); + is(url.href, "data:text/html,Link"); + + + + +Mozilla Bug 426246 +

+ + +
+

first line

+

this is the second line

+
+ +
first line
this is the second line
+
  • first line
  • this is the second line
+
first line
+this is the second line
+ +
+
+
+
+ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/libeditor/TextEditor.cpp firefox-trunk-62.0~a1~hg20180620r423058/editor/libeditor/TextEditor.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/editor/libeditor/TextEditor.cpp 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/libeditor/TextEditor.cpp 2018-06-20 17:29:07.000000000 +0000 @@ -616,8 +616,6 @@ return NS_OK; } case eToBeginningOfLine: { - // Try to move to end - selCont->IntraLineMove(true, false); // Select to beginning nsresult rv = selCont->IntraLineMove(false, true); *aAction = eNone; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/reftests/reftest.list firefox-trunk-62.0~a1~hg20180620r423058/editor/reftests/reftest.list --- firefox-trunk-62.0~a1~hg20180611r422292/editor/reftests/reftest.list 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/reftests/reftest.list 2018-06-20 17:29:07.000000000 +0000 @@ -134,4 +134,4 @@ == 911201.html 911201-ref.html needs-focus == 969773.html 969773-ref.html fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html -fuzzy-if(skiaContent,1,220) == 1088158.html 1088158-ref.html +fuzzy-if(skiaContent,1,220) skip-if(verify&&OSX) == 1088158.html 1088158-ref.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/EditorSpellCheck.cpp firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/EditorSpellCheck.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/EditorSpellCheck.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/EditorSpellCheck.cpp 2018-06-20 17:29:07.000000000 +0000 @@ -18,6 +18,7 @@ #include "mozilla/TextServicesDocument.h" // for TextServicesDocument #include "nsAString.h" // for nsAString::IsEmpty, etc #include "nsComponentManagerUtils.h" // for do_CreateInstance +#include "nsComposeTxtSrvFilter.h" #include "nsDebug.h" // for NS_ENSURE_TRUE, etc #include "nsDependentSubstring.h" // for Substring #include "nsError.h" // for NS_ERROR_NOT_INITIALIZED, etc @@ -694,7 +695,7 @@ NS_IMETHODIMP EditorSpellCheck::SetFilter(nsITextServicesFilter *aFilter) { - mTxtSrvFilter = aFilter; + mTxtSrvFilter = reinterpret_cast(aFilter); return NS_OK; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/EditorSpellCheck.h firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/EditorSpellCheck.h --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/EditorSpellCheck.h 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/EditorSpellCheck.h 2018-06-20 17:29:09.000000000 +0000 @@ -16,6 +16,7 @@ #include "nscore.h" // for nsresult class mozSpellChecker; +class nsComposeTxtSrvFilter; class nsIEditor; class nsISpellChecker; class nsITextServicesFilter; @@ -57,7 +58,7 @@ virtual ~EditorSpellCheck(); RefPtr mSpellChecker; - nsCOMPtr mTxtSrvFilter; + RefPtr mTxtSrvFilter; RefPtr mEditor; nsTArray mSuggestedWordList; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsComposeTxtSrvFilter.cpp firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsComposeTxtSrvFilter.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsComposeTxtSrvFilter.cpp 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsComposeTxtSrvFilter.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -18,51 +18,57 @@ NS_IMPL_ISUPPORTS(nsComposeTxtSrvFilter, nsITextServicesFilter) -NS_IMETHODIMP -nsComposeTxtSrvFilter::Skip(nsINode* aNode, bool *_retval) +bool +nsComposeTxtSrvFilter::Skip(nsINode* aNode) const { - *_retval = false; + if (NS_WARN_IF(!aNode)) { + return false; + } // Check to see if we can skip this node + + if (aNode->IsAnyOfHTMLElements(nsGkAtoms::script, + nsGkAtoms::textarea, + nsGkAtoms::select, + nsGkAtoms::style, + nsGkAtoms::map)) { + return true; + } + + if (!mIsForMail) { + return false; + } + // For nodes that are blockquotes, we must make sure // their type is "cite" - if (aNode) { - if (aNode->IsHTMLElement(nsGkAtoms::blockquote)) { - if (mIsForMail) { - *_retval = aNode->AsElement()->AttrValueIs(kNameSpaceID_None, - nsGkAtoms::type, - nsGkAtoms::cite, - eIgnoreCase); - } - } else if (aNode->IsHTMLElement(nsGkAtoms::span)) { - if (mIsForMail) { - *_retval = aNode->AsElement()->AttrValueIs(kNameSpaceID_None, - nsGkAtoms::mozquote, - nsGkAtoms::_true, - eIgnoreCase); - if (!*_retval) { - *_retval = aNode->AsElement()->AttrValueIs(kNameSpaceID_None, - nsGkAtoms::_class, - nsGkAtoms::mozsignature, - eCaseMatters); - } - } - } else if (aNode->IsAnyOfHTMLElements(nsGkAtoms::script, - nsGkAtoms::textarea, - nsGkAtoms::select, - nsGkAtoms::style, - nsGkAtoms::map)) { - *_retval = true; - } else if (aNode->IsHTMLElement(nsGkAtoms::table)) { - if (mIsForMail) { - *_retval = - aNode->AsElement()->AttrValueIs(kNameSpaceID_None, - nsGkAtoms::_class, - NS_LITERAL_STRING("moz-email-headers-table"), - eCaseMatters); - } + if (aNode->IsHTMLElement(nsGkAtoms::blockquote)) { + return aNode->AsElement()->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::type, + nsGkAtoms::cite, + eIgnoreCase); + } + + if (aNode->IsHTMLElement(nsGkAtoms::span)) { + if (aNode->AsElement()->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::mozquote, + nsGkAtoms::_true, + eIgnoreCase)) { + return true; } + + return aNode->AsElement()->AttrValueIs(kNameSpaceID_None, + nsGkAtoms::_class, + nsGkAtoms::mozsignature, + eCaseMatters); + } + + if (aNode->IsHTMLElement(nsGkAtoms::table)) { + return aNode->AsElement()->AttrValueIs( + kNameSpaceID_None, + nsGkAtoms::_class, + NS_LITERAL_STRING("moz-email-headers-table"), + eCaseMatters); } - return NS_OK; + return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsComposeTxtSrvFilter.h firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsComposeTxtSrvFilter.h --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsComposeTxtSrvFilter.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsComposeTxtSrvFilter.h 2018-06-20 17:29:09.000000000 +0000 @@ -30,6 +30,12 @@ // Helper - Intializer void Init(bool aIsForMail) { mIsForMail = aIsForMail; } + /** + * Indicates whether the content node should be skipped by the iterator + * @param aNode - node to skip + */ + bool Skip(nsINode* aNode) const; + private: ~nsComposeTxtSrvFilter() {} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsFilteredContentIterator.cpp firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsFilteredContentIterator.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsFilteredContentIterator.cpp 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsFilteredContentIterator.cpp 2018-06-20 17:29:08.000000000 +0000 @@ -6,6 +6,7 @@ #include "mozilla/mozalloc.h" #include "mozilla/Move.h" #include "nsComponentManagerUtils.h" +#include "nsComposeTxtSrvFilter.h" #include "nsContentUtils.h" #include "nsDebug.h" #include "nsError.h" @@ -16,13 +17,12 @@ #include "nsINode.h" #include "nsISupportsBase.h" #include "nsISupportsUtils.h" -#include "nsITextServicesFilter.h" #include "nsRange.h" using namespace mozilla; //------------------------------------------------------------ -nsFilteredContentIterator::nsFilteredContentIterator(nsITextServicesFilter* aFilter) : +nsFilteredContentIterator::nsFilteredContentIterator(nsComposeTxtSrvFilter* aFilter) : mFilter(aFilter), mDidSkip(false), mIsOutOfRange(false), @@ -347,15 +347,13 @@ if (aNode && mFilter) { nsCOMPtr currentNode = aNode; - bool skipIt; while (1) { - nsresult rv = mFilter->Skip(aNode, &skipIt); - if (NS_SUCCEEDED(rv) && skipIt) { + if (mFilter->Skip(aNode)) { aDidSkip = true; // Get the next/prev node and then // see if we should skip that nsCOMPtr advNode; - rv = AdvanceNode(aNode, *getter_AddRefs(advNode), aDir); + nsresult rv = AdvanceNode(aNode, *getter_AddRefs(advNode), aDir); if (NS_SUCCEEDED(rv) && advNode) { aNode = advNode; } else { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsFilteredContentIterator.h firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsFilteredContentIterator.h --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsFilteredContentIterator.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsFilteredContentIterator.h 2018-06-20 17:29:07.000000000 +0000 @@ -13,8 +13,8 @@ #include "nscore.h" class nsAtom; +class nsComposeTxtSrvFilter; class nsINode; -class nsITextServicesFilter; class nsRange; class nsFilteredContentIterator final : public nsIContentIterator @@ -25,7 +25,7 @@ NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(nsFilteredContentIterator) - explicit nsFilteredContentIterator(nsITextServicesFilter* aFilter); + explicit nsFilteredContentIterator(nsComposeTxtSrvFilter* aFilter); /* nsIContentIterator */ virtual nsresult Init(nsINode* aRoot) override; @@ -47,7 +47,12 @@ void ClearDidSkip() { mDidSkip = false; } protected: - nsFilteredContentIterator() : mDidSkip(false), mIsOutOfRange(false) { } + nsFilteredContentIterator() + : mDidSkip(false) + , mIsOutOfRange(false) + , mDirection{eDirNotSet} + { + } virtual ~nsFilteredContentIterator(); @@ -72,7 +77,7 @@ RefPtr mSelectAreaAtom; RefPtr mMapAtom; - nsCOMPtr mFilter; + RefPtr mFilter; RefPtr mRange; bool mDidSkip; bool mIsOutOfRange; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsITextServicesFilter.idl firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsITextServicesFilter.idl --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/nsITextServicesFilter.idl 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/nsITextServicesFilter.idl 2018-06-20 17:29:08.000000000 +0000 @@ -5,17 +5,8 @@ #include "nsISupports.idl" -webidl Node; - -[scriptable, uuid(5BEC321F-59AC-413a-A4AD-8A8D7C50A0D0)] +[scriptable, builtinclass, uuid(5BEC321F-59AC-413a-A4AD-8A8D7C50A0D0)] interface nsITextServicesFilter : nsISupports { - - /** - * Indicates whether the content node should be skipped by the iterator - * @param aNode - node to skip - */ - boolean skip(in Node aNode); - }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/TextServicesDocument.cpp firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/TextServicesDocument.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/TextServicesDocument.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/TextServicesDocument.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -12,6 +12,7 @@ #include "mozilla/TextEditor.h" // for TextEditor #include "nsAString.h" // for nsAString::Length, etc #include "nsContentUtils.h" // for nsContentUtils +#include "nsComposeTxtSrvFilter.h" #include "nsDebug.h" // for NS_ENSURE_TRUE, etc #include "nsDependentSubstring.h" // for Substring #include "nsError.h" // for NS_OK, NS_ERROR_FAILURE, etc @@ -26,7 +27,6 @@ #include "nsISelectionController.h" // for nsISelectionController, etc #include "nsISupportsBase.h" // for nsISupports #include "nsISupportsUtils.h" // for NS_IF_ADDREF, NS_ADDREF, etc -#include "nsITextServicesFilter.h" // for nsITextServicesFilter #include "mozilla/intl/WordBreaker.h" // for WordRange, WordBreaker #include "nsRange.h" // for nsRange #include "nsString.h" // for nsString, nsAutoString @@ -359,7 +359,7 @@ } nsresult -TextServicesDocument::SetFilter(nsITextServicesFilter* aFilter) +TextServicesDocument::SetFilter(nsComposeTxtSrvFilter* aFilter) { // Hang on to the filter so we can set it into the filtered iterator. mTxtSvcFilter = aFilter; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/TextServicesDocument.h firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/TextServicesDocument.h --- firefox-trunk-62.0~a1~hg20180611r422292/editor/spellchecker/TextServicesDocument.h 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/editor/spellchecker/TextServicesDocument.h 2018-06-20 17:29:08.000000000 +0000 @@ -14,12 +14,12 @@ #include "nsTArray.h" #include "nscore.h" +class nsComposeTxtSrvFilter; class nsIContent; class nsIContentIterator; class nsIEditor; class nsINode; class nsISelectionController; -class nsITextServicesFilter; class nsRange; namespace mozilla { @@ -58,7 +58,7 @@ nsCOMPtr mNextTextBlock; nsTArray mOffsetTable; RefPtr mExtent; - nsCOMPtr mTxtSvcFilter; + RefPtr mTxtSvcFilter; int32_t mSelStartIndex; int32_t mSelStartOffset; @@ -110,7 +110,7 @@ * @param aFilter The filter to be used while iterating over * content. */ - nsresult SetFilter(nsITextServicesFilter* aFilter); + nsresult SetFilter(nsComposeTxtSrvFilter* aFilter); /** * Returns the text in the current text block. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/.eslintrc.js firefox-trunk-62.0~a1~hg20180620r423058/.eslintrc.js --- firefox-trunk-62.0~a1~hg20180611r422292/.eslintrc.js 2018-06-11 13:02:05.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/.eslintrc.js 2018-06-20 17:28:58.000000000 +0000 @@ -40,15 +40,6 @@ "mozilla/browser-window": true } }, { - // XXX Bug 1436303. These directories are still being fixed, so turn off - // mozilla/no-cc-etc for now. - "files": [ - "devtools/**" - ], - "rules": { - "mozilla/no-define-cc-etc": "off", - } - }, { // XXX Bug 1452706. These directories are still being fixed, so turn off // mozilla/require-expected-throws-or-rejects for now. "files": [ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/extensions/spellcheck/locales/en-US/hunspell/en-US.dic firefox-trunk-62.0~a1~hg20180620r423058/extensions/spellcheck/locales/en-US/hunspell/en-US.dic --- firefox-trunk-62.0~a1~hg20180611r422292/extensions/spellcheck/locales/en-US/hunspell/en-US.dic 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/extensions/spellcheck/locales/en-US/hunspell/en-US.dic 2018-06-20 17:29:09.000000000 +0000 @@ -1,4 +1,4 @@ -52803 +52804 0/nm 0th/pt 1/n1 @@ -29095,7 +29095,8 @@ happily/U happiness/UM happy/URTP -haptic +haptic/S +haptical/Y harangue/MGDS harass/LZGDRS harasser/M diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/ipc/GPUParent.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/ipc/GPUParent.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/ipc/GPUParent.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/ipc/GPUParent.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -384,6 +384,9 @@ #if defined(XP_WIN) DeviceManagerDx::Get()->ForceDeviceReset(ForcedDeviceResetReason::COMPOSITOR_UPDATED); DeviceManagerDx::Get()->MaybeResetAndReacquireDevices(); + if (gfxVars::UseWebRender()) { + wr::RenderThread::Get()->SimulateDeviceReset(); + } #endif RecvGetDeviceStatus(aOut); return IPC_OK(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/AsyncPanZoomController.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/AsyncPanZoomController.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/AsyncPanZoomController.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/AsyncPanZoomController.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -995,6 +995,7 @@ } if (aEvent.mType == MouseInput::MouseType::MOUSE_UP) { + APZC_LOG("%p ending drag\n", this); SetState(NOTHING); ScrollSnap(); return nsEventStatus_eConsumeNoDefault; @@ -1003,14 +1004,17 @@ HitTestingTreeNodeAutoLock node; GetApzcTreeManager()->FindScrollThumbNode(aDragMetrics, node); if (!node) { + APZC_LOG("%p unable to find scrollthumb node with viewid %" PRIu64 "\n", this, aDragMetrics.mViewId); return nsEventStatus_eConsumeNoDefault; } if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) { + APZC_LOG("%p starting scrollbar drag\n", this); SetState(SCROLLBAR_DRAG); } if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) { + APZC_LOG("%p discarding event of type %d\n", this, aEvent.mType); return nsEventStatus_eConsumeNoDefault; } @@ -1035,6 +1039,7 @@ // offscreen and its visible region is therefore empty. if (thumbWidth > 0 && thumbWidth * snapMultiplier < distance) { isMouseAwayFromThumb = true; + APZC_LOG("%p determined mouse is away from thumb, will snap\n", this); } } @@ -1051,12 +1056,13 @@ maxThumbPos -= scrollbarData.mThumbLength; float scrollPercent = thumbPosition / maxThumbPos; + APZC_LOG("%p scrollbar dragged to %f percent\n", this, scrollPercent); CSSCoord minScrollPosition = GetAxisStart(direction, mFrameMetrics.GetScrollableRect().TopLeft()); CSSCoord maxScrollPosition = GetAxisStart(direction, mFrameMetrics.GetScrollableRect().BottomRight()) - - GetAxisLength(direction, mFrameMetrics.CalculateCompositedRectInCssPixels()); + GetAxisLength(direction, mFrameMetrics.CalculateCompositionBoundsInCssPixelsOfSurroundingContent()); CSSCoord scrollPosition = minScrollPosition + (scrollPercent * (maxScrollPosition - minScrollPosition)); scrollPosition = std::max(scrollPosition, minScrollPosition); @@ -1068,6 +1074,7 @@ } else { scrollOffset.y = scrollPosition; } + APZC_LOG("%p set scroll offset to %s from scrollbar drag\n", this, Stringify(scrollOffset).c_str()); mFrameMetrics.SetScrollOffset(scrollOffset); ScheduleCompositeAndMaybeRepaint(); UpdateSharedCompositorFrameMetrics(); @@ -1750,7 +1757,7 @@ scrollbarPoint = scrollbarPoint * mFrameMetrics.GetPresShellResolution(); // Now, get it to be relative to the beginning of the scroll track. - CSSRect cssCompositionBound = mFrameMetrics.CalculateCompositedRectInCssPixels(); + CSSRect cssCompositionBound = mFrameMetrics.CalculateCompositionBoundsInCssPixelsOfSurroundingContent(); return GetAxisStart(*aThumbData.mDirection, scrollbarPoint) - GetAxisStart(*aThumbData.mDirection, cssCompositionBound) - aThumbData.mScrollTrackStart; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/GestureEventListener.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/GestureEventListener.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/GestureEventListener.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/GestureEventListener.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -52,9 +52,10 @@ return delta.Length(); } -ParentLayerCoord GestureEventListener::GetYSpanFromStartPoint() +ParentLayerCoord GestureEventListener::GetYSpanFromGestureStartPoint() { - const ParentLayerPoint start = mTouchStartPosition; + // use the position that began the one-touch-pinch gesture rather mTouchStartPosition + const ParentLayerPoint start = mOneTouchPinchStartPosition; const ParentLayerPoint& current = mTouches[0].mLocalScreenPoint; return current.y - start.y; } @@ -313,6 +314,9 @@ ParentLayerCoord currentSpan = 1.0f; ParentLayerPoint currentFocus = mTouchStartPosition; + // save the position that the one-touch-pinch gesture actually begins + mOneTouchPinchStartPosition = mLastTouchInput.mTouches[0].mLocalScreenPoint; + PinchGestureInput pinchEvent(PinchGestureInput::PINCHGESTURE_START, mLastTouchInput.mTime, mLastTouchInput.mTimeStamp, @@ -388,7 +392,7 @@ } case GESTURE_ONE_TOUCH_PINCH: { - ParentLayerCoord currentSpan = GetYSpanFromStartPoint(); + ParentLayerCoord currentSpan = GetYSpanFromGestureStartPoint(); float effectiveSpan = 1.0f + (fabsf(currentSpan.value) * ONE_TOUCH_PINCH_SPEED); ParentLayerPoint currentFocus = mTouchStartPosition; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/GestureEventListener.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/GestureEventListener.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/GestureEventListener.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/GestureEventListener.h 2018-06-20 17:29:09.000000000 +0000 @@ -150,10 +150,10 @@ bool SecondTapIsFar() const; /** - * Returns current vertical span, counting from the where the user first put - * her finger down. + * Returns current vertical span, counting from the where the gesture first + * began (after a brief delay detecting the gesture from first touch). */ - ParentLayerCoord GetYSpanFromStartPoint(); + ParentLayerCoord GetYSpanFromGestureStartPoint(); /** * Do actual state transition and reset substates. @@ -209,6 +209,16 @@ MultiTouchInput mLastTapInput; /** + * Position of the last touch that exceeds the GetTouchStartTolerance when + * performing a one-touch-pinch gesture; using the mTouchStartPosition is + * slightly inaccurate because by the time the touch position has passed + * the threshold for the gesture, there is already a span that the zoom + * is calculated from, instead of starting at 1.0 when the threshold gets + * passed. + */ + ParentLayerPoint mOneTouchPinchStartPosition; + + /** * Position of the last touch starting. This is only valid during an attempt * to determine if a touch is a tap. If a touch point moves away from * mTouchStartPosition to the distance greater than diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/InputQueue.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/InputQueue.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/src/InputQueue.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/src/InputQueue.cpp 2018-06-20 17:29:08.000000000 +0000 @@ -703,13 +703,15 @@ } void -InputQueue::ConfirmDragBlock(uint64_t aInputBlockId, const RefPtr& aTargetApzc, - const AsyncDragMetrics& aDragMetrics) +InputQueue::ConfirmDragBlock(uint64_t aInputBlockId, + const RefPtr& aTargetApzc, + const AsyncDragMetrics& aDragMetrics) { APZThreadUtils::AssertOnControllerThread(); - INPQ_LOG("got a target apzc; block=%" PRIu64 " guid=%s\n", - aInputBlockId, aTargetApzc ? Stringify(aTargetApzc->GetGuid()).c_str() : ""); + INPQ_LOG("got a target apzc; block=%" PRIu64 " guid=%s dragtarget=%" PRIu64 "\n", + aInputBlockId, aTargetApzc ? Stringify(aTargetApzc->GetGuid()).c_str() : "", + aDragMetrics.mViewId); bool success = false; InputData* firstInput = nullptr; InputBlockState* inputBlock = FindBlockForId(aInputBlockId, &firstInput); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/apz_test_native_event_utils.js 2018-06-20 17:29:09.000000000 +0000 @@ -348,3 +348,35 @@ } }); } + +// Synthesizes events to drag |element|'s vertical scrollbar by the distance +// specified, synthesizing a mousemove for each increment as specified. +// Returns false if the element doesn't have a vertical scrollbar, or true after +// all the events have been synthesized. +function* dragVerticalScrollbar(element, testDriver, distance = 20, increment = 5) { + var boundingClientRect = element.getBoundingClientRect(); + var verticalScrollbarWidth = boundingClientRect.width - element.clientWidth; + if (verticalScrollbarWidth == 0) { + return false; + } + + var upArrowHeight = verticalScrollbarWidth; // assume square scrollbar buttons + var mouseX = element.clientWidth + (verticalScrollbarWidth / 2); + var mouseY = upArrowHeight + 5; // start dragging somewhere in the thumb + + dump("Starting drag at " + mouseX + ", " + mouseY + " from top-left of #" + element.id + "\n"); + + // Move the mouse to the scrollbar thumb and drag it down + yield synthesizeNativeMouseEvent(element, mouseX, mouseY, nativeMouseMoveEventMsg(), testDriver); + // mouse down + yield synthesizeNativeMouseEvent(element, mouseX, mouseY, nativeMouseDownEventMsg(), testDriver); + // drag vertically by |increment| until we reach the specified distance + for (var y = increment; y < distance; y += increment) { + yield synthesizeNativeMouseEvent(element, mouseX, mouseY + y, nativeMouseMoveEventMsg(), testDriver); + } + yield synthesizeNativeMouseEvent(element, mouseX, mouseY + distance, nativeMouseMoveEventMsg(), testDriver); + // and release + yield synthesizeNativeMouseEvent(element, mouseX, mouseY + distance, nativeMouseUpEventMsg(), testDriver); + + return true; +} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/apz_test_utils.js firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/apz_test_utils.js --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/apz_test_utils.js 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/apz_test_utils.js 2018-06-20 17:29:09.000000000 +0000 @@ -194,6 +194,10 @@ var testIndex = -1; var w = null; + // If the "apz.subtest" pref has been set, only a single subtest whose name matches + // the pref's value (if any) will be run. + var onlyOneSubtest = SpecialPowers.getCharPref("apz.subtest", /* default = */ ""); + function advanceSubtestExecution() { var test = aSubtests[testIndex]; if (w) { @@ -226,6 +230,13 @@ } test = aSubtests[testIndex]; + + if (onlyOneSubtest && onlyOneSubtest != test.file) { + SimpleTest.ok(true, "Skipping " + test.file + " because only " + onlyOneSubtest + " is being run"); + setTimeout(function() { advanceSubtestExecution(); }, 0); + return; + } + if (typeof test.dp_suppression != 'undefined') { // Normally during a test, the displayport will get suppressed during page // load, and unsuppressed at a non-deterministic time during the test. The @@ -273,6 +284,8 @@ } advanceSubtestExecution(); + }).catch(function(e) { + SimpleTest.ok(false, "Error occurred while running subtests: " + e); }); } @@ -522,8 +535,13 @@ return window.hitTestConfig; } -// Compute the coordinates of the center of the given element. +// Compute the coordinates of the center of the given element. The argument +// can either be a string (the id of the element desired) or the element +// itself. function centerOf(element) { + if (typeof element === "string") { + element = document.getElementById(element); + } var bounds = element.getBoundingClientRect(); return { x: bounds.x + (bounds.width / 2), y: bounds.y + (bounds.height / 2) }; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1326290.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1326290.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1326290.html 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1326290.html 2018-06-20 17:29:09.000000000 +0000 @@ -0,0 +1,59 @@ + + + + + + Dragging the mouse on a inactive scrollframe's scrollbar + + + + + + + +
+
Some content inside the inactive scrollframe
+
+
Some content to ensure the root scrollframe is scrollable and the overflow:scroll div remains inactive
+ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1331693.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1331693.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1331693.html 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1331693.html 2018-06-20 17:29:09.000000000 +0000 @@ -0,0 +1,67 @@ + + + + + + Dragging the mouse on a scrollframe inside an SVGEffects + + + + + + + +
A div that generate an svg effects display item +
+
Some content inside the scrollframe
+
+
+ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1462961.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1462961.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_bug1462961.html 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_bug1462961.html 2018-06-20 17:29:09.000000000 +0000 @@ -0,0 +1,70 @@ + + + + + + Dragging the mouse on a transformed scrollframe inside a fixed-pos element + + + + + + + +
+
+
+
+
+ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_backface_hidden.html 2018-06-20 17:29:09.000000000 +0000 @@ -49,7 +49,7 @@ // This is not required for exercising the behavior we want to test, // but it's needed to be able to assert the results reliably. config.utils.setDisplayPortForElement(0, 0, 1000, 1000, subframe, 1); - yield waitForAllPaints(testDriver); + yield waitForApzFlushedRepaints(testDriver); var subframeViewId = config.utils.getViewId(subframe); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_basic.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_basic.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_basic.html 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_basic.html 2018-06-20 17:29:09.000000000 +0000 @@ -51,7 +51,7 @@ // also apply a async scroll offset in the y-direction such that the // scrollframe scrolls to the bottom of its range. utils.setDisplayPortForElement(0, 0, 500, 500, scroller, 1); - yield waitForAllPaints(testDriver); + yield waitForApzFlushedRepaints(testDriver); var scrollY = scroller.scrollTopMax; utils.setAsyncScrollOffset(scroller, 0, scrollY); if (config.isWebRender) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_checkerboard.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_checkerboard.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_checkerboard.html 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_checkerboard.html 2018-06-20 17:29:08.000000000 +0000 @@ -28,7 +28,7 @@ // scrollframe scrolls all the way to the bottom of its range, where it's // sure to checkerboard. utils.setDisplayPortForElement(0, 0, 300, 1000, scroller, 1); - yield waitForAllPaints(testDriver); + yield waitForApzFlushedRepaints(testDriver); var scrollY = scroller.scrollTopMax; utils.setAsyncScrollOffset(scroller, 0, scrollY); if (config.isWebRender) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_fixed_in_scrolled_transform.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_fixed_in_scrolled_transform.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_fixed_in_scrolled_transform.html 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_fixed_in_scrolled_transform.html 2018-06-20 17:29:09.000000000 +0000 @@ -70,7 +70,7 @@ // layerize the scrollable frame var subframe = document.querySelector('.subframe'); utils.setDisplayPortForElement(0, 0, 800, 2000, subframe, 1); - yield waitForAllPaints(testDriver); + yield waitForApzFlushedRepaints(testDriver); var target = document.querySelector('.absoluteClip'); checkHitResult(hitTest(centerOf(target)), diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_touchaction.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_touchaction.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/helper_hittest_touchaction.html 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/helper_hittest_touchaction.html 2018-06-20 17:29:08.000000000 +0000 @@ -0,0 +1,311 @@ + + + + Testing APZ hit-test with touch-action boxes + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/mochitest.ini firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/mochitest.ini --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/mochitest.ini 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/mochitest.ini 2018-06-20 17:29:09.000000000 +0000 @@ -2,54 +2,7 @@ support-files = apz_test_native_event_utils.js apz_test_utils.js - helper_basic_doubletap_zoom.html - helper_basic_pan.html - helper_basic_zoom.html - helper_bug982141.html - helper_bug1151663.html - helper_bug1162771.html - helper_bug1271432.html - helper_bug1280013.html - helper_bug1285070.html - helper_bug1299195.html - helper_bug1346632.html - helper_bug1414336.html - helper_bug1464568_transform.html - helper_bug1464568_opacity.html - helper_click.html - helper_div_pan.html - helper_drag_click.html - helper_drag_scroll.html - helper_iframe_pan.html - helper_iframe1.html - helper_iframe2.html - helper_hittest_backface_hidden.html - helper_hittest_basic.html - helper_hittest_checkerboard.html - helper_hittest_fixed_in_scrolled_transform.html - helper_hittest_float_bug1434846.html - helper_hittest_float_bug1443518.html - helper_key_scroll.html - helper_long_tap.html - helper_override_root.html - helper_override_subdoc.html - helper_overscroll_behavior_bug1425573.html - helper_overscroll_behavior_bug1425603.html - helper_scroll_inactive_perspective.html - helper_scroll_inactive_zindex.html - helper_scroll_on_position_fixed.html - helper_scroll_over_scrollbar.html - helper_scroll_tables_perspective.html - helper_scrollto_tap.html - helper_subframe_style.css - helper_tall.html - helper_tap.html - helper_tap_default_passive.html - helper_tap_fullzoom.html - helper_tap_passive.html - helper_touch_action.html - helper_touch_action_regions.html - helper_touch_action_complex.html + helper_*.* tags = apz [test_bug982141.html] [test_bug1151663.html] @@ -69,7 +22,7 @@ [test_group_pointerevents.html] skip-if = os == 'win' && os_version == '10.0' # Bug 1404836 [test_group_touchevents.html] - skip-if = webrender || (verify && debug && (os == 'win')) # bug 1424752 + skip-if = (verify && debug && (os == 'win')) [test_group_wheelevents.html] skip-if = (toolkit == 'android') # wheel events not supported on mobile [test_group_zoom.html] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/test_group_hittest.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/test_group_hittest.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/test_group_hittest.html 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/test_group_hittest.html 2018-06-20 17:29:09.000000000 +0000 @@ -32,7 +32,8 @@ {'file': 'helper_hittest_float_bug1434846.html', 'prefs': prefs}, {'file': 'helper_hittest_float_bug1443518.html', 'prefs': prefs}, {'file': 'helper_hittest_checkerboard.html', 'prefs': prefs}, - {'file': 'helper_hittest_backface_hidden.html', 'prefs': prefs} + {'file': 'helper_hittest_backface_hidden.html', 'prefs': prefs}, + {'file': 'helper_hittest_touchaction.html', 'prefs': prefs} ]; if (isApzEnabled()) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/test_group_mouseevents.html firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/test_group_mouseevents.html --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/test/mochitest/test_group_mouseevents.html 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/test/mochitest/test_group_mouseevents.html 2018-06-20 17:29:09.000000000 +0000 @@ -19,7 +19,13 @@ // Test for dragging on a fake-scrollbar element that scrolls the page {'file': 'helper_drag_scroll.html'}, // Test for dragging the scrollbar with a fixed-pos element overlaying it - {'file': 'helper_bug1346632.html'} + {'file': 'helper_bug1346632.html'}, + // Test for scrollbar-dragging on a scrollframe that's inactive + {'file': 'helper_bug1326290.html'}, + // Test for scrollbar-dragging on a scrollframe inside an SVGEffects + {'file': 'helper_bug1331693.html'}, + // Test for scrollbar-dragging on a transformed scrollframe inside a fixed-pos item + {'file': 'helper_bug1462961.html'} ]; if (isApzEnabled()) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZCCallbackHelper.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZCCallbackHelper.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZCCallbackHelper.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZCCallbackHelper.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -210,10 +210,10 @@ aContent->GetPrimaryFrame(), nsLayoutUtils::RepaintMode::Repaint); } - CSSRect baseCSS = aMetrics.CalculateCompositedRectInCssPixels(); + CSSSize baseSize = aMetrics.CalculateCompositedSizeInCssPixels(); nsRect base(0, 0, - baseCSS.Width() * nsPresContext::AppUnitsPerCSSPixel(), - baseCSS.Height() * nsPresContext::AppUnitsPerCSSPixel()); + baseSize.width * nsPresContext::AppUnitsPerCSSPixel(), + baseSize.height * nsPresContext::AppUnitsPerCSSPixel()); nsLayoutUtils::SetDisplayPortBaseIfNotSet(aContent, base); } @@ -722,70 +722,55 @@ shadow->SendSetConfirmedTargetAPZC(aInputBlockId, aTargets); } -class DisplayportSetListener : public nsAPostRefreshObserver { -public: - DisplayportSetListener(nsIPresShell* aPresShell, - const uint64_t& aInputBlockId, - const nsTArray& aTargets) - : mPresShell(aPresShell) - , mInputBlockId(aInputBlockId) - , mTargets(aTargets) - { - } - - virtual ~DisplayportSetListener() - { - } - - void DidRefresh() override { - if (!mPresShell) { - MOZ_ASSERT_UNREACHABLE("Post-refresh observer fired again after failed attempt at unregistering it"); - return; - } +DisplayportSetListener::DisplayportSetListener(nsIWidget* aWidget, + nsIPresShell* aPresShell, + const uint64_t& aInputBlockId, + const nsTArray& aTargets) + : mWidget(aWidget) + , mPresShell(aPresShell) + , mInputBlockId(aInputBlockId) + , mTargets(aTargets) +{ +} - APZCCH_LOG("Got refresh, sending target APZCs for input block %" PRIu64 "\n", mInputBlockId); - SendLayersDependentApzcTargetConfirmation(mPresShell, mInputBlockId, std::move(mTargets)); +DisplayportSetListener:: ~DisplayportSetListener() +{ +} - if (!mPresShell->RemovePostRefreshObserver(this)) { - MOZ_ASSERT_UNREACHABLE("Unable to unregister post-refresh observer! Leaking it instead of leaving garbage registered"); - // Graceful handling, just in case... - mPresShell = nullptr; - return; - } +bool +DisplayportSetListener::Register() +{ + if (mPresShell->AddPostRefreshObserver(this)) { + APZCCH_LOG("Successfully registered post-refresh observer\n"); + return true; + } + // In case of failure just send the notification right away + APZCCH_LOG("Sending target APZCs for input block %" PRIu64 "\n", mInputBlockId); + mWidget->SetConfirmedTargetAPZC(mInputBlockId, mTargets); + return false; +} - delete this; +void +DisplayportSetListener::DidRefresh() { + if (!mPresShell) { + MOZ_ASSERT_UNREACHABLE("Post-refresh observer fired again after failed attempt at unregistering it"); + return; } -private: - RefPtr mPresShell; - uint64_t mInputBlockId; - nsTArray mTargets; -}; + APZCCH_LOG("Got refresh, sending target APZCs for input block %" PRIu64 "\n", mInputBlockId); + SendLayersDependentApzcTargetConfirmation(mPresShell, mInputBlockId, std::move(mTargets)); -// Sends a SetTarget notification for APZC, given one or more previous -// calls to PrepareForAPZCSetTargetNotification(). -static void -SendSetTargetAPZCNotificationHelper(nsIWidget* aWidget, - nsIPresShell* aShell, - const uint64_t& aInputBlockId, - const nsTArray& aTargets, - bool aWaitForRefresh) -{ - bool waitForRefresh = aWaitForRefresh; - if (waitForRefresh) { - APZCCH_LOG("At least one target got a new displayport, need to wait for refresh\n"); - waitForRefresh = aShell->AddPostRefreshObserver( - new DisplayportSetListener(aShell, aInputBlockId, std::move(aTargets))); - } - if (!waitForRefresh) { - APZCCH_LOG("Sending target APZCs for input block %" PRIu64 "\n", aInputBlockId); - aWidget->SetConfirmedTargetAPZC(aInputBlockId, aTargets); - } else { - APZCCH_LOG("Successfully registered post-refresh observer\n"); + if (!mPresShell->RemovePostRefreshObserver(this)) { + MOZ_ASSERT_UNREACHABLE("Unable to unregister post-refresh observer! Leaking it instead of leaving garbage registered"); + // Graceful handling, just in case... + mPresShell = nullptr; + return; } + + delete this; } -bool +UniquePtr APZCCallbackHelper::SendSetTargetAPZCNotification(nsIWidget* aWidget, nsIDocument* aDocument, const WidgetGUIEvent& aEvent, @@ -793,7 +778,7 @@ uint64_t aInputBlockId) { if (!aWidget || !aDocument) { - return false; + return nullptr; } if (aInputBlockId == sLastTargetAPZCNotificationInputBlock) { // We have already confirmed the target APZC for a previous event of this @@ -802,7 +787,7 @@ // race the original confirmation (which needs to go through a layers // transaction). APZCCH_LOG("Not resending target APZC confirmation for input block %" PRIu64 "\n", aInputBlockId); - return false; + return nullptr; } sLastTargetAPZCNotificationInputBlock = aInputBlockId; if (nsIPresShell* shell = aDocument->GetShell()) { @@ -827,18 +812,16 @@ // TODO: Do other types of events need to be handled? if (!targets.IsEmpty()) { - SendSetTargetAPZCNotificationHelper( - aWidget, - shell, - aInputBlockId, - std::move(targets), - waitForRefresh); + if (waitForRefresh) { + APZCCH_LOG("At least one target got a new displayport, need to wait for refresh\n"); + return MakeUnique(aWidget, shell, aInputBlockId, std::move(targets)); + } + APZCCH_LOG("Sending target APZCs for input block %" PRIu64 "\n", aInputBlockId); + aWidget->SetConfirmedTargetAPZC(aInputBlockId, targets); } - - return waitForRefresh; } } - return false; + return nullptr; } void diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZCCallbackHelper.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZCCallbackHelper.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZCCallbackHelper.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZCCallbackHelper.h 2018-06-20 17:29:08.000000000 +0000 @@ -11,6 +11,7 @@ #include "mozilla/EventForwards.h" #include "mozilla/layers/APZUtils.h" #include "nsIDOMWindowUtils.h" +#include "nsRefreshDriver.h" #include @@ -28,6 +29,25 @@ typedef std::function&)> SetAllowedTouchBehaviorCallback; +/* Refer to documentation on SendSetTargetAPZCNotification for this class */ +class DisplayportSetListener : public nsAPostRefreshObserver +{ +public: + DisplayportSetListener(nsIWidget* aWidget, + nsIPresShell* aPresShell, + const uint64_t& aInputBlockId, + const nsTArray& aTargets); + virtual ~DisplayportSetListener(); + bool Register(); + void DidRefresh() override; + +private: + RefPtr mWidget; + RefPtr mPresShell; + uint64_t mInputBlockId; + nsTArray mTargets; +}; + /* This class contains some helper methods that facilitate implementing the GeckoContentController callback interface required by the AsyncPanZoomController. Since different platforms need to implement this interface in similar-but- @@ -136,20 +156,24 @@ * which scrollable frames they target. If any of these frames don't have * a displayport, set one. * - * If any displayports need to be set, the actual notification to APZ is - * sent to the compositor, which will then post a message back to APZ's - * controller thread. Otherwise, the provided widget's SetConfirmedTargetAPZC - * method is invoked immediately. + * If any displayports need to be set, this function returns a heap-allocated + * object. The caller is responsible for calling Register() on that object, + * and release()'ing the UniquePtr if that Register() call returns true. + * The object registers itself as a post-refresh observer on the presShell + * and ensures that notifications get sent to APZ correctly after the + * refresh. * - * Returns true if any displayports need to be set. (A caller may be - * interested to know this, because they may need to delay certain actions - * until after the displayport comes into effect.) + * Having the caller manage this object is desirable in case they want to + * (a) know about the fact that a displayport needs to be set, and + * (b) register a post-refresh observer of their own that will run in + * a defined ordering relative to the APZ messages. */ - static bool SendSetTargetAPZCNotification(nsIWidget* aWidget, - nsIDocument* aDocument, - const WidgetGUIEvent& aEvent, - const ScrollableLayerGuid& aGuid, - uint64_t aInputBlockId); + static UniquePtr SendSetTargetAPZCNotification( + nsIWidget* aWidget, + nsIDocument* aDocument, + const WidgetGUIEvent& aEvent, + const ScrollableLayerGuid& aGuid, + uint64_t aInputBlockId); /* Figure out the allowed touch behaviors of each touch point in |aEvent| * and send that information to the provided callback. */ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZEventState.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZEventState.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/APZEventState.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/APZEventState.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -418,11 +418,6 @@ const ScrollableLayerGuid& aGuid, uint64_t aInputBlockId) { - // If we get here and the drag block has not been confirmed by the code in - // nsSliderFrame, then no scrollbar reacted to the event thus APZC will - // ignore this drag block. We can send defaultPrevented as either true or - // false, it doesn't matter, because APZ won't have the scrollbar metrics - // anyway, and will know to drop the block. bool defaultPrevented = false; mContentReceivedInputBlockCallback(aGuid, aInputBlockId, defaultPrevented); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/InputAPZContext.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/InputAPZContext.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/InputAPZContext.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/InputAPZContext.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -12,8 +12,8 @@ ScrollableLayerGuid InputAPZContext::sGuid; uint64_t InputAPZContext::sBlockId = 0; nsEventStatus InputAPZContext::sApzResponse = nsEventStatus_eIgnore; -bool InputAPZContext::sRoutedToChildProcess = false; bool InputAPZContext::sPendingLayerization = false; +bool InputAPZContext::sRoutedToChildProcess = false; /*static*/ ScrollableLayerGuid InputAPZContext::GetTargetLayerGuid() @@ -33,32 +33,33 @@ return sApzResponse; } -/*static*/ void -InputAPZContext::SetRoutedToChildProcess() +/*static*/ bool +InputAPZContext::HavePendingLayerization() { - sRoutedToChildProcess = true; + return sPendingLayerization; } -/*static*/ void -InputAPZContext::SetPendingLayerization() +/*static*/ bool +InputAPZContext::WasRoutedToChildProcess() { - sPendingLayerization = true; + return sRoutedToChildProcess; } InputAPZContext::InputAPZContext(const ScrollableLayerGuid& aGuid, const uint64_t& aBlockId, - const nsEventStatus& aApzResponse) + const nsEventStatus& aApzResponse, + bool aPendingLayerization) : mOldGuid(sGuid) , mOldBlockId(sBlockId) , mOldApzResponse(sApzResponse) - , mOldRoutedToChildProcess(sRoutedToChildProcess) , mOldPendingLayerization(sPendingLayerization) + , mOldRoutedToChildProcess(sRoutedToChildProcess) { sGuid = aGuid; sBlockId = aBlockId; sApzResponse = aApzResponse; + sPendingLayerization = aPendingLayerization; sRoutedToChildProcess = false; - sPendingLayerization = false; } InputAPZContext::~InputAPZContext() @@ -66,20 +67,14 @@ sGuid = mOldGuid; sBlockId = mOldBlockId; sApzResponse = mOldApzResponse; - sRoutedToChildProcess = mOldRoutedToChildProcess; sPendingLayerization = mOldPendingLayerization; + sRoutedToChildProcess = mOldRoutedToChildProcess; } -/*static*/ bool -InputAPZContext::WasRoutedToChildProcess() -{ - return sRoutedToChildProcess; -} - -/*static*/ bool -InputAPZContext::HavePendingLayerization() +/*static*/ void +InputAPZContext::SetRoutedToChildProcess() { - return sPendingLayerization; + sRoutedToChildProcess = true; } } // namespace layers diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/InputAPZContext.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/InputAPZContext.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/apz/util/InputAPZContext.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/apz/util/InputAPZContext.h 2018-06-20 17:29:08.000000000 +0000 @@ -13,40 +13,56 @@ namespace mozilla { namespace layers { -// InputAPZContext is used to communicate the ScrollableLayerGuid, -// input block ID, APZ response from nsIWidget to RenderFrameParent. -// It is conceptually attached to any WidgetInputEvent -// that has been processed by APZ directly from a widget. +// InputAPZContext is used to communicate various pieces of information +// around the codebase without having to plumb it through lots of functions +// and codepaths. Conceptually it is attached to a WidgetInputEvent that is +// relevant to APZ. +// +// There are two types of information bits propagated using this class. One +// type is propagated "downwards" (from a process entry point like nsBaseWidget +// or TabChild) into deeper code that is run during complicated operations +// like event dispatch. The other type is information that is propagated +// "upwards", from the deeper code back to the entry point. class MOZ_STACK_CLASS InputAPZContext { private: + // State that is propagated downwards from InputAPZContext creation into + // "deeper" code. static ScrollableLayerGuid sGuid; static uint64_t sBlockId; static nsEventStatus sApzResponse; - static bool sRoutedToChildProcess; static bool sPendingLayerization; + // State that is set in deeper code and propagated upwards. + static bool sRoutedToChildProcess; + public: + // Functions to access downwards-propagated data static ScrollableLayerGuid GetTargetLayerGuid(); static uint64_t GetInputBlockId(); static nsEventStatus GetApzResponse(); - static void SetRoutedToChildProcess(); - static void SetPendingLayerization(); + static bool HavePendingLayerization(); + + // Functions to access upwards-propagated data + static bool WasRoutedToChildProcess(); + // Constructor sets the data to be propagated downwards InputAPZContext(const ScrollableLayerGuid& aGuid, const uint64_t& aBlockId, - const nsEventStatus& aApzResponse); + const nsEventStatus& aApzResponse, + bool aPendingLayerization = false); ~InputAPZContext(); - static bool WasRoutedToChildProcess(); - static bool HavePendingLayerization(); + // Functions to set data to be propagated upwards + static void SetRoutedToChildProcess(); private: ScrollableLayerGuid mOldGuid; uint64_t mOldBlockId; nsEventStatus mOldApzResponse; - bool mOldRoutedToChildProcess; bool mOldPendingLayerization; + + bool mOldRoutedToChildProcess; }; } // namespace layers diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/D3D11ShareHandleImage.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/D3D11ShareHandleImage.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/D3D11ShareHandleImage.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/D3D11ShareHandleImage.cpp 2018-06-20 17:29:08.000000000 +0000 @@ -198,6 +198,14 @@ D3D11RecycleAllocator::CreateOrRecycleClient(gfx::SurfaceFormat aFormat, const gfx::IntSize& aSize) { + // When CompositorDevice or ContentDevice is updated, + // we could not reuse old D3D11Textures. It could cause video flickering. + RefPtr device = gfx::DeviceManagerDx::Get()->GetImageDevice(); + if (!!mImageDevice && mImageDevice != device) { + ShrinkToMinimumSize(); + } + mImageDevice = device; + TextureAllocationFlags allocFlags = TextureAllocationFlags::ALLOC_DEFAULT; if (gfxPrefs::PDMWMFUseSyncTexture() || mDevice == DeviceManagerDx::Get()->GetCompositorDevice()) { // If our device is the compositor device, we don't need any synchronization in practice. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/D3D11ShareHandleImage.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/D3D11ShareHandleImage.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/D3D11ShareHandleImage.h 2018-06-11 13:02:13.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/D3D11ShareHandleImage.h 2018-06-20 17:29:09.000000000 +0000 @@ -39,6 +39,10 @@ TextureAllocationFlags aAllocFlags) override; RefPtr mDevice; + /** + * Used for checking if CompositorDevice/ContentDevice is updated. + */ + RefPtr mImageDevice; }; // Image class that wraps a ID3D11Texture2D. This class copies the image diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/FrameMetrics.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/FrameMetrics.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/FrameMetrics.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/FrameMetrics.h 2018-06-20 17:29:09.000000000 +0000 @@ -197,12 +197,25 @@ return mCompositionBounds.Size() / GetZoom(); } - CSSRect CalculateCompositedRectInCssPixels() const + /* + * Calculate the composition bounds of this frame in the CSS pixels of + * the content surrounding the scroll frame. (This can be thought of as + * "parent CSS" pixels). + * Note that it does not make to ask for the composition bounds in the + * CSS pixels of the scrolled content (that is, regular CSS pixels), + * because the origin of the composition bounds is not meaningful in that + * coordinate space. (The size is, use CalculateCompositedSizeInCssPixels() + * for that.) + */ + CSSRect CalculateCompositionBoundsInCssPixelsOfSurroundingContent() const { if (GetZoom() == CSSToParentLayerScale2D(0, 0)) { return CSSRect(); // avoid division by zero } - return mCompositionBounds / GetZoom(); + // The CSS pixels of the scrolled content and the CSS pixels of the + // surrounding content only differ if the scrolled content is rendered + // at a higher resolution, and the difference is the resolution. + return mCompositionBounds / GetZoom() * CSSToCSSScale{mPresShellResolution}; } CSSSize CalculateBoundedCompositedSizeInCssPixels() const diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ImageContainer.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ImageContainer.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ImageContainer.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ImageContainer.h 2018-06-20 17:29:09.000000000 +0000 @@ -559,6 +559,10 @@ const gfx::IntSize& GetScaleHint() const { return mScaleHint; } + void SetTransformHint(const gfx::Matrix& aTransformHint) { mTransformHint = aTransformHint; } + + const gfx::Matrix& GetTransformHint() const { return mTransformHint; } + void SetImageFactory(ImageFactory *aFactory) { RecursiveMutexAutoLock lock(mRecursiveMutex); @@ -681,6 +685,8 @@ gfx::IntSize mScaleHint; + gfx::Matrix mTransformHint; + RefPtr mRecycleBin; // This member points to an ImageClient if this ImageContainer was diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/CrossProcessCompositorBridgeParent.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -206,7 +206,7 @@ LayersId layersId = wr::AsLayersId(aPipelineId); // Check to see if this child process has access to this layer tree. if (!LayerTreeOwnerTracker::Get()->IsMapped(layersId, OtherPid())) { - NS_ERROR("Unexpected layers id in AllocPAPZCTreeManagerParent; dropping message..."); + NS_ERROR("Unexpected layers id in AllocPWebRenderBridgeParent; dropping message..."); return nullptr; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/ImageBridgeChild.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/ImageBridgeChild.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/ImageBridgeChild.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/ImageBridgeChild.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -44,6 +44,10 @@ #include "mozilla/layers/TextureClient.h" #include "SynchronousTask.h" +#if defined(XP_WIN) +#include "mozilla/gfx/DeviceManagerDx.h" +#endif + namespace mozilla { namespace ipc { class Shmem; @@ -704,7 +708,16 @@ aIdentifier.mParentBackend != LayersBackend::LAYERS_WR; // D3DTexture might become obsolte. To prevent to use obsoleted D3DTexture, // drop all ImageContainers' ImageClients. - bool needsDrop = GetCompositorBackendType() == LayersBackend::LAYERS_D3D11 || disablingWebRender; +#if defined(XP_WIN) + RefPtr device = gfx::DeviceManagerDx::Get()->GetImageDevice(); + bool needsDrop = !!mImageDevice && + mImageDevice != device && + GetCompositorBackendType() == LayersBackend::LAYERS_D3D11 || + disablingWebRender; + mImageDevice = device; +#else + bool needsDrop = disablingWebRender; +#endif IdentifyTextureHost(aIdentifier); if (needsDrop) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/ImageBridgeChild.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/ImageBridgeChild.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/ipc/ImageBridgeChild.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/ipc/ImageBridgeChild.h 2018-06-20 17:29:08.000000000 +0000 @@ -402,6 +402,13 @@ */ Mutex mContainerMapLock; nsRefPtrHashtable mImageContainerListeners; + +#if defined(XP_WIN) + /** + * Used for checking if D3D11Device is updated. + */ + RefPtr mImageDevice; +#endif }; } // namespace layers diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/wr/WebRenderCommandBuilder.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/wr/WebRenderCommandBuilder.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/layers/wr/WebRenderCommandBuilder.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/layers/wr/WebRenderCommandBuilder.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -1407,6 +1407,7 @@ if (!aContainer->GetScaleHint().IsEmpty()) { scaleToSize = Some(aContainer->GetScaleHint()); } + gfx::Matrix4x4 transform = gfx::Matrix4x4::From2D(aContainer->GetTransformHint()); // TODO! // We appear to be using the image bridge for a lot (most/all?) of // layers-free image handling and that breaks frame consistency. @@ -1415,7 +1416,7 @@ aSc, rect, scBounds, - gfx::Matrix4x4(), + transform, scaleToSize, wr::ImageRendering::Auto, wr::MixBlendMode::Normal, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/qcms/chain.c firefox-trunk-62.0~a1~hg20180620r423058/gfx/qcms/chain.c --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/qcms/chain.c 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/qcms/chain.c 2018-06-20 17:29:09.000000000 +0000 @@ -972,6 +972,12 @@ assert(0 && "Unsupported transform module"); return NULL; } + if (transform->grid_size <= 0 && + (transform_fn == qcms_transform_module_clut || + transform_fn == qcms_transform_module_clut_only)) { + assert(0 && "Invalid transform"); + return NULL; + } transform->transform_module_fn(transform,src,dest,len); dest = src; src = new_src; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/src/nsColor.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/src/nsColor.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/src/nsColor.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/src/nsColor.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -216,14 +216,6 @@ return false; } -// Returns kColorNames, an array of all possible color names, and sets -// *aSizeArray to the size of that array. Do NOT call free() on this array. -const char * const * NS_AllColorNames(size_t *aSizeArray) -{ - *aSizeArray = ArrayLength(kColorNames); - return kColorNames; -} - // Macro to blend two colors // // equivalent to target = (bg*(255-fgalpha) + fg*fgalpha)/255 diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/src/nsColor.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/src/nsColor.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/src/nsColor.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/src/nsColor.h 2018-06-20 17:29:09.000000000 +0000 @@ -100,10 +100,6 @@ // otherwise return false. bool NS_ColorNameToRGB(const nsAString& aBuf, nscolor* aResult); -// Returns an array of all possible color names, and sets -// *aSizeArray to the size of that array. Do NOT call |free()| on this array. -const char * const * NS_AllColorNames(size_t *aSizeArray); - // function to convert from HSL color space to RGB color space // the float parameters are all expected to be in the range 0-1 nscolor NS_HSL2RGB(float h, float s, float l); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/tests/crashtests/crashtests.list firefox-trunk-62.0~a1~hg20180620r423058/gfx/tests/crashtests/crashtests.list --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/tests/crashtests/crashtests.list 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/tests/crashtests/crashtests.list 2018-06-20 17:29:09.000000000 +0000 @@ -157,7 +157,7 @@ load 1242811.html load 1242822.html load 1248222.html -skip-if(webrender) load 1278305.html # skip because of bug 1435896 +load 1278305.html load 1308394.html load 1317403-1.html # bug 1331533 load 1325159-1.html diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/thebes/gfxPlatform.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/thebes/gfxPlatform.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/thebes/gfxPlatform.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/thebes/gfxPlatform.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -162,6 +162,7 @@ static qcms_profile *gCMSOutputProfile = nullptr; static qcms_profile *gCMSsRGBProfile = nullptr; +static bool gCMSRGBTransformFailed = false; static qcms_transform *gCMSRGBTransform = nullptr; static qcms_transform *gCMSInverseRGBTransform = nullptr; static qcms_transform *gCMSRGBATransform = nullptr; @@ -616,6 +617,9 @@ GFX_WEBRENDER_DEBUG(".disable-batching", 1 << 5) GFX_WEBRENDER_DEBUG(".epochs", 1 << 6) GFX_WEBRENDER_DEBUG(".compact-profiler", 1 << 7) + GFX_WEBRENDER_DEBUG(".echo-driver-messages", 1 << 8) + GFX_WEBRENDER_DEBUG(".new-frame-indicator", 1 << 9) + GFX_WEBRENDER_DEBUG(".new-scene-indicator", 1 << 10) #undef GFX_WEBRENDER_DEBUG gfx::gfxVars::SetWebRenderDebugFlags(flags); @@ -2085,7 +2089,7 @@ qcms_transform * gfxPlatform::GetCMSRGBTransform() { - if (!gCMSRGBTransform) { + if (!gCMSRGBTransform && !gCMSRGBTransformFailed) { qcms_profile *inProfile, *outProfile; outProfile = GetCMSOutputProfile(); inProfile = GetCMSsRGBProfile(); @@ -2096,6 +2100,9 @@ gCMSRGBTransform = qcms_transform_create(inProfile, QCMS_DATA_RGB_8, outProfile, QCMS_DATA_RGB_8, QCMS_INTENT_PERCEPTUAL); + if (!gCMSRGBTransform) { + gCMSRGBTransformFailed = true; + } } return gCMSRGBTransform; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/vr/gfxVR.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/vr/gfxVR.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/vr/gfxVR.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/vr/gfxVR.h 2018-06-20 17:29:10.000000000 +0000 @@ -106,7 +106,8 @@ struct VRSubmitFrameResultInfo { VRSubmitFrameResultInfo() - : mFrameNum(0), + : mFormat(SurfaceFormat::UNKNOWN), + mFrameNum(0), mWidth(0), mHeight(0) {} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/vr/gfxVROpenVR.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/vr/gfxVROpenVR.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/vr/gfxVROpenVR.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/vr/gfxVROpenVR.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -431,6 +431,7 @@ uint32_t aNumButtons, uint32_t aNumTriggers, uint32_t aNumAxes, const nsCString& aId) : VRControllerHost(VRDeviceType::OpenVR, aHand, aDisplayID) + , mTrackedIndex(0) , mVibrateThread(nullptr) , mIsVibrateStopped(false) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/Cargo.toml firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/Cargo.toml --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/Cargo.toml 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/Cargo.toml 2018-06-20 17:29:10.000000000 +0000 @@ -63,10 +63,6 @@ [dev-dependencies] mozangle = "0.1" -env_logger = "0.5" -rand = "0.3" # for the benchmarks -glutin = "0.15" # for the example apps -winit = "0.13" # for the example apps [target.'cfg(any(target_os = "android", all(unix, not(target_os = "macos"))))'.dependencies] freetype = { version = "0.4", default-features = false } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/alpha_perf.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/alpha_perf.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/alpha_perf.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/alpha_perf.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* 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/. */ - -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use std::cmp; -use webrender::api::*; - -struct App { - rect_count: usize, -} - -impl Example for App { - fn render( - &mut self, - _api: &RenderApi, - builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let bounds = (0, 0).to(1920, 1080); - let info = LayoutPrimitiveInfo::new(bounds); - - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - for _ in 0 .. self.rect_count { - builder.push_rect(&info, ColorF::new(1.0, 1.0, 1.0, 0.05)); - } - - builder.pop_stacking_context(); - } - - fn on_event( - &mut self, - event: winit::WindowEvent, - _api: &RenderApi, - _document_id: DocumentId - ) -> bool { - match event { - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - } => { - match key { - winit::VirtualKeyCode::Right => { - self.rect_count += 1; - println!("rects = {}", self.rect_count); - } - winit::VirtualKeyCode::Left => { - self.rect_count = cmp::max(self.rect_count, 1) - 1; - println!("rects = {}", self.rect_count); - } - _ => {} - }; - } - _ => (), - } - - true - } -} - -fn main() { - let mut app = App { - rect_count: 1, - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/animation.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/animation.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/animation.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/animation.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ -/* 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/. */ - -//! This example creates a 200x200 white rect and allows the user to move it -//! around by using the arrow keys and rotate with '<'/'>'. -//! It does this by using the animation API. - -//! The example also features seamless opaque/transparent split of a -//! rounded cornered rectangle, which is done automatically during the -//! scene building for render optimization. - -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use euclid::Angle; -use webrender::api::*; - -struct App { - property_key: PropertyBindingKey, - opacity_key: PropertyBindingKey, - transform: LayoutTransform, - opacity: f32, -} - -impl Example for App { - fn render( - &mut self, - _api: &RenderApi, - builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - // Create a 200x200 stacking context with an animated transform property. - let bounds = (0, 0).to(200, 200); - - let filters = vec![ - FilterOp::Opacity(PropertyBinding::Binding(self.opacity_key, self.opacity), self.opacity), - ]; - - let info = LayoutPrimitiveInfo::new(bounds); - let reference_frame_id = builder.push_reference_frame( - &info, - Some(PropertyBinding::Binding(self.property_key, LayoutTransform::identity())), - None, - ); - - builder.push_clip_id(reference_frame_id); - - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - filters, - GlyphRasterSpace::Screen, - ); - - let complex_clip = ComplexClipRegion { - rect: bounds, - radii: BorderRadius::uniform(50.0), - mode: ClipMode::Clip, - }; - let clip_id = builder.define_clip(bounds, vec![complex_clip], None); - builder.push_clip_id(clip_id); - - // Fill it with a white rect - builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - - builder.pop_clip_id(); - - builder.pop_stacking_context(); - - builder.pop_clip_id(); - builder.pop_reference_frame(); - } - - fn on_event(&mut self, win_event: winit::WindowEvent, api: &RenderApi, document_id: DocumentId) -> bool { - match win_event { - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - } => { - let (offset_x, offset_y, angle, delta_opacity) = match key { - winit::VirtualKeyCode::Down => (0.0, 10.0, 0.0, 0.0), - winit::VirtualKeyCode::Up => (0.0, -10.0, 0.0, 0.0), - winit::VirtualKeyCode::Right => (10.0, 0.0, 0.0, 0.0), - winit::VirtualKeyCode::Left => (-10.0, 0.0, 0.0, 0.0), - winit::VirtualKeyCode::Comma => (0.0, 0.0, 0.1, 0.0), - winit::VirtualKeyCode::Period => (0.0, 0.0, -0.1, 0.0), - winit::VirtualKeyCode::Z => (0.0, 0.0, 0.0, -0.1), - winit::VirtualKeyCode::X => (0.0, 0.0, 0.0, 0.1), - _ => return false, - }; - // Update the transform based on the keyboard input and push it to - // webrender using the generate_frame API. This will recomposite with - // the updated transform. - self.opacity += delta_opacity; - let new_transform = self.transform - .pre_rotate(0.0, 0.0, 1.0, Angle::radians(angle)) - .post_translate(LayoutVector3D::new(offset_x, offset_y, 0.0)); - let mut txn = Transaction::new(); - txn.update_dynamic_properties( - DynamicProperties { - transforms: vec![ - PropertyValue { - key: self.property_key, - value: new_transform, - }, - ], - floats: vec![ - PropertyValue { - key: self.opacity_key, - value: self.opacity, - } - ], - }, - ); - txn.generate_frame(); - api.send_transaction(document_id, txn); - self.transform = new_transform; - } - _ => (), - } - - false - } -} - -fn main() { - let mut app = App { - property_key: PropertyBindingKey::new(42), // arbitrary magic number - opacity_key: PropertyBindingKey::new(43), - transform: LayoutTransform::create_translation(0.0, 0.0, 0.0), - opacity: 0.5, - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/basic.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/basic.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/basic.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/basic.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,298 +0,0 @@ -/* 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/. */ - -extern crate app_units; -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use euclid::vec2; -use winit::TouchPhase; -use std::collections::HashMap; -use webrender::api::*; - -#[derive(Debug)] -enum Gesture { - None, - Pan, - Zoom, -} - -#[derive(Debug)] -struct Touch { - id: u64, - start_x: f32, - start_y: f32, - current_x: f32, - current_y: f32, -} - -fn dist(x0: f32, y0: f32, x1: f32, y1: f32) -> f32 { - let dx = x0 - x1; - let dy = y0 - y1; - ((dx * dx) + (dy * dy)).sqrt() -} - -impl Touch { - fn distance_from_start(&self) -> f32 { - dist(self.start_x, self.start_y, self.current_x, self.current_y) - } - - fn initial_distance_from_other(&self, other: &Touch) -> f32 { - dist(self.start_x, self.start_y, other.start_x, other.start_y) - } - - fn current_distance_from_other(&self, other: &Touch) -> f32 { - dist( - self.current_x, - self.current_y, - other.current_x, - other.current_y, - ) - } -} - -struct TouchState { - active_touches: HashMap, - current_gesture: Gesture, - start_zoom: f32, - current_zoom: f32, - start_pan: DeviceIntPoint, - current_pan: DeviceIntPoint, -} - -enum TouchResult { - None, - Pan(DeviceIntPoint), - Zoom(f32), -} - -impl TouchState { - fn new() -> TouchState { - TouchState { - active_touches: HashMap::new(), - current_gesture: Gesture::None, - start_zoom: 1.0, - current_zoom: 1.0, - start_pan: DeviceIntPoint::zero(), - current_pan: DeviceIntPoint::zero(), - } - } - - fn handle_event(&mut self, touch: winit::Touch) -> TouchResult { - match touch.phase { - TouchPhase::Started => { - debug_assert!(!self.active_touches.contains_key(&touch.id)); - self.active_touches.insert( - touch.id, - Touch { - id: touch.id, - start_x: touch.location.0 as f32, - start_y: touch.location.1 as f32, - current_x: touch.location.0 as f32, - current_y: touch.location.1 as f32, - }, - ); - self.current_gesture = Gesture::None; - } - TouchPhase::Moved => { - match self.active_touches.get_mut(&touch.id) { - Some(active_touch) => { - active_touch.current_x = touch.location.0 as f32; - active_touch.current_y = touch.location.1 as f32; - } - None => panic!("move touch event with unknown touch id!"), - } - - match self.current_gesture { - Gesture::None => { - let mut over_threshold_count = 0; - let active_touch_count = self.active_touches.len(); - - for (_, touch) in &self.active_touches { - if touch.distance_from_start() > 8.0 { - over_threshold_count += 1; - } - } - - if active_touch_count == over_threshold_count { - if active_touch_count == 1 { - self.start_pan = self.current_pan; - self.current_gesture = Gesture::Pan; - } else if active_touch_count == 2 { - self.start_zoom = self.current_zoom; - self.current_gesture = Gesture::Zoom; - } - } - } - Gesture::Pan => { - let keys: Vec = self.active_touches.keys().cloned().collect(); - debug_assert!(keys.len() == 1); - let active_touch = &self.active_touches[&keys[0]]; - let x = active_touch.current_x - active_touch.start_x; - let y = active_touch.current_y - active_touch.start_y; - self.current_pan.x = self.start_pan.x + x.round() as i32; - self.current_pan.y = self.start_pan.y + y.round() as i32; - return TouchResult::Pan(self.current_pan); - } - Gesture::Zoom => { - let keys: Vec = self.active_touches.keys().cloned().collect(); - debug_assert!(keys.len() == 2); - let touch0 = &self.active_touches[&keys[0]]; - let touch1 = &self.active_touches[&keys[1]]; - let initial_distance = touch0.initial_distance_from_other(touch1); - let current_distance = touch0.current_distance_from_other(touch1); - self.current_zoom = self.start_zoom * current_distance / initial_distance; - return TouchResult::Zoom(self.current_zoom); - } - } - } - TouchPhase::Ended | TouchPhase::Cancelled => { - self.active_touches.remove(&touch.id).unwrap(); - self.current_gesture = Gesture::None; - } - } - - TouchResult::None - } -} - -fn main() { - let mut app = App { - touch_state: TouchState::new(), - }; - boilerplate::main_wrapper(&mut app, None); -} - -struct App { - touch_state: TouchState, -} - -impl Example for App { - // Make this the only example to test all shaders for compile errors. - const PRECACHE_SHADERS: bool = true; - - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - _: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size()); - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - let image_mask_key = api.generate_image_key(); - txn.add_image( - image_mask_key, - ImageDescriptor::new(2, 2, ImageFormat::R8, true, false), - ImageData::new(vec![0, 80, 180, 255]), - None, - ); - let mask = ImageMask { - image: image_mask_key, - rect: (75, 75).by(100, 100), - repeat: false, - }; - let complex = ComplexClipRegion::new( - (50, 50).to(150, 150), - BorderRadius::uniform(20.0), - ClipMode::Clip - ); - let id = builder.define_clip(bounds, vec![complex], Some(mask)); - builder.push_clip_id(id); - - let info = LayoutPrimitiveInfo::new((100, 100).to(200, 200)); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - - let info = LayoutPrimitiveInfo::new((250, 100).to(350, 200)); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - let border_side = BorderSide { - color: ColorF::new(0.0, 0.0, 1.0, 1.0), - style: BorderStyle::Groove, - }; - let border_widths = BorderWidths { - top: 10.0, - left: 10.0, - bottom: 10.0, - right: 10.0, - }; - let border_details = BorderDetails::Normal(NormalBorder { - top: border_side, - right: border_side, - bottom: border_side, - left: border_side, - radius: BorderRadius::uniform(20.0), - }); - - let info = LayoutPrimitiveInfo::new((100, 100).to(200, 200)); - builder.push_border(&info, border_widths, border_details); - builder.pop_clip_id(); - - if false { - // draw box shadow? - let rect = LayoutRect::zero(); - let simple_box_bounds = (20, 200).by(50, 50); - let offset = vec2(10.0, 10.0); - let color = ColorF::new(1.0, 1.0, 1.0, 1.0); - let blur_radius = 0.0; - let spread_radius = 0.0; - let simple_border_radius = 8.0; - let box_shadow_type = BoxShadowClipMode::Inset; - let info = LayoutPrimitiveInfo::with_clip_rect(rect, bounds); - - builder.push_box_shadow( - &info, - simple_box_bounds, - offset, - color, - blur_radius, - spread_radius, - BorderRadius::uniform(simple_border_radius), - box_shadow_type, - ); - } - - builder.pop_stacking_context(); - } - - fn on_event(&mut self, event: winit::WindowEvent, api: &RenderApi, document_id: DocumentId) -> bool { - let mut txn = Transaction::new(); - match event { - winit::WindowEvent::Touch(touch) => match self.touch_state.handle_event(touch) { - TouchResult::Pan(pan) => { - txn.set_pan(pan); - } - TouchResult::Zoom(zoom) => { - txn.set_pinch_zoom(ZoomFactor::new(zoom)); - } - TouchResult::None => {} - }, - _ => (), - } - - if !txn.is_empty() { - txn.generate_frame(); - api.send_transaction(document_id, txn); - } - - false - } -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/blob.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/blob.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/blob.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/blob.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,302 +0,0 @@ -/* 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/. */ - -extern crate gleam; -extern crate glutin; -extern crate rayon; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use rayon::{ThreadPool, ThreadPoolBuilder}; -use std::collections::HashMap; -use std::collections::hash_map::Entry; -use std::sync::Arc; -use std::sync::mpsc::{Receiver, Sender, channel}; -use webrender::api::{self, DisplayListBuilder, DocumentId, PipelineId, RenderApi, Transaction}; - -// This example shows how to implement a very basic BlobImageRenderer that can only render -// a checkerboard pattern. - -// The deserialized command list internally used by this example is just a color. -type ImageRenderingCommands = api::ColorU; - -// Serialize/deserialize the blob. -// For real usecases you should probably use serde rather than doing it by hand. - -fn serialize_blob(color: api::ColorU) -> Vec { - vec![color.r, color.g, color.b, color.a] -} - -fn deserialize_blob(blob: &[u8]) -> Result { - let mut iter = blob.iter(); - return match (iter.next(), iter.next(), iter.next(), iter.next()) { - (Some(&r), Some(&g), Some(&b), Some(&a)) => Ok(api::ColorU::new(r, g, b, a)), - (Some(&a), None, None, None) => Ok(api::ColorU::new(a, a, a, a)), - _ => Err(()), - }; -} - -// This is the function that applies the deserialized drawing commands and generates -// actual image data. -fn render_blob( - commands: Arc, - descriptor: &api::BlobImageDescriptor, - tile: Option, -) -> api::BlobImageResult { - let color = *commands; - - // Allocate storage for the result. Right now the resource cache expects the - // tiles to have have no stride or offset. - let mut texels = Vec::with_capacity((descriptor.size.width * descriptor.size.height * 4) as usize); - - // Generate a per-tile pattern to see it in the demo. For a real use case it would not - // make sense for the rendered content to depend on its tile. - let tile_checker = match tile { - Some(tile) => (tile.x % 2 == 0) != (tile.y % 2 == 0), - None => true, - }; - - for y in 0 .. descriptor.size.height { - for x in 0 .. descriptor.size.width { - // Apply the tile's offset. This is important: all drawing commands should be - // translated by this offset to give correct results with tiled blob images. - let x2 = x + descriptor.offset.x as u32; - let y2 = y + descriptor.offset.y as u32; - - // Render a simple checkerboard pattern - let checker = if (x2 % 20 >= 10) != (y2 % 20 >= 10) { - 1 - } else { - 0 - }; - // ..nested in the per-tile checkerboard pattern - let tc = if tile_checker { 0 } else { (1 - checker) * 40 }; - - match descriptor.format { - api::ImageFormat::BGRA8 => { - texels.push(color.b * checker + tc); - texels.push(color.g * checker + tc); - texels.push(color.r * checker + tc); - texels.push(color.a * checker + tc); - } - api::ImageFormat::R8 => { - texels.push(color.a * checker + tc); - } - _ => { - return Err(api::BlobImageError::Other( - format!("Unsupported image format"), - )); - } - } - } - } - - Ok(api::RasterizedBlobImage { - data: texels, - size: descriptor.size, - }) -} - -struct CheckerboardRenderer { - // We are going to defer the rendering work to worker threads. - // Using a pre-built Arc rather than creating our own threads - // makes it possible to share the same thread pool as the glyph renderer (if we - // want to). - workers: Arc, - - // the workers will use an mpsc channel to communicate the result. - tx: Sender<(api::BlobImageRequest, api::BlobImageResult)>, - rx: Receiver<(api::BlobImageRequest, api::BlobImageResult)>, - - // The deserialized drawing commands. - // In this example we store them in Arcs. This isn't necessary since in this simplified - // case the command list is a simple 32 bits value and would be cheap to clone before sending - // to the workers. But in a more realistic scenario the commands would typically be bigger - // and more expensive to clone, so let's pretend it is also the case here. - image_cmds: HashMap>, - - // The images rendered in the current frame (not kept here between frames). - rendered_images: HashMap>, -} - -impl CheckerboardRenderer { - fn new(workers: Arc) -> Self { - let (tx, rx) = channel(); - CheckerboardRenderer { - image_cmds: HashMap::new(), - rendered_images: HashMap::new(), - workers, - tx, - rx, - } - } -} - -impl api::BlobImageRenderer for CheckerboardRenderer { - fn add(&mut self, key: api::ImageKey, cmds: Arc, _: Option) { - self.image_cmds - .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap())); - } - - fn update(&mut self, key: api::ImageKey, cmds: Arc, _dirty_rect: Option) { - // Here, updating is just replacing the current version of the commands with - // the new one (no incremental updates). - self.image_cmds - .insert(key, Arc::new(deserialize_blob(&cmds[..]).unwrap())); - } - - fn delete(&mut self, key: api::ImageKey) { - self.image_cmds.remove(&key); - } - - fn request( - &mut self, - _resources: &api::BlobImageResources, - request: api::BlobImageRequest, - descriptor: &api::BlobImageDescriptor, - _dirty_rect: Option, - ) { - // This method is where we kick off our rendering jobs. - // It should avoid doing work on the calling thread as much as possible. - // In this example we will use the thread pool to render individual tiles. - - // Gather the input data to send to a worker thread. - let cmds = Arc::clone(&self.image_cmds.get(&request.key).unwrap()); - let tx = self.tx.clone(); - let descriptor = descriptor.clone(); - - self.workers.spawn(move || { - let result = render_blob(cmds, &descriptor, request.tile); - tx.send((request, result)).unwrap(); - }); - - // Add None in the map of rendered images. This makes it possible to differentiate - // between commands that aren't finished yet (entry in the map is equal to None) and - // keys that have never been requested (entry not in the map), which would cause deadlocks - // if we were to block upon receiving their result in resolve! - self.rendered_images.insert(request, None); - } - - fn resolve(&mut self, request: api::BlobImageRequest) -> api::BlobImageResult { - // In this method we wait until the work is complete on the worker threads and - // gather the results. - - // First look at whether we have already received the rendered image - // that we are looking for. - match self.rendered_images.entry(request) { - Entry::Vacant(_) => { - return Err(api::BlobImageError::InvalidKey); - } - Entry::Occupied(entry) => { - // None means we haven't yet received the result. - if entry.get().is_some() { - let result = entry.remove(); - return result.unwrap(); - } - } - } - - // We haven't received it yet, pull from the channel until we receive it. - while let Ok((req, result)) = self.rx.recv() { - if req == request { - // There it is! - return result; - } - self.rendered_images.insert(req, Some(result)); - } - - // If we break out of the loop above it means the channel closed unexpectedly. - Err(api::BlobImageError::Other("Channel closed".into())) - } - fn delete_font(&mut self, _font: api::FontKey) {} - fn delete_font_instance(&mut self, _instance: api::FontInstanceKey) {} - fn clear_namespace(&mut self, _namespace: api::IdNamespace) {} -} - -struct App {} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - _framebuffer_size: api::DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let blob_img1 = api.generate_image_key(); - txn.add_image( - blob_img1, - api::ImageDescriptor::new(500, 500, api::ImageFormat::BGRA8, true, false), - api::ImageData::new_blob_image(serialize_blob(api::ColorU::new(50, 50, 150, 255))), - Some(128), - ); - - let blob_img2 = api.generate_image_key(); - txn.add_image( - blob_img2, - api::ImageDescriptor::new(200, 200, api::ImageFormat::BGRA8, true, false), - api::ImageData::new_blob_image(serialize_blob(api::ColorU::new(50, 150, 50, 255))), - None, - ); - - let bounds = api::LayoutRect::new(api::LayoutPoint::zero(), builder.content_size()); - let info = api::LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - api::TransformStyle::Flat, - api::MixBlendMode::Normal, - Vec::new(), - api::GlyphRasterSpace::Screen, - ); - - let info = api::LayoutPrimitiveInfo::new((30, 30).by(500, 500)); - builder.push_image( - &info, - api::LayoutSize::new(500.0, 500.0), - api::LayoutSize::new(0.0, 0.0), - api::ImageRendering::Auto, - api::AlphaType::PremultipliedAlpha, - blob_img1, - ); - - let info = api::LayoutPrimitiveInfo::new((600, 600).by(200, 200)); - builder.push_image( - &info, - api::LayoutSize::new(200.0, 200.0), - api::LayoutSize::new(0.0, 0.0), - api::ImageRendering::Auto, - api::AlphaType::PremultipliedAlpha, - blob_img2, - ); - - builder.pop_stacking_context(); - } -} - -fn main() { - let workers = - ThreadPoolBuilder::new().thread_name(|idx| format!("WebRender:Worker#{}", idx)) - .build(); - - let workers = Arc::new(workers.unwrap()); - - let opts = webrender::RendererOptions { - workers: Some(Arc::clone(&workers)), - // Register our blob renderer, so that WebRender integrates it in the resource cache.. - // Share the same pool of worker threads between WebRender and our blob renderer. - blob_image_renderer: Some(Box::new(CheckerboardRenderer::new(Arc::clone(&workers)))), - ..Default::default() - }; - - let mut app = App {}; - - boilerplate::main_wrapper(&mut app, Some(opts)); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/common/boilerplate.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/common/boilerplate.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/common/boilerplate.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/common/boilerplate.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,286 +0,0 @@ -/* 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/. */ - -extern crate env_logger; -extern crate euclid; - -use gleam::gl; -use glutin::{self, GlContext}; -use std::env; -use std::path::PathBuf; -use webrender; -use winit; -use webrender::api::*; - -struct Notifier { - events_proxy: winit::EventsLoopProxy, -} - -impl Notifier { - fn new(events_proxy: winit::EventsLoopProxy) -> Notifier { - Notifier { events_proxy } - } -} - -impl RenderNotifier for Notifier { - fn clone(&self) -> Box { - Box::new(Notifier { - events_proxy: self.events_proxy.clone(), - }) - } - - fn wake_up(&self) { - #[cfg(not(target_os = "android"))] - let _ = self.events_proxy.wakeup(); - } - - fn new_frame_ready(&self, _: DocumentId, _scrolled: bool, _composite_needed: bool) { - self.wake_up(); - } -} - -pub trait HandyDandyRectBuilder { - fn to(&self, x2: i32, y2: i32) -> LayoutRect; - fn by(&self, w: i32, h: i32) -> LayoutRect; -} -// Allows doing `(x, y).to(x2, y2)` or `(x, y).by(width, height)` with i32 -// values to build a f32 LayoutRect -impl HandyDandyRectBuilder for (i32, i32) { - fn to(&self, x2: i32, y2: i32) -> LayoutRect { - LayoutRect::new( - LayoutPoint::new(self.0 as f32, self.1 as f32), - LayoutSize::new((x2 - self.0) as f32, (y2 - self.1) as f32), - ) - } - - fn by(&self, w: i32, h: i32) -> LayoutRect { - LayoutRect::new( - LayoutPoint::new(self.0 as f32, self.1 as f32), - LayoutSize::new(w as f32, h as f32), - ) - } -} - -pub trait Example { - const TITLE: &'static str = "WebRender Sample App"; - const PRECACHE_SHADERS: bool = false; - const WIDTH: u32 = 1920; - const HEIGHT: u32 = 1080; - - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - framebuffer_size: DeviceUintSize, - pipeline_id: PipelineId, - document_id: DocumentId, - ); - fn on_event(&mut self, winit::WindowEvent, &RenderApi, DocumentId) -> bool { - false - } - fn get_image_handlers( - &mut self, - _gl: &gl::Gl, - ) -> (Option>, - Option>) { - (None, None) - } - fn draw_custom(&self, _gl: &gl::Gl) { - } -} - -pub fn main_wrapper( - example: &mut E, - options: Option, -) { - env_logger::init(); - - let args: Vec = env::args().collect(); - let res_path = if args.len() > 1 { - Some(PathBuf::from(&args[1])) - } else { - None - }; - - let mut events_loop = winit::EventsLoop::new(); - let context_builder = glutin::ContextBuilder::new() - .with_gl(glutin::GlRequest::GlThenGles { - opengl_version: (3, 2), - opengles_version: (3, 0), - }); - let window_builder = winit::WindowBuilder::new() - .with_title(E::TITLE) - .with_multitouch() - .with_dimensions(E::WIDTH, E::HEIGHT); - let window = glutin::GlWindow::new(window_builder, context_builder, &events_loop) - .unwrap(); - - unsafe { - window.make_current().ok(); - } - - let gl = match window.get_api() { - glutin::Api::OpenGl => unsafe { - gl::GlFns::load_with(|symbol| window.get_proc_address(symbol) as *const _) - }, - glutin::Api::OpenGlEs => unsafe { - gl::GlesFns::load_with(|symbol| window.get_proc_address(symbol) as *const _) - }, - glutin::Api::WebGl => unimplemented!(), - }; - - println!("OpenGL version {}", gl.get_string(gl::VERSION)); - println!("Shader resource path: {:?}", res_path); - let device_pixel_ratio = window.hidpi_factor(); - println!("Device pixel ratio: {}", device_pixel_ratio); - - println!("Loading shaders..."); - let opts = webrender::RendererOptions { - resource_override_path: res_path, - precache_shaders: E::PRECACHE_SHADERS, - device_pixel_ratio, - clear_color: Some(ColorF::new(0.3, 0.0, 0.0, 1.0)), - //scatter_gpu_cache_updates: false, - debug_flags: webrender::DebugFlags::ECHO_DRIVER_MESSAGES, - ..options.unwrap_or(webrender::RendererOptions::default()) - }; - - let framebuffer_size = { - let (width, height) = window.get_inner_size().unwrap(); - DeviceUintSize::new(width, height) - }; - let notifier = Box::new(Notifier::new(events_loop.create_proxy())); - let (mut renderer, sender) = webrender::Renderer::new(gl.clone(), notifier, opts).unwrap(); - let api = sender.create_api(); - let document_id = api.add_document(framebuffer_size, 0); - - let (external, output) = example.get_image_handlers(&*gl); - - if let Some(output_image_handler) = output { - renderer.set_output_image_handler(output_image_handler); - } - - if let Some(external_image_handler) = external { - renderer.set_external_image_handler(external_image_handler); - } - - let epoch = Epoch(0); - let pipeline_id = PipelineId(0, 0); - let layout_size = framebuffer_size.to_f32() / euclid::TypedScale::new(device_pixel_ratio); - let mut builder = DisplayListBuilder::new(pipeline_id, layout_size); - let mut txn = Transaction::new(); - - example.render( - &api, - &mut builder, - &mut txn, - framebuffer_size, - pipeline_id, - document_id, - ); - txn.set_display_list( - epoch, - None, - layout_size, - builder.finalize(), - true, - ); - txn.set_root_pipeline(pipeline_id); - txn.generate_frame(); - api.send_transaction(document_id, txn); - - println!("Entering event loop"); - events_loop.run_forever(|global_event| { - let mut txn = Transaction::new(); - let mut custom_event = true; - - match global_event { - winit::Event::WindowEvent { - event: winit::WindowEvent::CloseRequested, - .. - } => return winit::ControlFlow::Break, - winit::Event::WindowEvent { - event: winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - }, - .. - } => match key { - winit::VirtualKeyCode::Escape => return winit::ControlFlow::Break, - winit::VirtualKeyCode::P => renderer.toggle_debug_flags(webrender::DebugFlags::PROFILER_DBG), - winit::VirtualKeyCode::O => renderer.toggle_debug_flags(webrender::DebugFlags::RENDER_TARGET_DBG), - winit::VirtualKeyCode::I => renderer.toggle_debug_flags(webrender::DebugFlags::TEXTURE_CACHE_DBG), - winit::VirtualKeyCode::S => renderer.toggle_debug_flags(webrender::DebugFlags::COMPACT_PROFILER), - winit::VirtualKeyCode::Q => renderer.toggle_debug_flags( - webrender::DebugFlags::GPU_TIME_QUERIES | webrender::DebugFlags::GPU_SAMPLE_QUERIES - ), - winit::VirtualKeyCode::Key1 => txn.set_window_parameters( - framebuffer_size, - DeviceUintRect::new(DeviceUintPoint::zero(), framebuffer_size), - 1.0 - ), - winit::VirtualKeyCode::Key2 => txn.set_window_parameters( - framebuffer_size, - DeviceUintRect::new(DeviceUintPoint::zero(), framebuffer_size), - 2.0 - ), - winit::VirtualKeyCode::M => api.notify_memory_pressure(), - #[cfg(feature = "capture")] - winit::VirtualKeyCode::C => { - let path: PathBuf = "../captures/example".into(); - //TODO: switch between SCENE/FRAME capture types - // based on "shift" modifier, when `glutin` is updated. - let bits = CaptureBits::all(); - api.save_capture(path, bits); - }, - _ => { - let win_event = match global_event { - winit::Event::WindowEvent { event, .. } => event, - _ => unreachable!() - }; - custom_event = example.on_event(win_event, &api, document_id) - }, - }, - winit::Event::WindowEvent { event, .. } => custom_event = example.on_event(event, &api, document_id), - _ => return winit::ControlFlow::Continue, - }; - - if custom_event { - let mut builder = DisplayListBuilder::new(pipeline_id, layout_size); - - example.render( - &api, - &mut builder, - &mut txn, - framebuffer_size, - pipeline_id, - document_id, - ); - txn.set_display_list( - epoch, - None, - layout_size, - builder.finalize(), - true, - ); - txn.generate_frame(); - } - api.send_transaction(document_id, txn); - - renderer.update(); - renderer.render(framebuffer_size).unwrap(); - let _ = renderer.flush_pipeline_info(); - example.draw_custom(&*gl); - window.swap_buffers().ok(); - - winit::ControlFlow::Continue - }); - - renderer.deinit(); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/common/image_helper.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/common/image_helper.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/common/image_helper.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/common/image_helper.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -/* 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/. */ - -use webrender::api::{ImageData, ImageDescriptor, ImageFormat}; - -pub fn make_checkerboard(width: u32, height: u32) -> (ImageDescriptor, ImageData) { - let mut image_data = Vec::new(); - for y in 0 .. height { - for x in 0 .. width { - let lum = 255 * (((x & 8) == 0) ^ ((y & 8) == 0)) as u8; - image_data.extend_from_slice(&[lum, lum, lum, 0xff]); - } - } - (ImageDescriptor::new(width, height, ImageFormat::BGRA8, true, false), ImageData::new(image_data)) -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/document.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/document.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/document.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/document.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -/* 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/. */ - -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::Example; -use euclid::TypedScale; -use webrender::api::*; - -// This example creates multiple documents overlapping each other with -// specified layer indices. - -struct Document { - id: DocumentId, - pipeline_id: PipelineId, - content_rect: LayoutRect, - color: ColorF, -} - -struct App { - documents: Vec, -} - -impl App { - fn init( - &mut self, - api: &RenderApi, - framebuffer_size: DeviceUintSize, - device_pixel_ratio: f32, - ) { - let init_data = vec![ - ( - PipelineId(1, 0), - -1, - ColorF::new(0.0, 1.0, 0.0, 1.0), - DeviceUintPoint::new(0, 0), - ), - ( - PipelineId(2, 0), - -2, - ColorF::new(1.0, 1.0, 0.0, 1.0), - DeviceUintPoint::new(200, 0), - ), - ( - PipelineId(3, 0), - -3, - ColorF::new(1.0, 0.0, 0.0, 1.0), - DeviceUintPoint::new(200, 200), - ), - ( - PipelineId(4, 0), - -4, - ColorF::new(1.0, 0.0, 1.0, 1.0), - DeviceUintPoint::new(0, 200), - ), - ]; - - for (pipeline_id, layer, color, offset) in init_data { - let size = DeviceUintSize::new(250, 250); - let bounds = DeviceUintRect::new(offset, size); - - let document_id = api.add_document(size, layer); - let mut txn = Transaction::new(); - txn.set_window_parameters(framebuffer_size, bounds, device_pixel_ratio); - txn.set_root_pipeline(pipeline_id); - api.send_transaction(document_id, txn); - - self.documents.push(Document { - id: document_id, - pipeline_id, - content_rect: bounds.to_f32() / TypedScale::new(device_pixel_ratio), - color, - }); - } - } -} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - base_builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - framebuffer_size: DeviceUintSize, - _: PipelineId, - _: DocumentId, - ) { - if self.documents.is_empty() { - let device_pixel_ratio = framebuffer_size.width as f32 / - base_builder.content_size().width; - // this is the first run, hack around the boilerplate, - // which assumes an example only needs one document - self.init(api, framebuffer_size, device_pixel_ratio); - } - - for doc in &self.documents { - let mut builder = DisplayListBuilder::new( - doc.pipeline_id, - doc.content_rect.size, - ); - let local_rect = LayoutRect::new( - LayoutPoint::zero(), - doc.content_rect.size, - ); - - builder.push_stacking_context( - &LayoutPrimitiveInfo::new(doc.content_rect), - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - builder.push_rect( - &LayoutPrimitiveInfo::new(local_rect), - doc.color, - ); - builder.pop_stacking_context(); - - let mut txn = Transaction::new(); - txn.set_display_list( - Epoch(0), - None, - doc.content_rect.size, - builder.finalize(), - true, - ); - txn.generate_frame(); - api.send_transaction(doc.id, txn); - } - } -} - -fn main() { - let mut app = App { - documents: Vec::new(), - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/frame_output.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/frame_output.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/frame_output.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/frame_output.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,222 +0,0 @@ -/* 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/. */ - -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use euclid::TypedScale; -use gleam::gl; -use webrender::api::*; - -// This example demonstrates using the frame output feature to copy -// the output of a WR framebuffer to a custom texture. - -#[derive(Debug)] -struct Document { - id: DocumentId, - pipeline_id: PipelineId, - content_rect: LayoutRect, - color: ColorF, -} - - -struct App { - external_image_key: Option, - output_document: Option -} - -struct OutputHandler { - texture_id: gl::GLuint -} - -struct ExternalHandler { - texture_id: gl::GLuint -} - -impl webrender::OutputImageHandler for OutputHandler { - fn lock(&mut self, _id: PipelineId) -> Option<(u32, DeviceIntSize)> { - Some((self.texture_id, DeviceIntSize::new(500, 500))) - } - - fn unlock(&mut self, _id: PipelineId) {} -} - -impl webrender::ExternalImageHandler for ExternalHandler { - fn lock(&mut self, _key: ExternalImageId, _channel_index: u8) -> webrender::ExternalImage { - webrender::ExternalImage { - uv: TexelRect::new(0.0, 0.0, 1.0, 1.0), - source: webrender::ExternalImageSource::NativeTexture(self.texture_id), - } - } - fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {} -} - -impl App { - fn init_output_document( - &mut self, - api: &RenderApi, - framebuffer_size: DeviceUintSize, - device_pixel_ratio: f32, - ) { - // Generate the external image key that will be used to render the output document to the root document. - self.external_image_key = Some(api.generate_image_key()); - let mut txn = Transaction::new(); - txn.add_image( - self.external_image_key.unwrap(), - ImageDescriptor::new(100, 100, ImageFormat::BGRA8, true, false), - ImageData::External(ExternalImageData { - id: ExternalImageId(0), - channel_index: 0, - image_type: ExternalImageType::TextureHandle(TextureTarget::Default), - }), - None, - ); - - let pipeline_id = PipelineId(1, 0); - let layer = 1; - let color = ColorF::new(1., 1., 0., 1.); - let bounds = DeviceUintRect::new(DeviceUintPoint::zero(), framebuffer_size); - let document_id = api.add_document(framebuffer_size, layer); - - let document = Document { - id: document_id, - pipeline_id, - content_rect: bounds.to_f32() / TypedScale::new(device_pixel_ratio), - color, - }; - - let info = LayoutPrimitiveInfo::new(document.content_rect); - let mut builder = DisplayListBuilder::new( - document.pipeline_id, - document.content_rect.size, - ); - - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - builder.push_rect(&info, ColorF::new(1.0, 1.0, 0.0, 1.0)); - builder.pop_stacking_context(); - - txn.set_root_pipeline(pipeline_id); - txn.enable_frame_output(document.pipeline_id, true); - txn.set_display_list( - Epoch(0), - Some(document.color), - document.content_rect.size, - builder.finalize(), - true, - ); - txn.generate_frame(); - api.send_transaction(document.id, txn); - self.output_document = Some(document); - } -} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - if self.output_document.is_none() { - let device_pixel_ratio = framebuffer_size.width as f32 / - builder.content_size().width; - self.init_output_document(api, DeviceUintSize::new(200, 200), device_pixel_ratio); - } - - let info = LayoutPrimitiveInfo::new((100, 100).to(200, 200)); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - builder.push_image( - &info, - info.rect.size, - LayoutSize::zero(), - ImageRendering::Auto, - AlphaType::PremultipliedAlpha, - self.external_image_key.unwrap() - ); - - builder.pop_stacking_context(); - } - - fn get_image_handlers( - &mut self, - gl: &gl::Gl, - ) -> (Option>, - Option>) { - let texture_id = gl.gen_textures(1)[0]; - - gl.bind_texture(gl::TEXTURE_2D, texture_id); - gl.tex_parameter_i( - gl::TEXTURE_2D, - gl::TEXTURE_MAG_FILTER, - gl::LINEAR as gl::GLint, - ); - gl.tex_parameter_i( - gl::TEXTURE_2D, - gl::TEXTURE_MIN_FILTER, - gl::LINEAR as gl::GLint, - ); - gl.tex_parameter_i( - gl::TEXTURE_2D, - gl::TEXTURE_WRAP_S, - gl::CLAMP_TO_EDGE as gl::GLint, - ); - gl.tex_parameter_i( - gl::TEXTURE_2D, - gl::TEXTURE_WRAP_T, - gl::CLAMP_TO_EDGE as gl::GLint, - ); - gl.tex_image_2d( - gl::TEXTURE_2D, - 0, - gl::RGBA as gl::GLint, - 100, - 100, - 0, - gl::BGRA, - gl::UNSIGNED_BYTE, - None, - ); - gl.bind_texture(gl::TEXTURE_2D, 0); - - ( - Some(Box::new(ExternalHandler { texture_id })), - Some(Box::new(OutputHandler { texture_id })) - ) - } -} - -fn main() { - let mut app = App { - external_image_key: None, - output_document: None - }; - - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/iframe.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/iframe.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/iframe.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/iframe.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -/* 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/. */ - -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use webrender::api::*; - -// This example uses the push_iframe API to nest a second pipeline's displaylist -// inside the root pipeline's display list. When it works, a green square is -// shown. If it fails, a red square is shown. - -struct App {} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - pipeline_id: PipelineId, - document_id: DocumentId, - ) { - // All the sub_* things are for the nested pipeline - let sub_size = DeviceUintSize::new(100, 100); - let sub_bounds = (0, 0).to(sub_size.width as i32, sub_size.height as i32); - - let sub_pipeline_id = PipelineId(pipeline_id.0, 42); - let mut sub_builder = DisplayListBuilder::new(sub_pipeline_id, sub_bounds.size); - - let info = LayoutPrimitiveInfo::new(sub_bounds); - sub_builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - // green rect visible == success - sub_builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - sub_builder.pop_stacking_context(); - - let mut txn = Transaction::new(); - txn.set_display_list( - Epoch(0), - None, - sub_bounds.size, - sub_builder.finalize(), - true, - ); - api.send_transaction(document_id, txn); - - let info = LayoutPrimitiveInfo::new(sub_bounds); - let reference_frame_id = builder.push_reference_frame( - &info, - Some(PropertyBinding::Binding(PropertyBindingKey::new(42), LayoutTransform::identity())), - None, - ); - builder.push_clip_id(reference_frame_id); - - - // And this is for the root pipeline - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - // red rect under the iframe: if this is visible, things have gone wrong - builder.push_rect(&info, ColorF::new(1.0, 0.0, 0.0, 1.0)); - builder.push_iframe(&info, sub_pipeline_id, false); - builder.pop_stacking_context(); - - builder.pop_clip_id(); - builder.pop_reference_frame(); - } -} - -fn main() { - let mut app = App {}; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/image_resize.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/image_resize.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/image_resize.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/image_resize.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/* 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/. */ - -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; -#[path = "common/image_helper.rs"] -mod image_helper; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use webrender::api::*; - -struct App { - image_key: ImageKey, -} - -impl Example for App { - fn render( - &mut self, - _api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let (image_descriptor, image_data) = image_helper::make_checkerboard(32, 32); - txn.add_image( - self.image_key, - image_descriptor, - image_data, - None, - ); - - let bounds = (0, 0).to(512, 512); - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - let image_size = LayoutSize::new(100.0, 100.0); - - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(100.0, 100.0), image_size), - bounds, - ); - builder.push_image( - &info, - image_size, - LayoutSize::zero(), - ImageRendering::Auto, - AlphaType::PremultipliedAlpha, - self.image_key, - ); - - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(250.0, 100.0), image_size), - bounds, - ); - builder.push_image( - &info, - image_size, - LayoutSize::zero(), - ImageRendering::Pixelated, - AlphaType::PremultipliedAlpha, - self.image_key, - ); - - builder.pop_stacking_context(); - } - - fn on_event(&mut self, event: winit::WindowEvent, api: &RenderApi, document_id: DocumentId) -> bool { - match event { - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(winit::VirtualKeyCode::Space), - .. - }, - .. - } => { - let mut image_data = Vec::new(); - for y in 0 .. 64 { - for x in 0 .. 64 { - let r = 255 * ((y & 32) == 0) as u8; - let g = 255 * ((x & 32) == 0) as u8; - image_data.extend_from_slice(&[0, g, r, 0xff]); - } - } - - let mut txn = Transaction::new(); - txn.update_image( - self.image_key, - ImageDescriptor::new(64, 64, ImageFormat::BGRA8, true, false), - ImageData::new(image_data), - None, - ); - let mut txn = Transaction::new(); - txn.generate_frame(); - api.send_transaction(document_id, txn); - } - _ => {} - } - - false - } -} - -fn main() { - let mut app = App { - image_key: ImageKey(IdNamespace(0), 0), - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/multiwindow.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/multiwindow.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/multiwindow.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/multiwindow.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,306 +0,0 @@ -/* 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/. */ - -extern crate app_units; -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -use app_units::Au; -use gleam::gl; -use glutin::GlContext; -use std::fs::File; -use std::io::Read; -use webrender::api::*; - -struct Notifier { - events_proxy: winit::EventsLoopProxy, -} - -impl Notifier { - fn new(events_proxy: winit::EventsLoopProxy) -> Notifier { - Notifier { events_proxy } - } -} - -impl RenderNotifier for Notifier { - fn clone(&self) -> Box { - Box::new(Notifier { - events_proxy: self.events_proxy.clone(), - }) - } - - fn wake_up(&self) { - #[cfg(not(target_os = "android"))] - let _ = self.events_proxy.wakeup(); - } - - fn new_frame_ready(&self, _: DocumentId, _scrolled: bool, _composite_needed: bool) { - self.wake_up(); - } -} - -struct Window { - events_loop: winit::EventsLoop, //TODO: share events loop? - window: glutin::GlWindow, - renderer: webrender::Renderer, - name: &'static str, - pipeline_id: PipelineId, - document_id: DocumentId, - epoch: Epoch, - api: RenderApi, - font_instance_key: FontInstanceKey, -} - -impl Window { - fn new(name: &'static str, clear_color: ColorF) -> Self { - let events_loop = winit::EventsLoop::new(); - let context_builder = glutin::ContextBuilder::new() - .with_gl(glutin::GlRequest::GlThenGles { - opengl_version: (3, 2), - opengles_version: (3, 0), - }); - let window_builder = winit::WindowBuilder::new() - .with_title(name) - .with_multitouch() - .with_dimensions(800, 600); - let window = glutin::GlWindow::new(window_builder, context_builder, &events_loop) - .unwrap(); - - unsafe { - window.make_current().ok(); - } - - let gl = match window.get_api() { - glutin::Api::OpenGl => unsafe { - gl::GlFns::load_with(|symbol| window.get_proc_address(symbol) as *const _) - }, - glutin::Api::OpenGlEs => unsafe { - gl::GlesFns::load_with(|symbol| window.get_proc_address(symbol) as *const _) - }, - glutin::Api::WebGl => unimplemented!(), - }; - - let device_pixel_ratio = window.hidpi_factor(); - - let opts = webrender::RendererOptions { - device_pixel_ratio, - clear_color: Some(clear_color), - ..webrender::RendererOptions::default() - }; - - let framebuffer_size = { - let (width, height) = window.get_inner_size().unwrap(); - DeviceUintSize::new(width, height) - }; - let notifier = Box::new(Notifier::new(events_loop.create_proxy())); - let (renderer, sender) = webrender::Renderer::new(gl.clone(), notifier, opts).unwrap(); - let api = sender.create_api(); - let document_id = api.add_document(framebuffer_size, 0); - - let epoch = Epoch(0); - let pipeline_id = PipelineId(0, 0); - let mut txn = Transaction::new(); - - let font_key = api.generate_font_key(); - let font_bytes = load_file("../wrench/reftests/text/FreeSans.ttf"); - txn.add_raw_font(font_key, font_bytes, 0); - - let font_instance_key = api.generate_font_instance_key(); - txn.add_font_instance(font_instance_key, font_key, Au::from_px(32), None, None, Vec::new()); - - api.send_transaction(document_id, txn); - - Window { - events_loop, - window, - renderer, - name, - epoch, - pipeline_id, - document_id, - api, - font_instance_key, - } - } - - fn tick(&mut self) -> bool { - unsafe { - self.window.make_current().ok(); - } - let mut do_exit = false; - let my_name = &self.name; - let renderer = &mut self.renderer; - - self.events_loop.poll_events(|global_event| match global_event { - winit::Event::WindowEvent { event, .. } => match event { - winit::WindowEvent::CloseRequested | - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - virtual_keycode: Some(winit::VirtualKeyCode::Escape), - .. - }, - .. - } => { - do_exit = true - } - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(winit::VirtualKeyCode::P), - .. - }, - .. - } => { - println!("toggle flags {}", my_name); - renderer.toggle_debug_flags(webrender::DebugFlags::PROFILER_DBG); - } - _ => {} - } - _ => {} - }); - if do_exit { - return true - } - - let framebuffer_size = { - let (width, height) = self.window.get_inner_size().unwrap(); - DeviceUintSize::new(width, height) - }; - let device_pixel_ratio = self.window.hidpi_factor(); - let layout_size = framebuffer_size.to_f32() / euclid::TypedScale::new(device_pixel_ratio); - let mut txn = Transaction::new(); - let mut builder = DisplayListBuilder::new(self.pipeline_id, layout_size); - - let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size()); - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - let info = LayoutPrimitiveInfo::new(LayoutRect::new( - LayoutPoint::new(100.0, 100.0), - LayoutSize::new(100.0, 200.0) - )); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - - let text_bounds = LayoutRect::new( - LayoutPoint::new(100.0, 50.0), - LayoutSize::new(700.0, 200.0) - ); - let glyphs = vec![ - GlyphInstance { - index: 48, - point: LayoutPoint::new(100.0, 100.0), - }, - GlyphInstance { - index: 68, - point: LayoutPoint::new(150.0, 100.0), - }, - GlyphInstance { - index: 80, - point: LayoutPoint::new(200.0, 100.0), - }, - GlyphInstance { - index: 82, - point: LayoutPoint::new(250.0, 100.0), - }, - GlyphInstance { - index: 81, - point: LayoutPoint::new(300.0, 100.0), - }, - GlyphInstance { - index: 3, - point: LayoutPoint::new(350.0, 100.0), - }, - GlyphInstance { - index: 86, - point: LayoutPoint::new(400.0, 100.0), - }, - GlyphInstance { - index: 79, - point: LayoutPoint::new(450.0, 100.0), - }, - GlyphInstance { - index: 72, - point: LayoutPoint::new(500.0, 100.0), - }, - GlyphInstance { - index: 83, - point: LayoutPoint::new(550.0, 100.0), - }, - GlyphInstance { - index: 87, - point: LayoutPoint::new(600.0, 100.0), - }, - GlyphInstance { - index: 17, - point: LayoutPoint::new(650.0, 100.0), - }, - ]; - - let info = LayoutPrimitiveInfo::new(text_bounds); - builder.push_text( - &info, - &glyphs, - self.font_instance_key, - ColorF::new(1.0, 1.0, 0.0, 1.0), - None, - ); - - builder.pop_stacking_context(); - - txn.set_display_list( - self.epoch, - None, - layout_size, - builder.finalize(), - true, - ); - txn.set_root_pipeline(self.pipeline_id); - txn.generate_frame(); - self.api.send_transaction(self.document_id, txn); - - renderer.update(); - renderer.render(framebuffer_size).unwrap(); - self.window.swap_buffers().ok(); - - false - } - - fn deinit(self) { - self.renderer.deinit(); - } -} - -fn main() { - let mut win1 = Window::new("window1", ColorF::new(0.3, 0.0, 0.0, 1.0)); - let mut win2 = Window::new("window2", ColorF::new(0.0, 0.3, 0.0, 1.0)); - - loop { - if win1.tick() { - break; - } - if win2.tick() { - break; - } - } - - win1.deinit(); - win2.deinit(); -} - -fn load_file(name: &str) -> Vec { - let mut file = File::open(name).unwrap(); - let mut buffer = vec![]; - file.read_to_end(&mut buffer).unwrap(); - buffer -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/scrolling.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/scrolling.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/scrolling.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/scrolling.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -/* 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/. */ - -extern crate euclid; -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use euclid::SideOffsets2D; -use webrender::api::*; - -struct App { - cursor_position: WorldPoint, -} - -impl Example for App { - fn render( - &mut self, - _api: &RenderApi, - builder: &mut DisplayListBuilder, - _txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let info = LayoutPrimitiveInfo::new( - LayoutRect::new(LayoutPoint::zero(), builder.content_size()) - ); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - if true { - // scrolling and clips stuff - // let's make a scrollbox - let scrollbox = (0, 0).to(300, 400); - builder.push_stacking_context( - &LayoutPrimitiveInfo::new((10, 10).by(0, 0)), - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - // set the scrolling clip - let clip_id = builder.define_scroll_frame( - None, - (0, 0).by(1000, 1000), - scrollbox, - vec![], - None, - ScrollSensitivity::ScriptAndInputEvents, - ); - builder.push_clip_id(clip_id); - - // now put some content into it. - // start with a white background - let mut info = LayoutPrimitiveInfo::new((0, 0).to(1000, 1000)); - info.tag = Some((0, 1)); - builder.push_rect(&info, ColorF::new(1.0, 1.0, 1.0, 1.0)); - - // let's make a 50x50 blue square as a visual reference - let mut info = LayoutPrimitiveInfo::new((0, 0).to(50, 50)); - info.tag = Some((0, 2)); - builder.push_rect(&info, ColorF::new(0.0, 0.0, 1.0, 1.0)); - - // and a 50x50 green square next to it with an offset clip - // to see what that looks like - let mut info = - LayoutPrimitiveInfo::with_clip_rect((50, 0).to(100, 50), (60, 10).to(110, 60)); - info.tag = Some((0, 3)); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 0.0, 1.0)); - - // Below the above rectangles, set up a nested scrollbox. It's still in - // the same stacking context, so note that the rects passed in need to - // be relative to the stacking context. - let nested_clip_id = builder.define_scroll_frame( - None, - (0, 100).to(300, 1000), - (0, 100).to(200, 300), - vec![], - None, - ScrollSensitivity::ScriptAndInputEvents, - ); - builder.push_clip_id(nested_clip_id); - - // give it a giant gray background just to distinguish it and to easily - // visually identify the nested scrollbox - let mut info = LayoutPrimitiveInfo::new((-1000, -1000).to(5000, 5000)); - info.tag = Some((0, 4)); - builder.push_rect(&info, ColorF::new(0.5, 0.5, 0.5, 1.0)); - - // add a teal square to visualize the scrolling/clipping behaviour - // as you scroll the nested scrollbox - let mut info = LayoutPrimitiveInfo::new((0, 200).to(50, 250)); - info.tag = Some((0, 5)); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 1.0, 1.0)); - - // Add a sticky frame. It will "stick" twice while scrolling, once - // at a margin of 10px from the bottom, for 40 pixels of scrolling, - // and once at a margin of 10px from the top, for 60 pixels of - // scrolling. - let sticky_id = builder.define_sticky_frame( - (50, 350).by(50, 50), - SideOffsets2D::new(Some(10.0), None, Some(10.0), None), - StickyOffsetBounds::new(-40.0, 60.0), - StickyOffsetBounds::new(0.0, 0.0), - LayoutVector2D::new(0.0, 0.0) - ); - - builder.push_clip_id(sticky_id); - let mut info = LayoutPrimitiveInfo::new((50, 350).by(50, 50)); - info.tag = Some((0, 6)); - builder.push_rect(&info, ColorF::new(0.5, 0.5, 1.0, 1.0)); - builder.pop_clip_id(); // sticky_id - - // just for good measure add another teal square further down and to - // the right, which can be scrolled into view by the user - let mut info = LayoutPrimitiveInfo::new((250, 350).to(300, 400)); - info.tag = Some((0, 7)); - builder.push_rect(&info, ColorF::new(0.0, 1.0, 1.0, 1.0)); - - builder.pop_clip_id(); // nested_clip_id - - builder.pop_clip_id(); // clip_id - builder.pop_stacking_context(); - } - - builder.pop_stacking_context(); - } - - fn on_event(&mut self, event: winit::WindowEvent, api: &RenderApi, document_id: DocumentId) -> bool { - let mut txn = Transaction::new(); - match event { - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - } => { - let offset = match key { - winit::VirtualKeyCode::Down => (0.0, -10.0), - winit::VirtualKeyCode::Up => (0.0, 10.0), - winit::VirtualKeyCode::Right => (-10.0, 0.0), - winit::VirtualKeyCode::Left => (10.0, 0.0), - _ => return false, - }; - - txn.scroll( - ScrollLocation::Delta(LayoutVector2D::new(offset.0, offset.1)), - self.cursor_position, - ); - } - winit::WindowEvent::CursorMoved { position: (x, y), .. } => { - self.cursor_position = WorldPoint::new(x as f32, y as f32); - } - winit::WindowEvent::MouseWheel { delta, .. } => { - const LINE_HEIGHT: f32 = 38.0; - let (dx, dy) = match delta { - winit::MouseScrollDelta::LineDelta(dx, dy) => (dx, dy * LINE_HEIGHT), - winit::MouseScrollDelta::PixelDelta(dx, dy) => (dx, dy), - }; - - txn.scroll( - ScrollLocation::Delta(LayoutVector2D::new(dx, dy)), - self.cursor_position, - ); - } - winit::WindowEvent::MouseInput { .. } => { - let results = api.hit_test( - document_id, - None, - self.cursor_position, - HitTestFlags::FIND_ALL - ); - - println!("Hit test results:"); - for item in &results.items { - println!(" • {:?}", item); - } - println!(""); - } - _ => (), - } - - api.send_transaction(document_id, txn); - - false - } -} - -fn main() { - let mut app = App { - cursor_position: WorldPoint::zero(), - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/texture_cache_stress.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/texture_cache_stress.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/texture_cache_stress.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/texture_cache_stress.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,312 +0,0 @@ -/* 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/. */ - -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::{Example, HandyDandyRectBuilder}; -use gleam::gl; -use std::mem; -use webrender::api::*; - -struct ImageGenerator { - patterns: [[u8; 3]; 6], - next_pattern: usize, - current_image: Vec, -} - -impl ImageGenerator { - fn new() -> Self { - ImageGenerator { - next_pattern: 0, - patterns: [ - [1, 0, 0], - [0, 1, 0], - [0, 0, 1], - [1, 1, 0], - [0, 1, 1], - [1, 0, 1], - ], - current_image: Vec::new(), - } - } - - fn generate_image(&mut self, size: u32) { - let pattern = &self.patterns[self.next_pattern]; - self.current_image.clear(); - for y in 0 .. size { - for x in 0 .. size { - let lum = 255 * (1 - (((x & 8) == 0) ^ ((y & 8) == 0)) as u8); - self.current_image.extend_from_slice(&[ - lum * pattern[0], - lum * pattern[1], - lum * pattern[2], - 0xff, - ]); - } - } - - self.next_pattern = (self.next_pattern + 1) % self.patterns.len(); - } - - fn take(&mut self) -> Vec { - mem::replace(&mut self.current_image, Vec::new()) - } -} - -impl webrender::ExternalImageHandler for ImageGenerator { - fn lock(&mut self, _key: ExternalImageId, channel_index: u8) -> webrender::ExternalImage { - self.generate_image(channel_index as u32); - webrender::ExternalImage { - uv: TexelRect::new(0.0, 0.0, 1.0, 1.0), - source: webrender::ExternalImageSource::RawData(&self.current_image), - } - } - fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) {} -} - -struct App { - stress_keys: Vec, - image_key: Option, - image_generator: ImageGenerator, - swap_keys: Vec, - swap_index: usize, -} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let bounds = (0, 0).to(512, 512); - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - let x0 = 50.0; - let y0 = 50.0; - let image_size = LayoutSize::new(4.0, 4.0); - - if self.swap_keys.is_empty() { - let key0 = api.generate_image_key(); - let key1 = api.generate_image_key(); - - self.image_generator.generate_image(128); - txn.add_image( - key0, - ImageDescriptor::new(128, 128, ImageFormat::BGRA8, true, false), - ImageData::new(self.image_generator.take()), - None, - ); - - self.image_generator.generate_image(128); - txn.add_image( - key1, - ImageDescriptor::new(128, 128, ImageFormat::BGRA8, true, false), - ImageData::new(self.image_generator.take()), - None, - ); - - self.swap_keys.push(key0); - self.swap_keys.push(key1); - } - - for (i, key) in self.stress_keys.iter().enumerate() { - let x = (i % 128) as f32; - let y = (i / 128) as f32; - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new( - LayoutPoint::new(x0 + image_size.width * x, y0 + image_size.height * y), - image_size, - ), - bounds, - ); - - builder.push_image( - &info, - image_size, - LayoutSize::zero(), - ImageRendering::Auto, - AlphaType::PremultipliedAlpha, - *key, - ); - } - - if let Some(image_key) = self.image_key { - let image_size = LayoutSize::new(100.0, 100.0); - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(100.0, 100.0), image_size), - bounds, - ); - builder.push_image( - &info, - image_size, - LayoutSize::zero(), - ImageRendering::Auto, - AlphaType::PremultipliedAlpha, - image_key, - ); - } - - let swap_key = self.swap_keys[self.swap_index]; - let image_size = LayoutSize::new(64.0, 64.0); - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(100.0, 400.0), image_size), - bounds, - ); - builder.push_image( - &info, - image_size, - LayoutSize::zero(), - ImageRendering::Auto, - AlphaType::PremultipliedAlpha, - swap_key, - ); - self.swap_index = 1 - self.swap_index; - - builder.pop_stacking_context(); - } - - fn on_event( - &mut self, - event: winit::WindowEvent, - api: &RenderApi, - _document_id: DocumentId, - ) -> bool { - match event { - winit::WindowEvent::KeyboardInput { - input: winit::KeyboardInput { - state: winit::ElementState::Pressed, - virtual_keycode: Some(key), - .. - }, - .. - } => { - let mut txn = Transaction::new(); - - match key { - winit::VirtualKeyCode::S => { - self.stress_keys.clear(); - - for _ in 0 .. 16 { - for _ in 0 .. 16 { - let size = 4; - - let image_key = api.generate_image_key(); - - self.image_generator.generate_image(size); - - txn.add_image( - image_key, - ImageDescriptor::new(size, size, ImageFormat::BGRA8, true, false), - ImageData::new(self.image_generator.take()), - None, - ); - - self.stress_keys.push(image_key); - } - } - } - winit::VirtualKeyCode::D => if let Some(image_key) = self.image_key.take() { - txn.delete_image(image_key); - }, - winit::VirtualKeyCode::U => if let Some(image_key) = self.image_key { - let size = 128; - self.image_generator.generate_image(size); - - txn.update_image( - image_key, - ImageDescriptor::new(size, size, ImageFormat::BGRA8, true, false), - ImageData::new(self.image_generator.take()), - None, - ); - }, - winit::VirtualKeyCode::E => { - if let Some(image_key) = self.image_key.take() { - txn.delete_image(image_key); - } - - let size = 32; - let image_key = api.generate_image_key(); - - let image_data = ExternalImageData { - id: ExternalImageId(0), - channel_index: size as u8, - image_type: ExternalImageType::Buffer, - }; - - txn.add_image( - image_key, - ImageDescriptor::new(size, size, ImageFormat::BGRA8, true, false), - ImageData::External(image_data), - None, - ); - - self.image_key = Some(image_key); - } - winit::VirtualKeyCode::R => { - if let Some(image_key) = self.image_key.take() { - txn.delete_image(image_key); - } - - let image_key = api.generate_image_key(); - let size = 32; - self.image_generator.generate_image(size); - - txn.add_image( - image_key, - ImageDescriptor::new(size, size, ImageFormat::BGRA8, true, false), - ImageData::new(self.image_generator.take()), - None, - ); - - self.image_key = Some(image_key); - } - _ => {} - } - - api.update_resources(txn.resource_updates); - return true; - } - _ => {} - } - - false - } - - fn get_image_handlers( - &mut self, - _gl: &gl::Gl, - ) -> (Option>, - Option>) { - (Some(Box::new(ImageGenerator::new())), None) - } -} - -fn main() { - let mut app = App { - image_key: None, - stress_keys: Vec::new(), - image_generator: ImageGenerator::new(), - swap_keys: Vec::new(), - swap_index: 0, - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/yuv.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/yuv.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/examples/yuv.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/examples/yuv.rs 1970-01-01 00:00:00.000000000 +0000 @@ -1,198 +0,0 @@ -/* 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/. */ - -extern crate gleam; -extern crate glutin; -extern crate webrender; -extern crate winit; - -#[path = "common/boilerplate.rs"] -mod boilerplate; - -use boilerplate::Example; -use gleam::gl; -use webrender::api::*; - -fn init_gl_texture( - id: gl::GLuint, - internal: gl::GLenum, - external: gl::GLenum, - bytes: &[u8], - gl: &gl::Gl, -) { - gl.bind_texture(gl::TEXTURE_2D, id); - gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MAG_FILTER, gl::LINEAR as gl::GLint); - gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_MIN_FILTER, gl::LINEAR as gl::GLint); - gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_S, gl::CLAMP_TO_EDGE as gl::GLint); - gl.tex_parameter_i(gl::TEXTURE_2D, gl::TEXTURE_WRAP_T, gl::CLAMP_TO_EDGE as gl::GLint); - gl.tex_image_2d( - gl::TEXTURE_2D, - 0, - internal as gl::GLint, - 100, - 100, - 0, - external, - gl::UNSIGNED_BYTE, - Some(bytes), - ); - gl.bind_texture(gl::TEXTURE_2D, 0); -} - -struct YuvImageProvider { - texture_ids: Vec, -} - -impl YuvImageProvider { - fn new(gl: &gl::Gl) -> Self { - let texture_ids = gl.gen_textures(4); - - init_gl_texture(texture_ids[0], gl::RED, gl::RED, &[127; 100 * 100], gl); - init_gl_texture(texture_ids[1], gl::RG8, gl::RG, &[0; 100 * 100 * 2], gl); - init_gl_texture(texture_ids[2], gl::RED, gl::RED, &[127; 100 * 100], gl); - init_gl_texture(texture_ids[3], gl::RED, gl::RED, &[127; 100 * 100], gl); - - YuvImageProvider { - texture_ids - } - } -} - -impl webrender::ExternalImageHandler for YuvImageProvider { - fn lock(&mut self, key: ExternalImageId, _channel_index: u8) -> webrender::ExternalImage { - let id = self.texture_ids[key.0 as usize]; - webrender::ExternalImage { - uv: TexelRect::new(0.0, 0.0, 1.0, 1.0), - source: webrender::ExternalImageSource::NativeTexture(id), - } - } - fn unlock(&mut self, _key: ExternalImageId, _channel_index: u8) { - } -} - -struct App { -} - -impl Example for App { - fn render( - &mut self, - api: &RenderApi, - builder: &mut DisplayListBuilder, - txn: &mut Transaction, - _framebuffer_size: DeviceUintSize, - _pipeline_id: PipelineId, - _document_id: DocumentId, - ) { - let bounds = LayoutRect::new(LayoutPoint::zero(), builder.content_size()); - let info = LayoutPrimitiveInfo::new(bounds); - builder.push_stacking_context( - &info, - None, - TransformStyle::Flat, - MixBlendMode::Normal, - Vec::new(), - GlyphRasterSpace::Screen, - ); - - let yuv_chanel1 = api.generate_image_key(); - let yuv_chanel2 = api.generate_image_key(); - let yuv_chanel2_1 = api.generate_image_key(); - let yuv_chanel3 = api.generate_image_key(); - txn.add_image( - yuv_chanel1, - ImageDescriptor::new(100, 100, ImageFormat::R8, true, false), - ImageData::External(ExternalImageData { - id: ExternalImageId(0), - channel_index: 0, - image_type: ExternalImageType::TextureHandle( - TextureTarget::Default, - ), - }), - None, - ); - txn.add_image( - yuv_chanel2, - ImageDescriptor::new(100, 100, ImageFormat::RG8, true, false), - ImageData::External(ExternalImageData { - id: ExternalImageId(1), - channel_index: 0, - image_type: ExternalImageType::TextureHandle( - TextureTarget::Default, - ), - }), - None, - ); - txn.add_image( - yuv_chanel2_1, - ImageDescriptor::new(100, 100, ImageFormat::R8, true, false), - ImageData::External(ExternalImageData { - id: ExternalImageId(2), - channel_index: 0, - image_type: ExternalImageType::TextureHandle( - TextureTarget::Default, - ), - }), - None, - ); - txn.add_image( - yuv_chanel3, - ImageDescriptor::new(100, 100, ImageFormat::R8, true, false), - ImageData::External(ExternalImageData { - id: ExternalImageId(3), - channel_index: 0, - image_type: ExternalImageType::TextureHandle( - TextureTarget::Default, - ), - }), - None, - ); - - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(100.0, 0.0), LayoutSize::new(100.0, 100.0)), - bounds, - ); - builder.push_yuv_image( - &info, - YuvData::NV12(yuv_chanel1, yuv_chanel2), - YuvColorSpace::Rec601, - ImageRendering::Auto, - ); - - let info = LayoutPrimitiveInfo::with_clip_rect( - LayoutRect::new(LayoutPoint::new(300.0, 0.0), LayoutSize::new(100.0, 100.0)), - bounds, - ); - builder.push_yuv_image( - &info, - YuvData::PlanarYCbCr(yuv_chanel1, yuv_chanel2_1, yuv_chanel3), - YuvColorSpace::Rec601, - ImageRendering::Auto, - ); - - builder.pop_stacking_context(); - } - - fn on_event( - &mut self, - _event: winit::WindowEvent, - _api: &RenderApi, - _document_id: DocumentId, - ) -> bool { - false - } - - fn get_image_handlers( - &mut self, - gl: &gl::Gl, - ) -> (Option>, - Option>) { - (Some(Box::new(YuvImageProvider::new(gl))), None) - } -} - -fn main() { - let mut app = App { - }; - boilerplate::main_wrapper(&mut app, None); -} diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/res/ps_text_run.glsl firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/res/ps_text_run.glsl --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/res/ps_text_run.glsl 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/res/ps_text_run.glsl 2018-06-20 17:29:09.000000000 +0000 @@ -22,12 +22,18 @@ PictureTask task, RectWithSize snap_rect, vec2 snap_bias) { -#if defined(WR_FEATURE_GLYPH_TRANSFORM) || !defined(WR_FEATURE_TRANSFORM) // Ensure the transform does not contain a subpixel translation to ensure // that glyph snapping is stable for equivalent glyph subpixel positions. - scroll_node.transform[3].xy = floor(scroll_node.transform[3].xy + 0.5); +#if defined(WR_FEATURE_GLYPH_TRANSFORM) + bool remove_subpx_offset = true; +#else + bool remove_subpx_offset = scroll_node.is_axis_aligned; #endif + if (remove_subpx_offset) { + scroll_node.transform[3].xy = floor(scroll_node.transform[3].xy + 0.5); + } + // Transform the current vertex to world space. vec4 world_pos = scroll_node.transform * vec4(clamped_local_pos, 0.0, 1.0); @@ -42,14 +48,16 @@ #ifdef WR_FEATURE_GLYPH_TRANSFORM // For transformed subpixels, we just need to align the glyph origin to a device pixel. final_pos += floor(snap_rect.p0 + snap_bias) - snap_rect.p0; -#elif !defined(WR_FEATURE_TRANSFORM) +#else // Compute the snapping offset only if the scroll node transform is axis-aligned. - final_pos += compute_snap_offset( - clamped_local_pos, - scroll_node.transform, - snap_rect, - snap_bias - ); + if (scroll_node.is_axis_aligned) { + final_pos += compute_snap_offset( + clamped_local_pos, + scroll_node.transform, + snap_rect, + snap_bias + ); + } #endif gl_Position = uTransform * vec4(final_pos, z, 1.0); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/batch.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/batch.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/batch.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/batch.rs 2018-06-20 17:29:09.000000000 +0000 @@ -38,13 +38,6 @@ #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] #[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] -pub enum TransformBatchKind { - TextRun(GlyphFormat), -} - -#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] -#[cfg_attr(feature = "capture", derive(Serialize))] -#[cfg_attr(feature = "replay", derive(Deserialize))] pub enum BrushBatchKind { Solid, Image(ImageBufferKind), @@ -64,7 +57,7 @@ #[cfg_attr(feature = "replay", derive(Deserialize))] pub enum BatchKind { SplitComposite, - Transformable(TransformedRectKind, TransformBatchKind), + TextRun(GlyphFormat), Brush(BrushBatchKind), } @@ -1101,7 +1094,7 @@ let font = text_cpu.get_font( ctx.device_pixel_scale, - Some(scroll_node.transform), + scroll_node.transform, ); let subpx_dir = font.get_subpx_dir(); @@ -1131,10 +1124,7 @@ ], }; - let kind = BatchKind::Transformable( - transform_kind, - TransformBatchKind::TextRun(glyph_format), - ); + let kind = BatchKind::TextRun(glyph_format); let (blend_mode, color_mode) = match glyph_format { GlyphFormat::Subpixel | diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/display_list_flattener.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/display_list_flattener.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/display_list_flattener.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/display_list_flattener.rs 2018-06-20 17:29:09.000000000 +0000 @@ -13,7 +13,6 @@ use api::{PropertyBinding, ReferenceFrame, RepeatMode, ScrollFrameDisplayItem, ScrollSensitivity}; use api::{Shadow, SpecificDisplayItem, StackingContext, StickyFrameDisplayItem, TexelRect}; use api::{TransformStyle, YuvColorSpace, YuvData}; -use app_units::Au; use clip::{ClipRegion, ClipSource, ClipSources, ClipStore}; use clip_scroll_node::{ClipScrollNode, NodeType, StickyFrameInfo}; use clip_scroll_tree::{ClipChainIndex, ClipScrollNodeIndex, ClipScrollTree}; @@ -1889,16 +1888,6 @@ return; } - // Sanity check - anything with glyphs bigger than this - // is probably going to consume too much memory to render - // efficiently anyway. This is specifically to work around - // the font_advance.html reftest, which creates a very large - // font as a crash test - the rendering is also ignored - // by the azure renderer. - if font_instance.size >= Au::from_px(4096) { - return; - } - // TODO(gw): Use a proper algorithm to select // whether this item should be rendered with // subpixel AA! diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/glyph_rasterizer/mod.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/glyph_rasterizer/mod.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/glyph_rasterizer/mod.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/glyph_rasterizer/mod.rs 2018-06-20 17:29:10.000000000 +0000 @@ -159,6 +159,8 @@ } } +pub const FONT_SIZE_LIMIT: f64 = 1024.0; + #[derive(Clone, Hash, PartialEq, Eq, Debug, Ord, PartialOrd)] #[cfg_attr(feature = "capture", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] @@ -270,6 +272,23 @@ 0 } } + + pub fn oversized_scale_factor(&self, x_scale: f64, y_scale: f64) -> f64 { + // If the scaled size is over the limit, then it will need to + // be scaled up from the size limit to the scaled size. + // However, this should only occur when the font isn't using any + // features that would tie it to device space, like transforms, + // subpixel AA, or subpixel positioning. + let max_size = self.size.to_f64_px() * x_scale.max(y_scale); + if max_size > FONT_SIZE_LIMIT && + self.transform.is_identity() && + self.render_mode != FontRenderMode::Subpixel && + !self.use_subpixel_position() { + max_size / FONT_SIZE_LIMIT + } else { + 1.0 + } + } } #[repr(u32)] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/glyph_rasterizer/pathfinder.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/glyph_rasterizer/pathfinder.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/glyph_rasterizer/pathfinder.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/glyph_rasterizer/pathfinder.rs 2018-06-20 17:29:09.000000000 +0000 @@ -116,6 +116,7 @@ &mut self, glyph_key: &GlyphKey, font: &FontInstance, + scale: f32, cached_glyph_info: CachedGlyphInfo, texture_cache: &mut TextureCache, gpu_cache: &mut GpuCache, @@ -127,7 +128,7 @@ let mut pathfinder_font_context = self.font_contexts.lock_pathfinder_context(); let render_task_cache_key = cached_glyph_info.render_task_cache_key; let (glyph_origin, glyph_size) = (cached_glyph_info.origin, render_task_cache_key.size); - let user_data = [glyph_origin.x as f32, (glyph_origin.y - glyph_size.height) as f32, 1.0]; + let user_data = [glyph_origin.x as f32, (glyph_origin.y - glyph_size.height) as f32, scale]; let handle = try!(render_task_cache.request_render_task(render_task_cache_key, texture_cache, gpu_cache, @@ -138,6 +139,7 @@ // TODO(pcwalton): Non-subpixel font render mode. request_render_task_from_pathfinder(glyph_key, font, + scale, &glyph_origin, &glyph_size, &mut *pathfinder_font_context, @@ -163,6 +165,9 @@ let glyph_key_cache = glyph_cache.get_glyph_key_cache_for_font_mut(font.clone()); + let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0)); + let scale = font.oversized_scale_factor(x_scale, y_scale) as f32; + // select glyphs that have not been requested yet. for glyph_key in glyph_keys { let mut cached_glyph_info = None; @@ -184,7 +189,7 @@ let pathfinder_font_instance = pathfinder_font_renderer::FontInstance { font_key: font.font_key.clone(), - size: font.size, + size: font.size.scale_by(scale.recip()), }; // TODO: pathfinder will need to support 2D subpixel offset @@ -216,6 +221,7 @@ Some(glyph_info) => { match self.request_glyph_from_pathfinder_if_necessary(glyph_key, &font, + scale, glyph_info.clone(), texture_cache, gpu_cache, @@ -259,6 +265,7 @@ fn request_render_task_from_pathfinder(glyph_key: &GlyphKey, font: &FontInstance, + scale: f32, glyph_origin: &DeviceIntPoint, glyph_size: &DeviceIntSize, font_context: &mut PathfinderFontContext, @@ -266,9 +273,10 @@ render_tasks: &mut RenderTaskTree, render_passes: &mut SpecialRenderPasses) -> Result { + let size = font.size.scale_by(scale.recip()); let pathfinder_font_instance = pathfinder_font_renderer::FontInstance { font_key: font.font_key.clone(), - size: font.size, + size, }; // TODO: pathfinder will need to support 2D subpixel offset @@ -291,7 +299,7 @@ // smoothing" is unchecked in System Preferences. let subpixel_offset = TypedPoint2D::new(glyph_subpixel_offset as f32, 0.0); - let embolden_amount = compute_embolden_amount(font.size.to_f32_px()); + let embolden_amount = compute_embolden_amount(size.to_f32_px()); let location = RenderTaskLocation::Dynamic(None, Some(*glyph_size)); let glyph_render_task = RenderTask::new_glyph(location, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/macos/font.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/macos/font.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/macos/font.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/macos/font.rs 2018-06-20 17:29:10.000000000 +0000 @@ -490,7 +490,8 @@ #[cfg(not(feature = "pathfinder"))] pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult { let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0)); - let size = font.size.scale_by(y_scale as f32); + let scale = font.oversized_scale_factor(x_scale, y_scale); + let size = font.size.scale_by((y_scale / scale) as f32); let ct_font = match self.get_ct_font(font.font_key, size, &font.variations) { Some(font) => font, None => return GlyphRasterResult::LoadFailed, @@ -529,7 +530,7 @@ let glyph = key.index as CGGlyph; let (strike_scale, pixel_step) = if bitmap { (y_scale, 1.0) } else { (x_scale, y_scale / x_scale) }; - let extra_strikes = font.get_extra_strikes(strike_scale); + let extra_strikes = font.get_extra_strikes(strike_scale / scale); let metrics = get_glyph_metrics( &ct_font, transform.as_ref(), @@ -724,7 +725,7 @@ top: metrics.rasterized_ascent as f32, width: metrics.rasterized_width, height: metrics.rasterized_height, - scale: if bitmap { y_scale.recip() as f32 } else { 1.0 }, + scale: (if bitmap { scale / y_scale } else { scale }) as f32, format: if bitmap { GlyphFormat::ColorBitmap } else { font.get_glyph_format() }, bytes: rasterized_pixels, }) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/unix/font.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/unix/font.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/unix/font.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/unix/font.rs 2018-06-20 17:29:10.000000000 +0000 @@ -236,7 +236,7 @@ } } - fn load_glyph(&self, font: &FontInstance, glyph: &GlyphKey) -> Option { + fn load_glyph(&self, font: &FontInstance, glyph: &GlyphKey) -> Option<(FT_GlyphSlot, f32)> { debug_assert!(self.faces.contains_key(&font.font_key)); let face = self.faces.get(&font.font_key).unwrap(); @@ -283,13 +283,14 @@ load_flags |= FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH; let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0)); + let scale = font.oversized_scale_factor(x_scale, y_scale); let req_size = font.size.to_f64_px(); let face_flags = unsafe { (*face.face).face_flags }; let mut result = if (face_flags & (FT_FACE_FLAG_FIXED_SIZES as FT_Long)) != 0 && (face_flags & (FT_FACE_FLAG_SCALABLE as FT_Long)) == 0 && (load_flags & FT_LOAD_NO_BITMAP) == 0 { unsafe { FT_Set_Transform(face.face, ptr::null_mut(), ptr::null_mut()) }; - self.choose_bitmap_size(face.face, req_size * y_scale) + self.choose_bitmap_size(face.face, req_size * y_scale / scale) } else { let mut shape = font.transform.invert_scale(x_scale, y_scale); if font.flags.contains(FontInstanceFlags::FLIP_X) { @@ -314,8 +315,8 @@ FT_Set_Transform(face.face, &mut ft_shape, ptr::null_mut()); FT_Set_Char_Size( face.face, - (req_size * x_scale * 64.0 + 0.5) as FT_F26Dot6, - (req_size * y_scale * 64.0 + 0.5) as FT_F26Dot6, + (req_size * x_scale / scale * 64.0 + 0.5) as FT_F26Dot6, + (req_size * y_scale / scale * 64.0 + 0.5) as FT_F26Dot6, 0, 0, ) @@ -336,8 +337,11 @@ let format = unsafe { (*slot).format }; match format { - FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE | - FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => Some(slot), + FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => { + let y_size = unsafe { (*(*(*slot).face).size).metrics.y_ppem }; + Some((slot, req_size as f32 / y_size as f32)) + } + FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => Some((slot, scale as f32)), _ => { error!("Unsupported format"); debug!("format={:?}", format); @@ -414,67 +418,71 @@ slot: FT_GlyphSlot, font: &FontInstance, glyph: &GlyphKey, - transform_bitmaps: bool, + use_transform: Option, ) -> Option { - let metrics = unsafe { &(*slot).metrics }; - - let mut advance = metrics.horiAdvance as f32 / 64.0; - match unsafe { (*slot).format } { + let format = unsafe { (*slot).format }; + let (mut left, mut top, mut width, mut height) = match format { FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => { - let mut left = unsafe { (*slot).bitmap_left }; - let mut top = unsafe { (*slot).bitmap_top }; - let mut width = unsafe { (*slot).bitmap.width }; - let mut height = unsafe { (*slot).bitmap.rows }; - if transform_bitmaps { - let y_size = unsafe { (*(*(*slot).face).size).metrics.y_ppem }; - let scale = font.size.to_f32_px() / y_size as f32; - let x0 = left as f32 * scale; - let x1 = width as f32 * scale + x0; - let y1 = top as f32 * scale; - let y0 = y1 - height as f32 * scale; - left = x0.round() as i32; - top = y1.round() as i32; - width = (x1.ceil() - x0.floor()) as u32; - height = (y1.ceil() - y0.floor()) as u32; - advance *= scale; - if font.flags.contains(FontInstanceFlags::SYNTHETIC_ITALICS) { - let (skew_min, skew_max) = get_skew_bounds(top - height as i32, top); - left += skew_min as i32; - width += (skew_max - skew_min) as u32; - } - if font.flags.contains(FontInstanceFlags::TRANSPOSE) { - mem::swap(&mut width, &mut height); - mem::swap(&mut left, &mut top); - left -= width as i32; - top += height as i32; - } - if font.flags.contains(FontInstanceFlags::FLIP_X) { - left = -(left + width as i32); - } - if font.flags.contains(FontInstanceFlags::FLIP_Y) { - top = -(top - height as i32); - } - } - Some(GlyphDimensions { - left, - top, - width, - height, - advance, - }) + unsafe { ( + (*slot).bitmap_left, + (*slot).bitmap_top, + (*slot).bitmap.width, + (*slot).bitmap.rows, + ) } } FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => { let cbox = self.get_bounding_box(slot, font, glyph); - Some(GlyphDimensions { - left: (cbox.xMin >> 6) as i32, - top: (cbox.yMax >> 6) as i32, - width: ((cbox.xMax - cbox.xMin) >> 6) as u32, - height: ((cbox.yMax - cbox.yMin) >> 6) as u32, - advance, - }) + ( + (cbox.xMin >> 6) as i32, + (cbox.yMax >> 6) as i32, + ((cbox.xMax - cbox.xMin) >> 6) as u32, + ((cbox.yMax - cbox.yMin) >> 6) as u32, + ) + } + _ => return None, + }; + let mut advance = unsafe { (*slot).metrics.horiAdvance as f32 / 64.0 }; + if let Some(scale) = use_transform { + if scale != 1.0 { + let x0 = left as f32 * scale; + let x1 = width as f32 * scale + x0; + let y1 = top as f32 * scale; + let y0 = y1 - height as f32 * scale; + left = x0.round() as i32; + top = y1.round() as i32; + width = (x1.ceil() - x0.floor()) as u32; + height = (y1.ceil() - y0.floor()) as u32; + advance *= scale; + } + // An outline glyph's cbox would have already been transformed inside FT_Load_Glyph, + // so only handle bitmap glyphs which are not handled by FT_Load_Glyph. + if format == FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP { + if font.flags.contains(FontInstanceFlags::SYNTHETIC_ITALICS) { + let (skew_min, skew_max) = get_skew_bounds(top - height as i32, top); + left += skew_min as i32; + width += (skew_max - skew_min) as u32; + } + if font.flags.contains(FontInstanceFlags::TRANSPOSE) { + mem::swap(&mut width, &mut height); + mem::swap(&mut left, &mut top); + left -= width as i32; + top += height as i32; + } + if font.flags.contains(FontInstanceFlags::FLIP_X) { + left = -(left + width as i32); + } + if font.flags.contains(FontInstanceFlags::FLIP_Y) { + top = -(top - height as i32); + } } - _ => None, } + Some(GlyphDimensions { + left, + top, + width, + height, + advance, + }) } pub fn get_glyph_index(&mut self, font_key: FontKey, ch: char) -> Option { @@ -495,7 +503,7 @@ key: &GlyphKey, ) -> Option { let slot = self.load_glyph(font, key); - slot.and_then(|slot| self.get_glyph_dimensions_impl(slot, font, key, true)) + slot.and_then(|(slot, scale)| self.get_glyph_dimensions_impl(slot, font, key, Some(scale))) } fn choose_bitmap_size(&self, face: FT_Face, requested_size: f64) -> FT_Error { @@ -592,13 +600,15 @@ #[cfg(not(feature = "pathfinder"))] pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult { - let slot = match self.load_glyph(font, key) { - Some(slot) => slot, + let (slot, scale) = match self.load_glyph(font, key) { + Some(val) => val, None => return GlyphRasterResult::LoadFailed, }; // Get dimensions of the glyph, to see if we need to rasterize it. - let dimensions = match self.get_glyph_dimensions_impl(slot, font, key, false) { + // Don't apply scaling to the dimensions, as the glyph cache needs to know the actual + // footprint of the glyph. + let dimensions = match self.get_glyph_dimensions_impl(slot, font, key, None) { Some(val) => val, None => return GlyphRasterResult::LoadFailed, }; @@ -610,12 +620,8 @@ } let format = unsafe { (*slot).format }; - let mut scale = 1.0; match format { - FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => { - let y_size = unsafe { (*(*(*slot).face).size).metrics.y_ppem }; - scale = font.size.to_f32_px() / y_size as f32; - } + FT_Glyph_Format::FT_GLYPH_FORMAT_BITMAP => {} FT_Glyph_Format::FT_GLYPH_FORMAT_OUTLINE => { if !self.rasterize_glyph_outline(slot, font, key) { return GlyphRasterResult::LoadFailed; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/windows/font.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/windows/font.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/platform/windows/font.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/platform/windows/font.rs 2018-06-20 17:29:09.000000000 +0000 @@ -385,8 +385,9 @@ #[cfg(not(feature = "pathfinder"))] pub fn rasterize_glyph(&mut self, font: &FontInstance, key: &GlyphKey) -> GlyphRasterResult { - let (.., y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0)); - let size = (font.size.to_f64_px() * y_scale) as f32; + let (x_scale, y_scale) = font.transform.compute_scale().unwrap_or((1.0, 1.0)); + let scale = font.oversized_scale_factor(x_scale, y_scale); + let size = (font.size.to_f64_px() * y_scale / scale) as f32; let bitmaps = is_bitmap_font(font); let (mut shape, (x_offset, y_offset)) = if bitmaps { (FontTransform::identity(), (0.0, 0.0)) @@ -451,7 +452,7 @@ top: -bounds.top as f32, width, height, - scale: if bitmaps { y_scale.recip() as f32 } else { 1.0 }, + scale: (if bitmaps { scale / y_scale } else { scale }) as f32, format: if bitmaps { GlyphFormat::Bitmap } else { font.get_glyph_format() }, bytes: bgra_pixels, }) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/prim_store.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/prim_store.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/prim_store.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/prim_store.rs 2018-06-20 17:29:09.000000000 +0000 @@ -17,7 +17,7 @@ use clip::{ClipSourcesHandle, ClipWorkItem}; use frame_builder::{FrameBuildingContext, FrameBuildingState, PictureContext, PictureState}; use frame_builder::PrimitiveRunContext; -use glyph_rasterizer::{FontInstance, FontTransform, GlyphKey}; +use glyph_rasterizer::{FontInstance, FontTransform, GlyphKey, FONT_SIZE_LIMIT}; use gpu_cache::{GpuBlockData, GpuCache, GpuCacheAddress, GpuCacheHandle, GpuDataRequest, ToGpuBlocks}; use gpu_types::{BrushFlags, ClipChainRectIndex}; @@ -773,19 +773,22 @@ pub fn get_font( &self, device_pixel_scale: DevicePixelScale, - transform: Option, + transform: LayoutToWorldTransform, ) -> FontInstance { let mut font = self.font.clone(); font.size = font.size.scale_by(device_pixel_scale.0); - if let Some(transform) = transform { - if transform.has_perspective_component() || - !transform.has_2d_inverse() || - self.glyph_raster_space != GlyphRasterSpace::Screen { - font.disable_subpixel_aa(); - font.disable_subpixel_position(); - } else { - font.transform = FontTransform::from(&transform).quantize(); - } + // Only support transforms that can be coerced to simple 2D transforms. + if transform.has_perspective_component() || + !transform.has_2d_inverse() || + // Font sizes larger than the limit need to be scaled, thus can't use subpixels. + transform.exceeds_2d_scale(FONT_SIZE_LIMIT / font.size.to_f64_px()) || + // Otherwise, ensure the font is rasterized in screen-space. + self.glyph_raster_space != GlyphRasterSpace::Screen { + font.disable_subpixel_aa(); + font.disable_subpixel_position(); + } else { + // Quantize the transform to minimize thrashing of the glyph cache. + font.transform = FontTransform::from(&transform).quantize(); } font } @@ -793,7 +796,7 @@ fn prepare_for_render( &mut self, device_pixel_scale: DevicePixelScale, - transform: Option, + transform: LayoutToWorldTransform, allow_subpixel_aa: bool, display_list: &BuiltDisplayList, frame_building_state: &mut FrameBuildingState, @@ -1490,7 +1493,7 @@ PrimitiveKind::TextRun => { let text = &mut self.cpu_text_runs[metadata.cpu_prim_index.0]; // The transform only makes sense for screen space rasterization - let transform = Some(prim_run_context.scroll_node.world_content_transform.into()); + let transform = prim_run_context.scroll_node.world_content_transform.into(); text.prepare_for_render( frame_context.device_pixel_scale, transform, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/render_backend.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/render_backend.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/render_backend.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/render_backend.rs 2018-06-20 17:29:10.000000000 +0000 @@ -719,9 +719,14 @@ render, result_tx, } => { + let mut ops = DocumentOps::nop(); if let Some(doc) = self.documents.get_mut(&document_id) { if let Some(mut built_scene) = built_scene.take() { doc.new_async_scene_ready(built_scene); + // After applying the new scene we need to + // rebuild the hit-tester, so we trigger a render + // step. + ops = DocumentOps::render(); } if let Some(tx) = result_tx { let (resume_tx, resume_rx) = channel(); @@ -750,13 +755,13 @@ use_scene_builder_thread: false, }; - if !transaction_msg.is_empty() { + if !transaction_msg.is_empty() || ops.render { self.update_document( document_id, transaction_msg, &mut frame_counter, &mut profile_counters, - DocumentOps::render(), + ops, ); } }, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/renderer.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/renderer.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/renderer.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/renderer.rs 2018-06-20 17:29:09.000000000 +0000 @@ -16,7 +16,7 @@ use api::{channel}; use api::DebugCommand; use api::channel::PayloadReceiverHelperMethods; -use batch::{BatchKind, BatchTextures, BrushBatchKind, TransformBatchKind}; +use batch::{BatchKind, BatchTextures, BrushBatchKind}; #[cfg(any(feature = "capture", feature = "replay"))] use capture::{CaptureConfig, ExternalCaptureImage, PlainExternalImage}; use debug_colors; @@ -114,7 +114,7 @@ }; const GPU_TAG_BRUSH_BLEND: GpuProfileTag = GpuProfileTag { label: "B_Blend", - color: debug_colors::LIGHTBLUE, + color: debug_colors::ORANGE, }; const GPU_TAG_BRUSH_IMAGE: GpuProfileTag = GpuProfileTag { label: "B_Image", @@ -170,21 +170,6 @@ color: debug_colors::BLACK, }; -impl TransformBatchKind { - #[cfg(feature = "debugger")] - fn debug_name(&self) -> &'static str { - match *self { - TransformBatchKind::TextRun(..) => "TextRun", - } - } - - fn sampler_tag(&self) -> GpuProfileTag { - match *self { - TransformBatchKind::TextRun(..) => GPU_TAG_PRIM_TEXT_RUN, - } - } -} - impl BatchKind { #[cfg(feature = "debugger")] fn debug_name(&self) -> &'static str { @@ -201,7 +186,7 @@ BrushBatchKind::LinearGradient => "Brush (LinearGradient)", } } - BatchKind::Transformable(_, batch_kind) => batch_kind.debug_name(), + BatchKind::TextRun(_) => "TextRun", } } @@ -219,7 +204,7 @@ BrushBatchKind::LinearGradient => GPU_TAG_BRUSH_LINEAR_GRADIENT, } } - BatchKind::Transformable(_, batch_kind) => batch_kind.sampler_tag(), + BatchKind::TextRun(_) => GPU_TAG_PRIM_TEXT_RUN, } } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/shade.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/shade.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/shade.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/shade.rs 2018-06-20 17:29:09.000000000 +0000 @@ -6,7 +6,7 @@ YUV_COLOR_SPACES, YUV_FORMATS, YuvColorSpace, YuvFormat, }; -use batch::{BatchKey, BatchKind, BrushBatchKind, TransformBatchKind}; +use batch::{BatchKey, BatchKind, BrushBatchKind}; use device::{Device, Program, ShaderError}; use euclid::{Transform3D}; use glyph_rasterizer::GlyphFormat; @@ -16,7 +16,6 @@ BlendMode, ImageBufferKind, RendererError, RendererOptions, TextureSampler, VertexArrayKind, }; -use util::TransformedRectKind; use gleam::gl::GlType; use time::precise_time_ns; @@ -262,7 +261,6 @@ pub struct TextShader { simple: LazilyCompiledShader, - transform: LazilyCompiledShader, glyph_transform: LazilyCompiledShader, } @@ -281,17 +279,6 @@ precache, )?; - let mut transform_features = features.to_vec(); - transform_features.push("TRANSFORM"); - - let transform = LazilyCompiledShader::new( - ShaderKind::Text, - name, - &transform_features, - device, - precache, - )?; - let mut glyph_transform_features = features.to_vec(); glyph_transform_features.push("GLYPH_TRANSFORM"); @@ -303,22 +290,18 @@ precache, )?; - Ok(TextShader { simple, transform, glyph_transform }) + Ok(TextShader { simple, glyph_transform }) } pub fn get( &mut self, glyph_format: GlyphFormat, - transform_kind: TransformedRectKind, ) -> &mut LazilyCompiledShader { match glyph_format { GlyphFormat::Alpha | GlyphFormat::Subpixel | GlyphFormat::Bitmap | - GlyphFormat::ColorBitmap => match transform_kind { - TransformedRectKind::AxisAligned => &mut self.simple, - TransformedRectKind::Complex => &mut self.transform, - } + GlyphFormat::ColorBitmap => &mut self.simple, GlyphFormat::TransformedAlpha | GlyphFormat::TransformedSubpixel => &mut self.glyph_transform, } @@ -326,7 +309,6 @@ fn deinit(self, device: &mut Device) { self.simple.deinit(device); - self.transform.deinit(device); self.glyph_transform.deinit(device); } } @@ -726,20 +708,12 @@ }; brush_shader.get(key.blend_mode) } - BatchKind::Transformable(transform_kind, batch_kind) => { - match batch_kind { - TransformBatchKind::TextRun(glyph_format) => { - let text_shader = match key.blend_mode { - BlendMode::SubpixelDualSource => { - &mut self.ps_text_run_dual_source - } - _ => { - &mut self.ps_text_run - } - }; - return text_shader.get(glyph_format, transform_kind); - } - } + BatchKind::TextRun(glyph_format) => { + let text_shader = match key.blend_mode { + BlendMode::SubpixelDualSource => &mut self.ps_text_run_dual_source, + _ => &mut self.ps_text_run, + }; + text_shader.get(glyph_format) } } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/util.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/util.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender/src/util.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender/src/util.rs 2018-06-20 17:29:09.000000000 +0000 @@ -20,6 +20,7 @@ fn preserves_2d_axis_alignment(&self) -> bool; fn has_perspective_component(&self) -> bool; fn has_2d_inverse(&self) -> bool; + fn exceeds_2d_scale(&self, limit: f64) -> bool; fn inverse_project(&self, target: &TypedPoint2D) -> Option>; fn inverse_rect_footprint(&self, rect: &TypedRect) -> TypedRect; fn transform_kind(&self) -> TransformedRectKind; @@ -68,6 +69,14 @@ self.m11 * self.m22 - self.m12 * self.m21 != 0.0 } + // Check if the matrix post-scaling on either the X or Y axes could cause geometry + // transformed by this matrix to have scaling exceeding the supplied limit. + fn exceeds_2d_scale(&self, limit: f64) -> bool { + let limit2 = (limit * limit) as f32; + self.m11 * self.m11 + self.m12 * self.m12 > limit2 || + self.m21 * self.m21 + self.m22 * self.m22 > limit2 + } + fn inverse_project(&self, target: &TypedPoint2D) -> Option> { let m: TypedTransform2D; m = TypedTransform2D::column_major( diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderCompositorANGLE.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderCompositorANGLE.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderCompositorANGLE.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderCompositorANGLE.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -13,6 +13,7 @@ #include "mozilla/gfx/Logging.h" #include "mozilla/layers/HelpersD3D11.h" #include "mozilla/layers/SyncObject.h" +#include "mozilla/webrender/RenderThread.h" #include "mozilla/widget/CompositorWidget.h" #include "mozilla/widget/WinCompositorWidget.h" #include "mozilla/WindowsVersion.h" @@ -69,8 +70,43 @@ } bool +RenderCompositorANGLE::SutdownEGLLibraryIfNecessary() +{ + const RefPtr egl = gl::GLLibraryEGL::Get(); + if (!egl) { + // egl is not initialized yet; + return true; + } + + RefPtr device = gfx::DeviceManagerDx::Get()->GetCompositorDevice(); + // When DeviceReset is handled by GPUProcessManager/GPUParent, + // CompositorDevice is updated to a new device. EGLDisplay also needs to be updated, + // since EGLDisplay uses DeviceManagerDx::mCompositorDevice on ANGLE WebRender use case. + // EGLDisplay could be updated when Renderer count becomes 0. + // It is ensured by GPUProcessManager during handling DeviceReset. + // GPUChild::RecvNotifyDeviceReset() destroys all CompositorSessions before + // re-creating them. + if (device.get() != GetDeviceOfEGLDisplay() && + RenderThread::Get()->RendererCount() == 0) { + // Shutdown GLLibraryEGL for updating EGLDisplay. + egl->Shutdown(); + } + return true; +} + +bool RenderCompositorANGLE::Initialize() { + if (RenderThread::Get()->IsHandlingDeviceReset()) { + gfxCriticalNote << "Waiting for handling device reset"; + return false; + } + + // Update device if necessary. + if (!SutdownEGLLibraryIfNecessary()) { + return false; + } + nsCString discardFailureId; if (!gl::GLLibraryEGL::EnsureInitialized(/* forceAccel */ true, &discardFailureId)) { gfxCriticalNote << "Failed to load EGL library: " << discardFailureId.get(); @@ -274,6 +310,11 @@ bool RenderCompositorANGLE::BeginFrame() { + if (mDevice->GetDeviceRemovedReason() != S_OK) { + RenderThread::Get()->HandleDeviceReset("BeginFrame", /* aNotify */ true); + return false; + } + mWidget->AsWindows()->UpdateCompositorWndSizeIfNecessary(); if (!ResizeBufferIfNeeded()) { @@ -286,8 +327,11 @@ } if (mSyncObject) { - // XXX: if the synchronization is failed, we should handle the device reset. - mSyncObject->Synchronize(); + if (!mSyncObject->Synchronize()) { + // It's timeout or other error. Handle the device-reset here. + RenderThread::Get()->HandleDeviceReset("SyncObject", /* aNotify */ true); + return false; + } } return true; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderCompositorANGLE.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderCompositorANGLE.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderCompositorANGLE.h 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderCompositorANGLE.h 2018-06-20 17:29:09.000000000 +0000 @@ -51,6 +51,7 @@ void DestroyEGLSurface(); ID3D11Device* GetDeviceOfEGLDisplay(); void CreateSwapChainForDCompIfPossible(IDXGIFactory2* aDXGIFactory2); + bool SutdownEGLLibraryIfNecessary(); RefPtr mGL; EGLConfig mEGLConfig; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderD3D11TextureHostOGL.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -190,6 +190,13 @@ } void +RenderDXGITextureHostOGL::ClearCachedResources() +{ + DeleteTextureHandle(); + mGL = nullptr; +} + +void RenderDXGITextureHostOGL::DeleteTextureHandle() { if (mTextureHandle[0] == 0) { @@ -378,6 +385,13 @@ } } +void +RenderDXGIYCbCrTextureHostOGL::ClearCachedResources() +{ + DeleteTextureHandle(); + mGL = nullptr; +} + GLuint RenderDXGIYCbCrTextureHostOGL::GetGLHandle(uint8_t aChannelIndex) const { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderD3D11TextureHostOGL.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderD3D11TextureHostOGL.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderD3D11TextureHostOGL.h 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderD3D11TextureHostOGL.h 2018-06-20 17:29:09.000000000 +0000 @@ -26,6 +26,7 @@ wr::WrExternalImage Lock(uint8_t aChannelIndex, gl::GLContext* aGL) override; void Unlock() override; + void ClearCachedResources() override; virtual gfx::IntSize GetSize(uint8_t aChannelIndex) const; virtual GLuint GetGLHandle(uint8_t aChannelIndex) const; @@ -65,6 +66,7 @@ wr::WrExternalImage Lock(uint8_t aChannelIndex, gl::GLContext* aGL) override; virtual void Unlock() override; + void ClearCachedResources() override; virtual gfx::IntSize GetSize(uint8_t aChannelIndex) const; virtual GLuint GetGLHandle(uint8_t aChannelIndex) const; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderTextureHost.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderTextureHost.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderTextureHost.h 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderTextureHost.h 2018-06-20 17:29:10.000000000 +0000 @@ -32,7 +32,7 @@ virtual wr::WrExternalImage Lock(uint8_t aChannelIndex, gl::GLContext* aGL) = 0; virtual void Unlock() = 0; - + virtual void ClearCachedResources() {} protected: virtual ~RenderTextureHost(); }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderThread.cpp firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderThread.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderThread.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderThread.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -10,6 +10,7 @@ #include "nsThreadUtils.h" #include "mtransport/runnable_utils.h" #include "mozilla/layers/AsyncImagePipelineManager.h" +#include "mozilla/gfx/GPUParent.h" #include "mozilla/layers/CompositorThread.h" #include "mozilla/layers/CompositorBridgeParent.h" #include "mozilla/layers/SharedSurfacesParent.h" @@ -32,12 +33,14 @@ , mFrameCountMapLock("RenderThread.mFrameCountMapLock") , mRenderTextureMapLock("RenderThread.mRenderTextureMapLock") , mHasShutdown(false) + , mHandlingDeviceReset(false) { } RenderThread::~RenderThread() { + MOZ_ASSERT(mRenderTexturesDeferred.empty()); delete mThread; } @@ -163,6 +166,10 @@ mRenderers.erase(aWindowId); + if (mRenderers.size() == 0 && mHandlingDeviceReset) { + mHandlingDeviceReset = false; + } + MutexAutoLock lock(mFrameCountMapLock); mWindowInfos.Remove(AsUint64(aWindowId)); } @@ -182,6 +189,13 @@ return it->second.get(); } +size_t +RenderThread::RendererCount() +{ + MOZ_ASSERT(IsInRenderThread()); + return mRenderers.size(); +} + void RenderThread::NewFrameReady(wr::WindowId aWindowId) { @@ -202,6 +216,10 @@ return; } + if (mHandlingDeviceReset) { + return; + } + UpdateAndRender(aWindowId); FrameRenderingComplete(aWindowId); } @@ -226,6 +244,10 @@ return; } + if (mHandlingDeviceReset) { + return; + } + auto it = mRenderers.find(aWindowId); MOZ_ASSERT(it != mRenderers.end()); if (it != mRenderers.end()) { @@ -486,9 +508,10 @@ // it. So, no one will access the invalid buffer in RenderTextureHost. RefPtr texture; mRenderTextures.Remove(aExternalImageId, getter_AddRefs(texture)); - Loop()->PostTask(NewRunnableMethod>( + mRenderTexturesDeferred.emplace_back(std::move(texture)); + Loop()->PostTask(NewRunnableMethod( "RenderThread::DeferredRenderTextureHostDestroy", - this, &RenderThread::DeferredRenderTextureHostDestroy, std::move(texture) + this, &RenderThread::DeferredRenderTextureHostDestroy )); } else { mRenderTextures.Remove(aExternalImageId); @@ -506,9 +529,10 @@ } void -RenderThread::DeferredRenderTextureHostDestroy(RefPtr) +RenderThread::DeferredRenderTextureHostDestroy() { - // Do nothing. Just decrease the ref-count of RenderTextureHost. + MutexAutoLock lock(mRenderTextureMapLock); + mRenderTexturesDeferred.clear(); } RenderTextureHost* @@ -527,6 +551,56 @@ ProgramCache(); } +void +RenderThread::HandleDeviceReset(const char* aWhere, bool aNotify) +{ + MOZ_ASSERT(IsInRenderThread()); + + if (mHandlingDeviceReset) { + return; + } + + if (aNotify) { + gfxCriticalNote << "GFX: RenderThread detected a device reset in " << aWhere; + if (XRE_IsGPUProcess()) { + gfx::GPUParent::GetSingleton()->NotifyDeviceReset(); + } + } + + { + MutexAutoLock lock(mRenderTextureMapLock); + mRenderTexturesDeferred.clear(); + for (auto iter = mRenderTextures.Iter(); !iter.Done(); iter.Next()) { + iter.UserData()->ClearCachedResources(); + } + } + + mHandlingDeviceReset = true; + // All RenderCompositors will be destroyed by GPUChild::RecvNotifyDeviceReset() +} + +bool +RenderThread::IsHandlingDeviceReset() +{ + MOZ_ASSERT(IsInRenderThread()); + return mHandlingDeviceReset; +} + +void +RenderThread::SimulateDeviceReset() +{ + if (!IsInRenderThread()) { + Loop()->PostTask(NewRunnableMethod( + "RenderThread::SimulateDeviceReset", + this, &RenderThread::SimulateDeviceReset + )); + } else { + // When this function is called GPUProcessManager::SimulateDeviceReset() already + // triggers destroying all CompositorSessions before re-creating them. + HandleDeviceReset("SimulateDeviceReset", /* aNotify */ false); + } +} + WebRenderProgramCache* RenderThread::ProgramCache() { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderThread.h firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderThread.h --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/RenderThread.h 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/RenderThread.h 2018-06-20 17:29:10.000000000 +0000 @@ -20,6 +20,8 @@ #include "mozilla/webrender/WebRenderTypes.h" #include "mozilla/layers/SynchronousTask.h" +#include + namespace mozilla { namespace wr { @@ -165,10 +167,19 @@ /// Can only be called from the render thread. WebRenderProgramCache* ProgramCache(); + /// Can only be called from the render thread. + void HandleDeviceReset(const char* aWhere, bool aNotify); + /// Can only be called from the render thread. + bool IsHandlingDeviceReset(); + /// Can be called from any thread. + void SimulateDeviceReset(); + + size_t RendererCount(); + private: explicit RenderThread(base::Thread* aThread); - void DeferredRenderTextureHostDestroy(RefPtr aTexture); + void DeferredRenderTextureHostDestroy(); void ShutDownTask(layers::SynchronousTask* aTask); void ProgramCacheTask(); @@ -192,7 +203,13 @@ Mutex mRenderTextureMapLock; nsRefPtrHashtable mRenderTextures; + // Used to remove all RenderTextureHost that are going to be removed by + // a deferred callback and remove them right away without waiting for the callback. + // On device reset we have to remove all GL related resources right away. + std::list> mRenderTexturesDeferred; bool mHasShutdown; + + bool mHandlingDeviceReset; }; } // namespace wr diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/revision.txt firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/revision.txt --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/revision.txt 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/revision.txt 2018-06-20 17:29:10.000000000 +0000 @@ -1 +1 @@ -aff9f409f3d6a3518c38c1f7755657f564c1083a +dd30fbb21c876b252b805b607bd04f3bab1fd228 diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/src/bindings.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/src/bindings.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/src/bindings.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/src/bindings.rs 2018-06-20 17:29:10.000000000 +0000 @@ -931,6 +931,7 @@ upload_method, scene_builder_hooks: Some(Box::new(APZCallbacks::new(window_id))), sampler: Some(Box::new(SamplerCallback::new(window_id))), + max_texture_size: Some(8192), // Moz2D doesn't like textures bigger than this ..Default::default() }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/src/program_cache.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/src/program_cache.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/webrender_bindings/src/program_cache.rs 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/webrender_bindings/src/program_cache.rs 2018-06-20 17:29:09.000000000 +0000 @@ -61,9 +61,20 @@ } #[cfg(not(target_os="windows"))] -fn get_cache_path_from_prof_path(_prof_path: &nsAString) -> Option { - // Not supported yet. - None +fn get_cache_path_from_prof_path(prof_path: &nsAString) -> Option { + if prof_path.is_empty() { + // Empty means that we do not use disk cache. + return None; + } + + use std::ffi::OsString; + + let utf8 = String::from_utf16(prof_path.as_ref()).unwrap(); + let prof_path = OsString::from(utf8); + let mut cache_path = PathBuf::from(&prof_path); + cache_path.push("shader-cache"); + + Some(cache_path) } struct WrProgramBinaryDiskCache { @@ -236,7 +247,6 @@ } impl WrProgramCache { - #[cfg(target_os = "windows")] pub fn new(prof_path: &nsAString, workers: &Arc) -> Self { let disk_cache = Rc::new(RefCell::new(WrProgramBinaryDiskCache::new(prof_path, workers))); let program_cache_observer = Box::new(WrProgramCacheObserver::new(Rc::clone(&disk_cache))); @@ -248,16 +258,6 @@ } } - #[cfg(not(target_os="windows"))] - pub fn new(_prof_path: &nsAString, _: &Arc) -> Self { - let program_cache = ProgramCache::new(None); - - WrProgramCache { - program_cache, - disk_cache: None, - } - } - pub fn rc_get(&self) -> &Rc { &self.program_cache } @@ -271,7 +271,6 @@ } } -#[cfg(target_os = "windows")] pub fn remove_disk_cache(prof_path: &nsAString) -> Result<(), Error> { use std::fs::remove_dir_all; use std::time::{Instant}; @@ -289,10 +288,3 @@ } Ok(()) } - -#[cfg(not(target_os="windows"))] -pub fn remove_disk_cache(_prof_path: &nsAString) -> Result<(), Error> { - error!("Shader disk cache is not supported"); - return Err(Error::new(ErrorKind::Other, "Not supported")) -} - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/wrench/src/args.yaml firefox-trunk-62.0~a1~hg20180620r423058/gfx/wrench/src/args.yaml --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/wrench/src/args.yaml 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/wrench/src/args.yaml 2018-06-20 17:29:10.000000000 +0000 @@ -82,41 +82,42 @@ required: true index: 1 - show: - about: show frame(s) described by YAML + about: show frame(s) described by YAML, binary recording, or capture + aliases: ['load', 'replay'] args: - queue: short: q long: queue - help: How many frames to submit to WR ahead of time (default 1) + help: How many frames to submit to WR ahead of time (default 1) (YAML only) takes_value: true - include: long: include - help: Include the given element type. Can be specified multiple times. (rect/image/text/glyphs/border) + help: Include the given element type. Can be specified multiple times. (rect/image/text/glyphs/border) (YAML only) multiple: true takes_value: true - list-resources: long: list-resources - help: List the resources used by this YAML file + help: List the resources used by this render (YAML only) - watch: short: w long: watch - help: Watch the given YAML file, reloading whenever it changes - - INPUT: - help: The input YAML file - required: true - index: 1 - - replay: - about: replay binary recording - args: + help: Watch the given file, reloading whenever it changes (YAML only) - api: long: api - help: Reissue Api messages for each frame + help: Reissue Api messages for each frame (binary recording only) - skip-uploads: long: skip-uploads help: Skip re-uploads while reissuing Api messages (BROKEN) - play: long: play - help: Play entire recording through, then quit (useful with --save) + help: Play entire recording through, then quit (useful with --save) (binary recording only) + - INPUT: + help: The input YAML, binary recording, or capture directory + required: true + index: 1 + - replay: + about: replay binary recording + args: - INPUT: help: The input binary file or directory required: true @@ -153,11 +154,3 @@ help: second benchmark file to compare required: true index: 2 - - load: - about: load a capture - args: - - path: - help: directory containing the capture - takes_value: true - required: true - index: 1 diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/gfx/wrench/src/main.rs firefox-trunk-62.0~a1~hg20180620r423058/gfx/wrench/src/main.rs --- firefox-trunk-62.0~a1~hg20180611r422292/gfx/wrench/src/main.rs 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/gfx/wrench/src/main.rs 2018-06-20 17:29:10.000000000 +0000 @@ -363,6 +363,31 @@ (Box::new(Notifier { tx: tx }), rx) } +fn rawtest(mut wrench: Wrench, window: &mut WindowWrapper, rx: Receiver) { + RawtestHarness::new(&mut wrench, window, &rx).run(); + wrench.shut_down(rx); +} + +fn reftest<'a>( + mut wrench: Wrench, + window: &mut WindowWrapper, + subargs: &clap::ArgMatches<'a>, + rx: Receiver +) -> usize { + let dim = window.get_inner_size(); + let base_manifest = Path::new("reftests/reftest.list"); + let specific_reftest = subargs.value_of("REFTEST").map(|x| Path::new(x)); + let mut reftest_options = ReftestOptions::default(); + if let Some(allow_max_diff) = subargs.value_of("fuzz_tolerance") { + reftest_options.allow_max_difference = allow_max_diff.parse().unwrap_or(1); + reftest_options.allow_num_differences = dim.width as usize * dim.height as usize; + } + let num_failures = ReftestHarness::new(&mut wrench, window, &rx) + .run(base_manifest, specific_reftest, &reftest_options); + wrench.shut_down(rx); + num_failures +} + fn main() { #[cfg(feature = "env_logger")] env_logger::init(); @@ -440,10 +465,8 @@ notifier, ); - let mut thing = if let Some(subargs) = args.subcommand_matches("show") { - Box::new(YamlFrameReader::new_from_args(subargs)) as Box - } else if let Some(subargs) = args.subcommand_matches("replay") { - Box::new(BinaryFrameReader::new_from_args(subargs)) as Box + if let Some(subargs) = args.subcommand_matches("show") { + render(&mut wrench, &mut window, size, &mut events_loop, subargs); } else if let Some(subargs) = args.subcommand_matches("png") { let surface = match subargs.value_of("surface") { Some("screen") | None => png::ReadSurface::Screen, @@ -452,30 +475,11 @@ }; let reader = YamlFrameReader::new_from_args(subargs); png::png(&mut wrench, surface, &mut window, reader, rx.unwrap()); - wrench.renderer.deinit(); - return; } else if let Some(subargs) = args.subcommand_matches("reftest") { - let dim = window.get_inner_size(); - let base_manifest = Path::new("reftests/reftest.list"); - let specific_reftest = subargs.value_of("REFTEST").map(|x| Path::new(x)); - let mut reftest_options = ReftestOptions::default(); - if let Some(allow_max_diff) = subargs.value_of("fuzz_tolerance") { - reftest_options.allow_max_difference = allow_max_diff.parse().unwrap_or(1); - reftest_options.allow_num_differences = dim.width as usize * dim.height as usize; - } - let rx = rx.unwrap(); - let num_failures = ReftestHarness::new(&mut wrench, &mut window, &rx) - .run(base_manifest, specific_reftest, &reftest_options); - wrench.shut_down(rx); - // exit with an error code to fail on CI - process::exit(num_failures as _); + // Exit with an error code in order to ensure the CI job fails. + process::exit(reftest(wrench, &mut window, subargs, rx.unwrap()) as _); } else if let Some(_) = args.subcommand_matches("rawtest") { - let rx = rx.unwrap(); - { - let harness = RawtestHarness::new(&mut wrench, &mut window, &rx); - harness.run(); - } - wrench.shut_down(rx); + rawtest(wrench, &mut window, rx.unwrap()); return; } else if let Some(subargs) = args.subcommand_matches("perf") { // Perf mode wants to benchmark the total cost of drawing @@ -491,16 +495,42 @@ let second_filename = subargs.value_of("second_filename").unwrap(); perf::compare(first_filename, second_filename); return; - } else if let Some(subargs) = args.subcommand_matches("load") { - let path = PathBuf::from(subargs.value_of("path").unwrap()); - let mut documents = wrench.api.load_capture(path); + } else { + panic!("Should never have gotten here! {:?}", args); + }; + + wrench.renderer.deinit(); +} + +fn render<'a>( + wrench: &mut Wrench, + window: &mut WindowWrapper, + size: DeviceUintSize, + events_loop: &mut Option, + subargs: &clap::ArgMatches<'a>, +) { + let input_path = subargs.value_of("INPUT").map(PathBuf::from).unwrap(); + + // If the input is a directory, we are looking at a capture. + let mut thing = if input_path.as_path().is_dir() { + let mut documents = wrench.api.load_capture(input_path); println!("loaded {:?}", documents.iter().map(|cd| cd.document_id).collect::>()); let captured = documents.swap_remove(0); window.resize(captured.window_size); wrench.document_id = captured.document_id; Box::new(captured) as Box } else { - panic!("Should never have gotten here! {:?}", args); + let extension = input_path + .extension() + .expect("Tried to render with an unknown file type.") + .to_str() + .expect("Tried to render with an unknown file type."); + + match extension { + "yaml" => Box::new(YamlFrameReader::new_from_args(subargs)) as Box, + "bin" => Box::new(BinaryFrameReader::new_from_args(subargs)) as Box, + _ => panic!("Tried to render with an unknown file type."), + } }; let mut show_help = false; @@ -510,7 +540,7 @@ let dim = window.get_inner_size(); wrench.update(dim); - thing.do_frame(&mut wrench); + thing.do_frame(wrench); let mut body = |wrench: &mut Wrench, global_event: winit::Event| { if let Some(window_title) = wrench.take_title() { @@ -665,17 +695,13 @@ winit::ControlFlow::Continue }; - match events_loop { + match *events_loop { None => { - while body(&mut wrench, winit::Event::Awakened) == winit::ControlFlow::Continue {} + while body(wrench, winit::Event::Awakened) == winit::ControlFlow::Continue {} let rect = DeviceUintRect::new(DeviceUintPoint::zero(), size); let pixels = wrench.renderer.read_pixels_rgba8(rect); save_flipped("screenshot.png", pixels, size); } - Some(ref mut events_loop) => { - events_loop.run_forever(|event| body(&mut wrench, event)); - } + Some(ref mut events_loop) => events_loop.run_forever(|event| body(wrench, event)), } - - wrench.renderer.deinit(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/CopyOnWrite.h firefox-trunk-62.0~a1~hg20180620r423058/image/CopyOnWrite.h --- firefox-trunk-62.0~a1~hg20180611r422292/image/CopyOnWrite.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/CopyOnWrite.h 2018-06-20 17:29:10.000000000 +0000 @@ -30,11 +30,36 @@ public: NS_INLINE_DECL_REFCOUNTING(CopyOnWriteValue) - explicit CopyOnWriteValue(T* aValue) : mValue(aValue) { } - explicit CopyOnWriteValue(already_AddRefed& aValue) : mValue(aValue) { } - explicit CopyOnWriteValue(already_AddRefed&& aValue) : mValue(aValue) { } - explicit CopyOnWriteValue(const RefPtr& aValue) : mValue(aValue) { } - explicit CopyOnWriteValue(RefPtr&& aValue) : mValue(aValue) { } + explicit CopyOnWriteValue(T* aValue) + : mValue(aValue) + , mReaders(0) + , mWriter(false) + { + } + explicit CopyOnWriteValue(already_AddRefed& aValue) + : mValue(aValue) + , mReaders(0) + , mWriter(false) + { + } + explicit CopyOnWriteValue(already_AddRefed&& aValue) + : mValue(aValue) + , mReaders(0) + , mWriter(false) + { + } + explicit CopyOnWriteValue(const RefPtr& aValue) + : mValue(aValue) + , mReaders(0) + , mWriter(false) + { + } + explicit CopyOnWriteValue(RefPtr&& aValue) + : mValue(aValue) + , mReaders(0) + , mWriter(false) + { + } T* get() { return mValue.get(); } const T* get() const { return mValue.get(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/decoders/nsGIFDecoder2.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/decoders/nsGIFDecoder2.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/decoders/nsGIFDecoder2.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/decoders/nsGIFDecoder2.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -86,6 +86,7 @@ , mOldColor(0) , mCurrentFrameIndex(-1) , mColorTablePos(0) + , mColorMask('\0') , mGIFOpen(false) , mSawTransparency(false) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/decoders/nsJPEGDecoder.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/decoders/nsJPEGDecoder.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/decoders/nsJPEGDecoder.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/decoders/nsJPEGDecoder.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -74,13 +74,28 @@ nsJPEGDecoder::nsJPEGDecoder(RasterImage* aImage, Decoder::DecodeStyle aDecodeStyle) - : Decoder(aImage) - , mLexer(Transition::ToUnbuffered(State::FINISHED_JPEG_DATA, - State::JPEG_DATA, - SIZE_MAX), - Transition::TerminateSuccess()) - , mDecodeStyle(aDecodeStyle) + : Decoder(aImage) + , mLexer(Transition::ToUnbuffered(State::FINISHED_JPEG_DATA, + State::JPEG_DATA, + SIZE_MAX), + Transition::TerminateSuccess()) + , mProfile(nullptr) + , mProfileLength(0) + , mDecodeStyle(aDecodeStyle) { + this->mErr.pub.error_exit = nullptr; + this->mErr.pub.emit_message = nullptr; + this->mErr.pub.output_message = nullptr; + this->mErr.pub.format_message = nullptr; + this->mErr.pub.reset_error_mgr = nullptr; + this->mErr.pub.msg_code = 0; + this->mErr.pub.trace_level = 0; + this->mErr.pub.num_warnings = 0; + this->mErr.pub.jpeg_message_table = nullptr; + this->mErr.pub.last_jpeg_message = 0; + this->mErr.pub.addon_message_table = nullptr; + this->mErr.pub.first_addon_message = 0; + this->mErr.pub.last_addon_message = 0; mState = JPEG_HEADER; mReading = true; mImageData = nullptr; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/Downscaler.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/Downscaler.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/Downscaler.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/Downscaler.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -24,6 +24,10 @@ : mTargetSize(aTargetSize) , mOutputBuffer(nullptr) , mWindowCapacity(0) + , mLinesInBuffer(0) + , mPrevInvalidatedLine(0) + , mCurrentOutLine(0) + , mCurrentInLine(0) , mHasAlpha(true) , mFlipVertically(false) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/encoders/bmp/nsBMPEncoder.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/encoders/bmp/nsBMPEncoder.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/encoders/bmp/nsBMPEncoder.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/encoders/bmp/nsBMPEncoder.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -19,15 +19,20 @@ NS_IMPL_ISUPPORTS(nsBMPEncoder, imgIEncoder, nsIInputStream, nsIAsyncInputStream) -nsBMPEncoder::nsBMPEncoder() : mImageBufferStart(nullptr), - mImageBufferCurr(0), - mImageBufferSize(0), - mImageBufferReadPoint(0), - mFinished(false), - mCallback(nullptr), - mCallbackTarget(nullptr), - mNotifyThreshold(0) +nsBMPEncoder::nsBMPEncoder() + : mBMPInfoHeader{} + , mImageBufferStart(nullptr) + , mImageBufferCurr(0) + , mImageBufferSize(0) + , mImageBufferReadPoint(0) + , mFinished(false) + , mCallback(nullptr) + , mCallbackTarget(nullptr) + , mNotifyThreshold(0) { + this->mBMPFileHeader.filesize = 0; + this->mBMPFileHeader.reserved = 0; + this->mBMPFileHeader.dataoffset = 0; } nsBMPEncoder::~nsBMPEncoder() diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/encoders/ico/nsICOEncoder.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/encoders/ico/nsICOEncoder.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/encoders/ico/nsICOEncoder.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/encoders/ico/nsICOEncoder.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -17,13 +17,16 @@ NS_IMPL_ISUPPORTS(nsICOEncoder, imgIEncoder, nsIInputStream, nsIAsyncInputStream) -nsICOEncoder::nsICOEncoder() : mImageBufferStart(nullptr), - mImageBufferCurr(0), - mImageBufferSize(0), - mImageBufferReadPoint(0), - mFinished(false), - mUsePNG(true), - mNotifyThreshold(0) +nsICOEncoder::nsICOEncoder() + : mICOFileHeader{} + , mICODirEntry{} + , mImageBufferStart(nullptr) + , mImageBufferCurr(0) + , mImageBufferSize(0) + , mImageBufferReadPoint(0) + , mFinished(false) + , mUsePNG(true) + , mNotifyThreshold(0) { } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/imgFrame.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/imgFrame.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/imgFrame.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/imgFrame.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -209,6 +209,7 @@ , mTimeout(FrameTimeout::FromRawMilliseconds(100)) , mDisposalMethod(DisposalMethod::NOT_SPECIFIED) , mBlendMethod(BlendMethod::OVER) + , mFormat(SurfaceFormat::UNKNOWN) , mPalettedImageData(nullptr) , mPaletteDepth(0) , mNonPremult(false) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/imgFrame.h firefox-trunk-62.0~a1~hg20180620r423058/image/imgFrame.h --- firefox-trunk-62.0~a1~hg20180611r422292/image/imgFrame.h 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/imgFrame.h 2018-06-20 17:29:10.000000000 +0000 @@ -235,7 +235,10 @@ struct SurfaceWithFormat { RefPtr mDrawable; SurfaceFormat mFormat; - SurfaceWithFormat() { } + SurfaceWithFormat() + : mFormat(SurfaceFormat::UNKNOWN) + { + } SurfaceWithFormat(gfxDrawable* aDrawable, SurfaceFormat aFormat) : mDrawable(aDrawable), mFormat(aFormat) { } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/RasterImage.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/RasterImage.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/RasterImage.cpp 2018-06-11 13:02:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/RasterImage.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -74,6 +74,7 @@ ImageResource(aURI), // invoke superclass's constructor mSize(0,0), mLockCount(0), + mDecoderType(DecoderType::UNKNOWN), mDecodeCount(0), #ifdef DEBUG mFramesNotified(0), diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/image/VectorImage.cpp firefox-trunk-62.0~a1~hg20180620r423058/image/VectorImage.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/image/VectorImage.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/image/VectorImage.cpp 2018-06-20 17:29:09.000000000 +0000 @@ -375,6 +375,7 @@ ImageResource(aURI), // invoke superclass's constructor mLockCount(0), mIsInitialized(false), + mDiscardable(false), mIsFullyLoaded(false), mIsDrawing(false), mHaveAnimations(false), diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/intl/chardet/nsCyrillicDetector.cpp firefox-trunk-62.0~a1~hg20180620r423058/intl/chardet/nsCyrillicDetector.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/intl/chardet/nsCyrillicDetector.cpp 2018-06-11 13:02:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/intl/chardet/nsCyrillicDetector.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -130,6 +130,7 @@ const uint8_t ** aCyrillicClass, const char **aCharsets) : nsCyrillicDetector(aItems, aCyrillicClass, aCharsets) + , mResult(nullptr) { } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/intl/locale/android/OSPreferences_android.cpp firefox-trunk-62.0~a1~hg20180620r423058/intl/locale/android/OSPreferences_android.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/intl/locale/android/OSPreferences_android.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/intl/locale/android/OSPreferences_android.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -30,10 +30,14 @@ //XXX: Notice, this value may be empty on an early read. In that case // we won't add anything to the return list so that it doesn't get // cached in mSystemLocales. - auto locale = mozilla::jni::IsFennec() ? java::BrowserLocaleManager::GetLocale() : - java::GeckoAppShell::GetDefaultLocale(); - if (locale) { - aLocaleList.AppendElement(locale->ToCString()); + auto locales = mozilla::jni::IsFennec() ? + java::BrowserLocaleManager::GetLocales() : + java::GeckoAppShell::GetDefaultLocales(); + if (locales) { + for (size_t i = 0; i < locales->Length(); i++) { + jni::String::LocalRef locale = locales->GetElement(i); + aLocaleList.AppendElement(locale->ToCString()); + } return true; } return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/moz.build firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/moz.build --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/moz.build 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/moz.build 2018-06-20 17:29:12.000000000 +0000 @@ -58,7 +58,6 @@ if os_posix: UNIFIED_SOURCES += [ 'src/base/condition_variable_posix.cc', - 'src/base/file_descriptor_shuffle.cc', 'src/base/file_util_posix.cc', 'src/base/lock_impl_posix.cc', 'src/base/message_pump_libevent.cc', diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/file_descriptor_shuffle.cc firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/file_descriptor_shuffle.cc --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/file_descriptor_shuffle.cc 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/file_descriptor_shuffle.cc 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/file_descriptor_shuffle.h" - -#include -#include - -#include "base/eintr_wrapper.h" -#include "base/logging.h" - -namespace base { - -bool PerformInjectiveMultimapDestructive( - InjectiveMultimap* m, InjectionDelegate* delegate) { - static const size_t kMaxExtraFDs = 16; - int extra_fds[kMaxExtraFDs]; - unsigned next_extra_fd = 0; - - // DANGER: this function may not allocate. - - for (InjectiveMultimap::iterator i = m->begin(); i != m->end(); ++i) { - int temp_fd = -1; - - // We DCHECK the injectiveness of the mapping. - for (InjectiveMultimap::iterator j = i + 1; j != m->end(); ++j) { - DCHECK(i->dest != j->dest) << "Both fd " << i->source - << " and " << j->source << " map to " << i->dest; - } - - const bool is_identity = i->source == i->dest; - - for (InjectiveMultimap::iterator j = i + 1; j != m->end(); ++j) { - if (!is_identity && i->dest == j->source) { - if (temp_fd == -1) { - if (!delegate->Duplicate(&temp_fd, i->dest)) - return false; - if (next_extra_fd < kMaxExtraFDs) { - extra_fds[next_extra_fd++] = temp_fd; - } else { - DLOG(ERROR) << "PerformInjectiveMultimapDestructive overflowed " - << "extra_fds. Leaking file descriptors!"; - } - } - - j->source = temp_fd; - j->close = false; - } - - if (i->close && i->source == j->dest) - i->close = false; - - if (i->close && i->source == j->source) { - i->close = false; - j->close = true; - } - } - - if (!is_identity) { - if (!delegate->Move(i->source, i->dest)) - return false; - } - - if (!is_identity && i->close) - delegate->Close(i->source); - } - - for (unsigned i = 0; i < next_extra_fd; i++) - delegate->Close(extra_fds[i]); - - return true; -} - -bool PerformInjectiveMultimap(const InjectiveMultimap& m_in, - InjectionDelegate* delegate) { - InjectiveMultimap m(m_in); - return PerformInjectiveMultimapDestructive(&m, delegate); -} - -bool FileDescriptorTableInjection::Duplicate(int* result, int fd) { - *result = HANDLE_EINTR(dup(fd)); - return *result >= 0; -} - -bool FileDescriptorTableInjection::Move(int src, int dest) { - return HANDLE_EINTR(dup2(src, dest)) != -1; -} - -void FileDescriptorTableInjection::Close(int fd) { - IGNORE_EINTR(close(fd)); -} - -} // namespace base diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/file_descriptor_shuffle.h firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/file_descriptor_shuffle.h --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/file_descriptor_shuffle.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/file_descriptor_shuffle.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef BASE_FILE_DESCRIPTOR_SHUFFLE_H_ -#define BASE_FILE_DESCRIPTOR_SHUFFLE_H_ - -#include "mozilla/Attributes.h" - -// This code exists to perform the shuffling of file descriptors which is -// commonly needed when forking subprocesses. The naive approve is very simple, -// just call dup2 to setup the desired descriptors, but wrong. It's tough to -// handle the edge cases (like mapping 0 -> 1, 1 -> 0) correctly. -// -// In order to unittest this code, it's broken into the abstract action (an -// injective multimap) and the concrete code for dealing with file descriptors. -// Users should use the code like this: -// base::InjectiveMultimap file_descriptor_map; -// file_descriptor_map.push_back(base::InjectionArc(devnull, 0, true)); -// file_descriptor_map.push_back(base::InjectionArc(devnull, 2, true)); -// file_descriptor_map.push_back(base::InjectionArc(pipe[1], 1, true)); -// base::ShuffleFileDescriptors(file_descriptor_map); -// -// and trust the the Right Thing will get done. - -#include - -namespace base { - -// A Delegate which performs the actions required to perform an injective -// multimapping in place. -class InjectionDelegate { - public: - // Duplicate |fd|, an element of the domain, and write a fresh element of the - // domain into |result|. Returns true iff successful. - virtual bool Duplicate(int* result, int fd) = 0; - // Destructively move |src| to |dest|, overwriting |dest|. Returns true iff - // successful. - virtual bool Move(int src, int dest) = 0; - // Delete an element of the domain. - virtual void Close(int fd) = 0; -}; - -// An implementation of the InjectionDelegate interface using the file -// descriptor table of the current process as the domain. -class FileDescriptorTableInjection : public InjectionDelegate { - virtual bool Duplicate(int* result, int fd) override; - virtual bool Move(int src, int dest) override; - virtual void Close(int fd) override; -}; - -// A single arc of the directed graph which describes an injective multimapping. -struct InjectionArc { - InjectionArc(int in_source, int in_dest, bool in_close) - : source(in_source), - dest(in_dest), - close(in_close) { - } - - int source; - int dest; - bool close; // if true, delete the source element after performing the - // mapping. -}; - -typedef std::vector InjectiveMultimap; - -bool PerformInjectiveMultimap(const InjectiveMultimap& map, - InjectionDelegate* delegate); -bool PerformInjectiveMultimapDestructive(InjectiveMultimap* map, - InjectionDelegate* delegate); - -// This function will not call malloc but will mutate |map| -static inline bool ShuffleFileDescriptors(InjectiveMultimap *map) { - FileDescriptorTableInjection delegate; - return PerformInjectiveMultimapDestructive(map, &delegate); -} - -} // namespace base - -#endif // !BASE_FILE_DESCRIPTOR_SHUFFLE_H_ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util.h firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util.h --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util.h 2018-06-20 17:29:12.000000000 +0000 @@ -27,6 +27,7 @@ #include #endif +#include #include #include #include @@ -39,10 +40,6 @@ #include "base/command_line.h" #include "base/process.h" -#if defined(OS_POSIX) -#include "base/file_descriptor_shuffle.h" -#endif - #include "mozilla/UniquePtr.h" #include "mozilla/ipc/EnvironmentMap.h" @@ -92,10 +89,11 @@ // WARNING: do not use. It's inherently race-prone in the face of // multi-threading. void SetAllFDsToCloseOnExec(); -// Close all file descriptors, expect those which are a destination in the -// given multimap. Only call this function in a child process where you know -// that there aren't any other threads. -void CloseSuperfluousFds(const base::InjectiveMultimap& saved_map); +// Close all file descriptors, except for std{in,out,err} and those +// for which the given function returns true. Only call this function +// in a child process where you know that there aren't any other +// threads. +void CloseSuperfluousFds(std::function&& should_preserve); typedef std::vector > file_handle_mapping_vector; typedef std::map environment_map; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_linux.cc firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_linux.cc --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_linux.cc 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_linux.cc 2018-06-20 17:29:12.000000000 +0000 @@ -13,7 +13,7 @@ #include "base/eintr_wrapper.h" #include "base/logging.h" -#include "mozilla/Move.h" +#include "mozilla/ipc/FileDescriptorShuffle.h" #include "mozilla/UniquePtr.h" namespace { @@ -29,12 +29,12 @@ ProcessHandle* process_handle) { mozilla::UniquePtr argv_cstr(new char*[argv.size() + 1]); - // Illegal to allocate memory after fork and before execvp - InjectiveMultimap fd_shuffle1, fd_shuffle2; - fd_shuffle1.reserve(options.fds_to_remap.size()); - fd_shuffle2.reserve(options.fds_to_remap.size()); EnvironmentArray envp = BuildEnvironmentArray(options.env_map); + mozilla::ipc::FileDescriptorShuffle shuffle; + if (!shuffle.Init(options.fds_to_remap)) { + return false; + } pid_t pid = options.fork_delegate ? options.fork_delegate->Fork() : fork(); if (pid < 0) @@ -42,15 +42,16 @@ if (pid == 0) { // In the child: - for (const auto& fd_map : options.fds_to_remap) { - fd_shuffle1.push_back(InjectionArc(fd_map.first, fd_map.second, false)); - fd_shuffle2.push_back(InjectionArc(fd_map.first, fd_map.second, false)); + for (const auto& fds : shuffle.Dup2Sequence()) { + if (HANDLE_EINTR(dup2(fds.first, fds.second)) != fds.second) { + // This shouldn't happen, but check for it. And see below + // about logging being unsafe here, so this is debug only. + DLOG(ERROR) << "dup2 failed"; + _exit(127); + } } - if (!ShuffleFileDescriptors(&fd_shuffle1)) - _exit(127); - - CloseSuperfluousFds(fd_shuffle2); + CloseSuperfluousFds(shuffle.MapsToFunc()); for (size_t i = 0; i < argv.size(); i++) argv_cstr[i] = const_cast(argv[i].c_str()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_mac.mm firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_mac.mm --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_mac.mm 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_mac.mm 2018-06-20 17:29:12.000000000 +0000 @@ -40,6 +40,9 @@ posix_spawn_file_actions_t file_actions; if (posix_spawn_file_actions_init(&file_actions) != 0) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + MOZ_CRASH("base::LaunchApp: posix_spawn_file_actions_init failed"); +#endif return false; } auto file_actions_guard = mozilla::MakeScopeExit([&file_actions] { @@ -58,6 +61,9 @@ } } else { if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + MOZ_CRASH("base::LaunchApp: posix_spawn_file_actions_adddup2 failed"); +#endif return false; } } @@ -66,6 +72,9 @@ // Initialize spawn attributes. posix_spawnattr_t spawnattr; if (posix_spawnattr_init(&spawnattr) != 0) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + MOZ_CRASH("base::LaunchApp: posix_spawnattr_init failed"); +#endif return false; } auto spawnattr_guard = mozilla::MakeScopeExit([&spawnattr] { @@ -76,12 +85,19 @@ // that aren't named in `file_actions`. (This is an Apple-specific // extension to posix_spawn.) if (posix_spawnattr_setflags(&spawnattr, POSIX_SPAWN_CLOEXEC_DEFAULT) != 0) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + MOZ_CRASH("base::LaunchApp: posix_spawnattr_setflags failed"); +#endif return false; } // Exempt std{in,out,err} from being closed by POSIX_SPAWN_CLOEXEC_DEFAULT. for (int fd = 0; fd <= STDERR_FILENO; ++fd) { if (posix_spawn_file_actions_addinherit_np(&file_actions, fd) != 0) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + MOZ_CRASH("base::LaunchApp: posix_spawn_file_actions_addinherit_np " + "failed"); +#endif return false; } } @@ -96,6 +112,16 @@ bool process_handle_valid = pid > 0; if (!spawn_succeeded || !process_handle_valid) { +#ifdef ASYNC_CONTENTPROC_LAUNCH + if (!spawn_succeeded && !process_handle_valid) { + MOZ_CRASH("base::LaunchApp: spawn_succeeded is false and " + "process_handle_valid is false"); + } else if (!spawn_succeeded) { + MOZ_CRASH("base::LaunchApp: spawn_succeeded is false"); + } else { + MOZ_CRASH("base::LaunchApp: process_handle_valid is false"); + } +#endif retval = false; } else { gProcessLog.print("==> process %d launched child process %d\n", diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_posix.cc firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_posix.cc --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/chromium/src/base/process_util_posix.cc 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/chromium/src/base/process_util_posix.cc 2018-06-20 17:29:12.000000000 +0000 @@ -121,9 +121,10 @@ typedef mozilla::UniquePtr ScopedDIR; -void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) { - // DANGER: no calls to malloc are allowed from now on: - // http://crbug.com/36678 +void CloseSuperfluousFds(std::function&& should_preserve) { + // DANGER: no calls to malloc (or locks, etc.) are allowed from now on: + // https://crbug.com/36678 + // Also, beware of STL iterators: https://crbug.com/331459 #if defined(ANDROID) static const rlim_t kSystemDefaultMaxFds = 1024; static const char kFDDir[] = "/proc/self/fd"; @@ -160,19 +161,14 @@ // Fallback case: Try every possible fd. for (rlim_t i = 0; i < max_fds; ++i) { const int fd = static_cast(i); - if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) + if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO || + should_preserve(fd)) { continue; - InjectiveMultimap::const_iterator j; - for (j = saved_mapping.begin(); j != saved_mapping.end(); j++) { - if (fd == j->dest) - break; } - if (j != saved_mapping.end()) - continue; // Since we're just trying to close anything we can find, // ignore any error return values of close(). - IGNORE_EINTR(close(fd)); + close(fd); } return; } @@ -189,17 +185,12 @@ const long int fd = strtol(fd_dir.name(), &endptr, 10); if (fd_dir.name()[0] == 0 || *endptr || fd < 0 || errno) continue; - if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) - continue; - InjectiveMultimap::const_iterator i; - for (i = saved_mapping.begin(); i != saved_mapping.end(); i++) { - if (fd == i->dest) - break; - } - if (i != saved_mapping.end()) - continue; if (fd == dir_fd) continue; + if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO || + should_preserve(fd)) { + continue; + } // When running under Valgrind, Valgrind opens several FDs for its // own use and will complain if we try to close them. All of diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/BackgroundUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/BackgroundUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/BackgroundUtils.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/BackgroundUtils.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -590,7 +590,9 @@ ParentLoadInfoForwarderArgs* aForwarderArgsOut) { if (!aLoadInfo) { - *aForwarderArgsOut = ParentLoadInfoForwarderArgs(false, void_t()); + *aForwarderArgsOut = ParentLoadInfoForwarderArgs(false, void_t(), + nsILoadInfo::TAINTING_BASIC, + false); return; } @@ -600,9 +602,14 @@ ipcController = controller.ref().ToIPC(); } + uint32_t tainting = nsILoadInfo::TAINTING_BASIC; + Unused << aLoadInfo->GetTainting(&tainting); + *aForwarderArgsOut = ParentLoadInfoForwarderArgs( aLoadInfo->GetAllowInsecureRedirectToDataURI(), - ipcController + ipcController, + tainting, + aLoadInfo->GetServiceWorkerTaintingSynthesized() ); } @@ -627,6 +634,13 @@ ServiceWorkerDescriptor(controller.get_IPCServiceWorkerDescriptor())); } + if (aForwarderArgs.serviceWorkerTaintingSynthesized()) { + aLoadInfo->SynthesizeServiceWorkerTainting( + static_cast(aForwarderArgs.tainting())); + } else { + aLoadInfo->MaybeIncreaseTainting(aForwarderArgs.tainting()); + } + return NS_OK; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/FileDescriptorShuffle.cpp firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/FileDescriptorShuffle.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/FileDescriptorShuffle.cpp 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/FileDescriptorShuffle.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -0,0 +1,118 @@ +/* -*- 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/. */ + +#include "FileDescriptorShuffle.h" + +#include "base/eintr_wrapper.h" +#include "mozilla/Assertions.h" +#include "mozilla/DebugOnly.h" + +#include +#include +#include + +namespace mozilla { +namespace ipc { + +// F_DUPFD_CLOEXEC is like F_DUPFD (see below) but atomically makes +// the new fd close-on-exec. This is useful to prevent accidental fd +// leaks into processes created by plain fork/exec, but IPC uses +// CloseSuperfluousFds so it's not essential. +// +// F_DUPFD_CLOEXEC is in POSIX 2008, but as of 2018 there are still +// some OSes that don't support it. (Specifically: Solaris 10 doesn't +// have it, and Android should have kernel support but doesn't define +// the constant until API 21 (Lollipop). We also don't use this for +// IPC child launching on Android, so there's no point in hard-coding +// the definitions like we do for Android in some other cases.) +#ifdef F_DUPFD_CLOEXEC +static const int kDupFdCmd = F_DUPFD_CLOEXEC; +#else +static const int kDupFdCmd = F_DUPFD; +#endif + +// This implementation ensures that the *ranges* of the source and +// destination fds don't overlap, which is unnecessary but sufficient +// to avoid conflicts or identity mappings. +// +// In practice, the source fds will usually be large and the +// destination fds will all be relatively small, so there mostly won't +// be temporary fds. This approach has the advantage of being simple +// (and linear-time, but hopefully there aren't enough fds for that to +// matter). +bool +FileDescriptorShuffle::Init(MappingRef aMapping) +{ + MOZ_ASSERT(mMapping.IsEmpty()); + + // Find the maximum destination fd; any source fds not greater than + // this will be duplicated. + int maxDst = STDERR_FILENO; + for (const auto& elem : aMapping) { + maxDst = std::max(maxDst, elem.second); + } + mMaxDst = maxDst; + +#ifdef DEBUG + // Increase the limit to make sure the F_DUPFD case gets test coverage. + if (!aMapping.IsEmpty()) { + // Try to find a value that will create a nontrivial partition. + int fd0 = aMapping[0].first; + int fdn = aMapping.rbegin()->first; + maxDst = std::max(maxDst, (fd0 + fdn) / 2); + } +#endif + + for (const auto& elem : aMapping) { + int src = elem.first; + // F_DUPFD is like dup() but allows placing a lower bound + // on the new fd, which is exactly what we want. + if (src <= maxDst) { + src = fcntl(src, kDupFdCmd, maxDst + 1); + if (src < 0) { + return false; + } + mTempFds.AppendElement(src); + } + MOZ_ASSERT(src > maxDst); +#ifdef DEBUG + // Check for accidentally mapping two different fds to the same + // destination. (This is O(n^2) time, but it shouldn't matter.) + for (const auto& otherElem : mMapping) { + MOZ_ASSERT(elem.second != otherElem.second); + } +#endif + mMapping.AppendElement(std::make_pair(src, elem.second)); + } + return true; +} + +bool +FileDescriptorShuffle::MapsTo(int aFd) const +{ + // Prune fds that are too large to be a destination, rather than + // searching; this should be the common case. + if (aFd > mMaxDst) { + return false; + } + for (const auto& elem : mMapping) { + if (elem.second == aFd) { + return true; + } + } + return false; +} + +FileDescriptorShuffle::~FileDescriptorShuffle() +{ + for (const auto& fd : mTempFds) { + mozilla::DebugOnly rv = IGNORE_EINTR(close(fd)); + MOZ_ASSERT(rv == 0); + } +} + +} // namespace ipc +} // namespace mozilla diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/FileDescriptorShuffle.h firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/FileDescriptorShuffle.h --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/FileDescriptorShuffle.h 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/FileDescriptorShuffle.h 2018-06-20 17:29:12.000000000 +0000 @@ -0,0 +1,71 @@ +/* -*- 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 mozilla_ipc_FileDescriptorShuffle_h +#define mozilla_ipc_FileDescriptorShuffle_h + +#include "mozilla/Span.h" +#include "nsTArray.h" + +#include +#include + +// This class converts a set of file descriptor mapping, which may +// contain conflicts (like {a->b, b->c} or {a->b, b->a}) into a +// sequence of dup2() operations that can be performed between fork +// and exec, or with posix_spawn_file_actions_adddup2. It may create +// temporary duplicates of fds to use as the source of a dup2; they +// are closed on destruction. +// +// The dup2 sequence is guaranteed to not contain dup2(x, x) for any +// x; if such an element is present in the input, it will be dup2()ed +// from a temporary fd to ensure that the close-on-exec bit is cleared. +// +// In general, this is *not* guaranteed to minimize the use of +// temporary fds. + +namespace mozilla { +namespace ipc { + +class FileDescriptorShuffle +{ +public: + FileDescriptorShuffle() = default; + ~FileDescriptorShuffle(); + + using MappingRef = mozilla::Span>; + + // Translate the given mapping, creating temporary fds as needed. + // Can fail (return false) on failure to duplicate fds. + bool Init(MappingRef aMapping); + + // Accessor for the dup2() sequence. Do not use the returned value + // or the fds contained in it after this object is destroyed. + MappingRef Dup2Sequence() const { return mMapping; } + + // Tests whether the given fd is used as a destination in this mapping. + // Can be used to close other fds after performing the dup2()s. + bool MapsTo(int aFd) const; + + // Wraps MapsTo in a function object, as a convenience for use with + // base::CloseSuperfluousFds. + std::function MapsToFunc() const { + return [this](int fd) { return MapsTo(fd); }; + } + +private: + nsTArray> mMapping; + nsTArray mTempFds; + int mMaxDst; + + FileDescriptorShuffle(const FileDescriptorShuffle&) = delete; + void operator=(const FileDescriptorShuffle&) = delete; +}; + +} // namespace ipc +} // namespace mozilla + +#endif // mozilla_ipc_FileDescriptorShuffle_h diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/IPCStreamSource.cpp firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/IPCStreamSource.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/IPCStreamSource.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/IPCStreamSource.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "IPCStreamSource.h" +#include "BackgroundParent.h" // for AssertIsOnBackgroundThread #include "mozilla/webrender/WebRenderTypes.h" #include "nsIAsyncInputStream.h" #include "nsICancelableRunnable.h" @@ -13,8 +14,6 @@ #include "nsStreamUtils.h" #include "nsThreadUtils.h" -using mozilla::dom::WorkerPrivate; -using mozilla::dom::WorkerStatus; using mozilla::wr::ByteBuffer; namespace mozilla { @@ -42,7 +41,7 @@ // If this fails, then it means the owning thread is a Worker that has // been shutdown. Its ok to lose the event in this case because the - // IPCStreamChild listens for this event through the WorkerHolder. + // IPCStreamChild listens for this event through the WorkerRef. nsresult rv = mOwningEventTarget->Dispatch(this, nsIThread::DISPATCH_NORMAL); if (NS_FAILED(rv)) { NS_WARNING("Failed to dispatch stream readable event to owning thread"); @@ -66,7 +65,7 @@ { // Cancel() gets called when the Worker thread is being shutdown. We have // nothing to do here because IPCStreamChild handles this case via - // the WorkerHolder. + // the WorkerRef. return NS_OK; } @@ -102,9 +101,7 @@ nsICancelableRunnable); IPCStreamSource::IPCStreamSource(nsIAsyncInputStream* aInputStream) - : WorkerHolder("IPCStreamSource") - , mStream(aInputStream) - , mWorkerPrivate(nullptr) + : mStream(aInputStream) , mState(ePending) { MOZ_ASSERT(aInputStream); @@ -115,7 +112,7 @@ NS_ASSERT_OWNINGTHREAD(IPCStreamSource); MOZ_ASSERT(mState == eClosed); MOZ_ASSERT(!mCallback); - MOZ_ASSERT(!mWorkerPrivate); + MOZ_ASSERT(!mWorkerRef); } bool @@ -132,19 +129,20 @@ // A source can be used on any thread, but we only support IPCStream on // main thread, Workers and PBackground thread right now. This is due // to the requirement that the thread be guaranteed to live long enough to - // receive messages. We can enforce this guarantee with a WorkerHolder on + // receive messages. We can enforce this guarantee with a StrongWorkerRef on // worker threads, but not other threads. Main-thread and PBackground thread // do not need anything special in order to be kept alive. - WorkerPrivate* workerPrivate = nullptr; if (!NS_IsMainThread()) { - workerPrivate = mozilla::dom::GetCurrentThreadWorkerPrivate(); + mozilla::dom::WorkerPrivate* workerPrivate = + mozilla::dom::GetCurrentThreadWorkerPrivate(); if (workerPrivate) { - bool result = HoldWorker(workerPrivate, WorkerStatus::Canceling); - if (!result) { + RefPtr workerRef = + mozilla::dom::StrongWorkerRef::Create(workerPrivate, "IPCStreamSource"); + if (NS_WARN_IF(!workerRef)) { return false; } - mWorkerPrivate = workerPrivate; + mWorkerRef = std::move(workerRef); } else { AssertIsOnBackgroundThread(); } @@ -160,15 +158,6 @@ mState = eActorConstructed; } -bool -IPCStreamSource::Notify(WorkerStatus aStatus) -{ - NS_ASSERT_OWNINGTHREAD(IPCStreamSource); - - // Keep the worker thread alive until the stream is finished. - return true; -} - void IPCStreamSource::ActorDestroyed() { @@ -181,10 +170,7 @@ mCallback = nullptr; } - if (mWorkerPrivate) { - ReleaseWorker(); - mWorkerPrivate = nullptr; - } + mWorkerRef = nullptr; } void diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/IPCStreamSource.h firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/IPCStreamSource.h --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/IPCStreamSource.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/IPCStreamSource.h 2018-06-20 17:29:10.000000000 +0000 @@ -8,8 +8,7 @@ #define mozilla_ipc_IPCStreamSource_h #include "mozilla/AlreadyAddRefed.h" -#include "mozilla/dom/WorkerHolder.h" -#include "mozilla/dom/WorkerPrivate.h" +#include "mozilla/dom/WorkerRef.h" class nsIAsyncInputStream; @@ -28,6 +27,8 @@ class PBackgroundChild; class PBackgroundParent; +class PChildToParentStreamChild; +class PParentToChildStreamParent; // The IPCStream IPC actor is designed to push an nsIInputStream from child to // parent or parent to child incrementally. This is mainly needed for streams @@ -54,7 +55,7 @@ // // In general you should probably use the AutoIPCStreamSource RAII class // defined in InputStreamUtils.h instead of using IPCStreamSource directly. -class IPCStreamSource : public dom::WorkerHolder +class IPCStreamSource { public: // Create a IPCStreamSource using a PContent IPC manager on the @@ -121,10 +122,6 @@ private: class Callback; - // WorkerHolder methods - virtual bool - Notify(dom::WorkerStatus aStatus) override; - void DoRead(); void Wait(); @@ -134,10 +131,7 @@ nsCOMPtr mStream; RefPtr mCallback; - // Raw pointer because this IPCStreamSource keeps the worker alive using a - // WorkerHolder. The worker is kept alive when the actor is created and, - // released when the actor is destroyed. - dom::WorkerPrivate* mWorkerPrivate; + RefPtr mWorkerRef; #ifdef DEBUG protected: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/moz.build firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/moz.build --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/moz.build 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/moz.build 2018-06-20 17:29:10.000000000 +0000 @@ -126,6 +126,14 @@ 'ProcessUtils_none.cpp', ] +if CONFIG['OS_ARCH'] != 'WINNT': + EXPORTS.mozilla.ipc += [ + 'FileDescriptorShuffle.h', + ] + UNIFIED_SOURCES += [ + 'FileDescriptorShuffle.cpp', + ] + EXPORTS.ipc += [ 'IPCMessageUtils.h', ] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/ProtocolUtils.cpp firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/ProtocolUtils.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/ProtocolUtils.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/ProtocolUtils.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -671,12 +671,15 @@ return mProtocol->Manager()->GetActorEventTarget(aActor); } -IToplevelProtocol::IToplevelProtocol(const char* aName, ProtocolId aProtoId, Side aSide) - : IProtocol(aSide, MakeUnique(aName, this, aSide)), - mMonitor("mozilla.ipc.IToplevelProtocol.mMonitor"), - mProtocolId(aProtoId), - mOtherPid(mozilla::ipc::kInvalidProcessId), - mOtherPidState(ProcessIdState::eUnstarted) +IToplevelProtocol::IToplevelProtocol(const char* aName, + ProtocolId aProtoId, + Side aSide) + : IProtocol(aSide, MakeUnique(aName, this, aSide)) + , mMonitor("mozilla.ipc.IToplevelProtocol.mMonitor") + , mProtocolId(aProtoId) + , mOtherPid(mozilla::ipc::kInvalidProcessId) + , mOtherPidState(ProcessIdState::eUnstarted) + , mIsMainThreadProtocol(false) { } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/ProtocolUtils.h firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/ProtocolUtils.h --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/glue/ProtocolUtils.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/glue/ProtocolUtils.h 2018-06-20 17:29:12.000000000 +0000 @@ -805,7 +805,11 @@ Endpoint() : mValid(false) - {} + , mMode(static_cast(0)) + , mMyPid(0) + , mOtherPid(0) + { + } Endpoint(const PrivateIPDLInterface&, mozilla::ipc::Transport::Mode aMode, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/ipc/ipdl/ipdl.py firefox-trunk-62.0~a1~hg20180620r423058/ipc/ipdl/ipdl.py --- firefox-trunk-62.0~a1~hg20180611r422292/ipc/ipdl/ipdl.py 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/ipc/ipdl/ipdl.py 2018-06-20 17:29:10.000000000 +0000 @@ -107,10 +107,6 @@ print >>sys.stderr, 'Error: New sync IPC messages must be reviewed by an IPC peer and recorded in %s' % options.syncMsgList sys.exit(1) - if _verbosity > 2: - log(3, ' pretty printed code:') - ipdl.genipdl(ast, codedir) - if not ipdl.checkFixedSyncMessages(parser): # Errors have alraedy been printed to stderr, just exit sys.exit(1) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/public/Class.h firefox-trunk-62.0~a1~hg20180620r423058/js/public/Class.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/public/Class.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/public/Class.h 2018-06-20 17:29:10.000000000 +0000 @@ -132,16 +132,24 @@ Uninitialized = uintptr_t(-1) }; + static const uintptr_t SoftFailBit = uintptr_t(1) << (sizeof(uintptr_t) * 8 - 1); + ObjectOpResult() : code_(Uninitialized) {} - /* Return true if succeed() was called. */ + /* Return true if succeed() or failSoft() was called. */ bool ok() const { MOZ_ASSERT(code_ != Uninitialized); - return code_ == OkCode; + return code_ == OkCode || (code_ & SoftFailBit); } explicit operator bool() const { return ok(); } + /* Return true if succeed() was called. */ + bool reallyOk() const { + MOZ_ASSERT(code_ != Uninitialized); + return code_ == OkCode; + } + /* Set this ObjectOpResult to true and return true. */ bool succeed() { code_ = OkCode; @@ -161,10 +169,26 @@ */ bool fail(uint32_t msg) { MOZ_ASSERT(msg != OkCode); + MOZ_ASSERT((msg & SoftFailBit) == 0); code_ = msg; return true; } + /* + * DEPRECATED: This is a non-standard compatibility hack. + * + * Set this ObjectOpResult to true, but remembers an error code. + * This is used for situations where we really want to fail, + * but can't for legacy reasons. + * + * Always returns true, as a convenience. + */ + bool failSoft(uint32_t msg) { + // The msg code is currently never extracted again. + code_ = msg | SoftFailBit; + return true; + } + JS_PUBLIC_API(bool) failCantRedefineProp(); JS_PUBLIC_API(bool) failReadOnly(); JS_PUBLIC_API(bool) failGetterOnly(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/public/HeapAPI.h firefox-trunk-62.0~a1~hg20180620r423058/js/public/HeapAPI.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/public/HeapAPI.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/public/HeapAPI.h 2018-06-20 17:29:12.000000000 +0000 @@ -591,10 +591,10 @@ MOZ_ASSERT(thing); MOZ_ASSERT(!js::gc::IsInsideNursery(thing.asCell())); - // TODO: I'd like to assert !CurrentThreadIsHeapBusy() here but this gets + // TODO: I'd like to assert !RuntimeHeapIsBusy() here but this gets // called while we are tracing the heap, e.g. during memory reporting // (see bug 1313318). - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); JS::Zone* zone = JS::GetTenuredGCThingZone(thing); return JS::shadow::Zone::asShadowZone(zone)->needsIncrementalBarrier(); @@ -632,7 +632,7 @@ // This function does not handle updating nursery pointers. Raw JSObject // pointers should be updated separately or replaced with // JS::Heap which handles this automatically. - MOZ_ASSERT(!JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMinorCollecting()); if (IsInsideNursery(reinterpret_cast(*objp))) return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/public/Realm.h firefox-trunk-62.0~a1~hg20180620r423058/js/public/Realm.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/public/Realm.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/public/Realm.h 2018-06-20 17:29:12.000000000 +0000 @@ -4,12 +4,6 @@ * 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/. */ -/* - * Ways to get various per-Realm objects. All the getters declared in this - * header operate on the Realm corresponding to the current compartment on the - * JSContext. - */ - #ifndef js_Realm_h #define js_Realm_h @@ -114,6 +108,17 @@ extern JS_PUBLIC_API(JSObject*) GetRealmGlobalOrNull(Handle realm); +// Initialize standard JS class constructors, prototypes, and any top-level +// functions and constants associated with the standard classes (e.g. isNaN +// for Number). +extern JS_PUBLIC_API(bool) +InitRealmStandardClasses(JSContext* cx); + +/* + * Ways to get various per-Realm objects. All the getters declared below operate + * on the JSContext's current Realm. + */ + extern JS_PUBLIC_API(JSObject*) GetRealmObjectPrototype(JSContext* cx); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/public/Wrapper.h firefox-trunk-62.0~a1~hg20180620r423058/js/public/Wrapper.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/public/Wrapper.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/public/Wrapper.h 2018-06-20 17:29:12.000000000 +0000 @@ -143,7 +143,7 @@ static JSObject* Renew(JSObject* existing, JSObject* obj, const Wrapper* handler); - static const Wrapper* wrapperHandler(JSObject* wrapper); + static const Wrapper* wrapperHandler(const JSObject* wrapper); static JSObject* wrappedObject(JSObject* wrapper); @@ -335,7 +335,7 @@ TransparentObjectWrapper(JSContext* cx, HandleObject existing, HandleObject obj); inline bool -IsWrapper(JSObject* obj) +IsWrapper(const JSObject* obj) { return IsProxy(obj) && GetProxyHandler(obj)->family() == &Wrapper::family; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/rust/build.rs firefox-trunk-62.0~a1~hg20180620r423058/js/rust/build.rs --- firefox-trunk-62.0~a1~hg20180611r422292/js/rust/build.rs 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/rust/build.rs 2018-06-20 17:29:12.000000000 +0000 @@ -286,13 +286,9 @@ "JS::GCTraceKindToAscii", "js::GetArrayBufferLengthAndData", "js::GetArrayBufferViewLengthAndData", - "JS_GetErrorPrototype", "js::GetFunctionNativeReserved", - "JS_GetFunctionPrototype", "js::GetGlobalForObjectCrossCompartment", - "JS_GetIteratorPrototype", "js::GetObjectProto", - "JS_GetObjectPrototype", "JS_GetObjectRuntime", "JS_GetOwnPropertyDescriptorById", "JS::GetPromiseResult", @@ -349,6 +345,10 @@ "js::GetPropertyKeys", "JS_GetPrototype", "JS_GetReservedSlot", + "JS::GetRealmErrorPrototype", + "JS::GetRealmFunctionPrototype", + "JS::GetRealmIteratorPrototype", + "JS::GetRealmObjectPrototype", "JS::GetScriptedCallerGlobal", "JS_GetTwoByteStringCharsAndLength", "JS_GetUint16ArrayData", @@ -358,7 +358,7 @@ "JS::GetWellKnownSymbol", "JS_GlobalObjectTraceHook", "JS::HideScriptedCaller", - "JS_InitStandardClasses", + "JS::InitRealmStandardClasses", "JS_IsArrayObject", "JS_IsExceptionPending", "JS_IsGlobalObject", diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/rust/tests/rooting.rs firefox-trunk-62.0~a1~hg20180620r423058/js/rust/tests/rooting.rs --- firefox-trunk-62.0~a1~hg20180611r422292/js/rust/tests/rooting.rs 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/rust/tests/rooting.rs 2018-06-20 17:29:12.000000000 +0000 @@ -30,7 +30,7 @@ h_option, &c_option)); let _ac = js::ac::AutoCompartment::with_obj(cx, global.get()); - rooted!(in(cx) let prototype_proto = JS_GetObjectPrototype(cx, global.handle())); + rooted!(in(cx) let prototype_proto = JS::GetRealmObjectPrototype(cx)); rooted!(in(cx) let proto = JS_NewObjectWithUniqueType(cx, &CLASS as *const _, prototype_proto.handle())); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/rust/tests/vec_conversion.rs firefox-trunk-62.0~a1~hg20180620r423058/js/rust/tests/vec_conversion.rs --- firefox-trunk-62.0~a1~hg20180611r422292/js/rust/tests/vec_conversion.rs 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/rust/tests/vec_conversion.rs 2018-06-20 17:29:12.000000000 +0000 @@ -11,7 +11,7 @@ use js::conversions::FromJSValConvertible; use js::conversions::ToJSValConvertible; use js::jsapi::root::JS::RealmOptions; -use js::jsapi::root::JS_InitStandardClasses; +use js::jsapi::root::JS::InitRealmStandardClasses; use js::jsapi::root::JS_NewGlobalObject; use js::jsapi::root::JS::OnNewGlobalHookOption; use js::jsval::UndefinedValue; @@ -43,7 +43,7 @@ let global = global_root.handle(); let _ac = AutoCompartment::with_obj(cx, global.get()); - assert!(JS_InitStandardClasses(cx, global)); + assert!(InitRealmStandardClasses(cx)); rooted!(in(cx) let mut rval = UndefinedValue()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Array.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Array.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Array.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Array.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -3553,10 +3553,9 @@ /* ES7 additions */ JS_SELF_HOSTED_FN("includes", "ArrayIncludes", 2,0), -#ifdef NIGHTLY_BUILD + /* Future additions */ JS_SELF_HOSTED_FN("flatMap", "ArrayFlatMap", 1,0), JS_SELF_HOSTED_FN("flat", "ArrayFlat", 0,0), -#endif JS_FS_END }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/BigInt.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/BigInt.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/BigInt.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/BigInt.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -189,8 +189,9 @@ BigIntObject::properties }; +// The class is named "Object" as a workaround for bug 1277801. const Class BigIntObject::class_ = { - "BigInt", + "Object", JSCLASS_HAS_CACHED_PROTO(JSProto_BigInt) | JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS), JS_NULL_CLASS_OPS, diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Eval.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Eval.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Eval.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Eval.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -222,8 +222,7 @@ MOZ_ASSERT_IF(evalType == INDIRECT_EVAL, IsGlobalLexicalEnvironment(env)); AssertInnerizedEnvironmentChain(cx, *env); - Rooted envGlobal(cx, &env->global()); - if (!GlobalObject::isRuntimeCodeGenEnabled(cx, envGlobal)) { + if (!GlobalObject::isRuntimeCodeGenEnabled(cx, cx->global())) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_EVAL); return false; } @@ -325,8 +324,7 @@ { AssertInnerizedEnvironmentChain(cx, *env); - Rooted envGlobal(cx, &env->global()); - if (!GlobalObject::isRuntimeCodeGenEnabled(cx, envGlobal)) { + if (!GlobalObject::isRuntimeCodeGenEnabled(cx, cx->global())) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_EVAL); return false; } @@ -401,8 +399,7 @@ { CallArgs args = CallArgsFromVp(argc, vp); - Rooted global(cx, &args.callee().global()); - RootedObject globalLexical(cx, &global->lexicalEnvironment()); + RootedObject globalLexical(cx, &cx->global()->lexicalEnvironment()); // Note we'll just pass |undefined| here, then return it directly (or throw // if runtime codegen is disabled), if no argument is provided. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/intl/SharedIntlData.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/intl/SharedIntlData.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/intl/SharedIntlData.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/intl/SharedIntlData.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -403,7 +403,7 @@ js::intl::SharedIntlData::trace(JSTracer* trc) { // Atoms are always tenured. - if (!JS::CurrentThreadIsHeapMinorCollecting()) { + if (!JS::RuntimeHeapIsMinorCollecting()) { availableTimeZones.trace(trc); ianaZonesTreatedAsLinksByICU.trace(trc); ianaLinksCanonicalizedDifferentlyByICU.trace(trc); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/ModuleObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/ModuleObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/ModuleObject.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/ModuleObject.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -1490,14 +1490,21 @@ for (ParseNode* node = pn->pn_head; node; node = node->pn_next) { MOZ_ASSERT(node->isKind(ParseNodeKind::MutateProto) || node->isKind(ParseNodeKind::Colon) || - node->isKind(ParseNodeKind::Shorthand)); + node->isKind(ParseNodeKind::Shorthand) || + node->isKind(ParseNodeKind::Spread)); - ParseNode* target = node->isKind(ParseNodeKind::MutateProto) - ? node->pn_kid - : node->pn_right; + ParseNode* target; + if (node->isKind(ParseNodeKind::Spread)) { + target = node->pn_kid; + } else { + if (node->isKind(ParseNodeKind::MutateProto)) + target = node->pn_kid; + else + target = node->pn_right; - if (target->isKind(ParseNodeKind::Assign)) - target = target->pn_left; + if (target->isKind(ParseNodeKind::Assign)) + target = target->pn_left; + } if (!processExportBinding(target)) return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Object.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Object.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Object.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Object.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -474,11 +474,6 @@ case ESClass::RegExp: builtinTag.set(cx->names().objectRegExp); return true; -#ifdef ENABLE_BIGINT - case ESClass::BigInt: - builtinTag.set(cx->names().objectBigInt); - return true; -#endif default: if (obj->isCallable()) { // Non-standard: Prevent from showing up as Function. @@ -538,11 +533,6 @@ return cx->names().objectFunction; } -#ifdef ENABLE_BIGINT - if (obj->is()) - return cx->names().objectBigInt; -#endif - return nullptr; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Promise.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Promise.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Promise.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Promise.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -755,7 +755,7 @@ if (objectFromIncumbentGlobal) { objectFromIncumbentGlobal = CheckedUnwrap(objectFromIncumbentGlobal); MOZ_ASSERT(objectFromIncumbentGlobal); - global = &objectFromIncumbentGlobal->global(); + global = &objectFromIncumbentGlobal->nonCCWGlobal(); } // Note: the global we pass here might be from a different compartment @@ -1027,7 +1027,7 @@ // floor. RootedObject realReason(cx, UncheckedUnwrap(&reason.toObject())); RootedValue realReasonVal(cx, ObjectValue(*realReason)); - RootedObject realGlobal(cx, &realReason->global()); + RootedObject realGlobal(cx, &realReason->nonCCWGlobal()); ReportErrorToGlobal(cx, realGlobal, realReasonVal); // Async stacks are only properly adopted if there's at least one diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Reflect.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Reflect.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Reflect.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Reflect.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -42,7 +42,7 @@ ObjectOpResult result; if (!DeleteProperty(cx, target, key, result)) return false; - args.rval().setBoolean(bool(result)); + args.rval().setBoolean(result.reallyOk()); return true; } @@ -118,7 +118,7 @@ ObjectOpResult result; if (!PreventExtensions(cx, target, result)) return false; - args.rval().setBoolean(bool(result)); + args.rval().setBoolean(result.reallyOk()); return true; } @@ -147,7 +147,7 @@ RootedValue value(cx, args.get(2)); if (!SetProperty(cx, target, key, value, receiver, result)) return false; - args.rval().setBoolean(bool(result)); + args.rval().setBoolean(result.reallyOk()); return true; } @@ -180,7 +180,7 @@ ObjectOpResult result; if (!SetPrototype(cx, obj, proto, result)) return false; - args.rval().setBoolean(bool(result)); + args.rval().setBoolean(result.reallyOk()); return true; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/ReflectParse.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/ReflectParse.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/ReflectParse.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/ReflectParse.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -282,8 +282,7 @@ } if (!funv.isObject() || !funv.toObject().is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_NOT_FUNCTION, - JSDVG_SEARCH_STACK, funv, nullptr, nullptr, nullptr); + ReportValueError(cx, JSMSG_NOT_FUNCTION, JSDVG_SEARCH_STACK, funv, nullptr); return false; } @@ -3362,9 +3361,8 @@ if (!arg.isNullOrUndefined()) { if (!arg.isObject()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, arg, nullptr, - "not an object", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, arg, nullptr, + "not an object"); return false; } @@ -3414,9 +3412,8 @@ if (!prop.isNullOrUndefined()) { if (!prop.isObject()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, prop, nullptr, - "not an object", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, prop, nullptr, + "not an object"); return false; } builder = &prop.toObject(); @@ -3429,8 +3426,8 @@ return false; if (!prop.isString()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, - prop, nullptr, "not 'script' or 'module'", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, prop, nullptr, + "not 'script' or 'module'"); return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Stream.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Stream.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Stream.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Stream.cpp 2018-06-20 17:29:10.000000000 +0000 @@ -270,17 +270,15 @@ return PromiseObject::unforgeableReject(cx, exn); } -static bool -ReportArgTypeError(JSContext* cx, const char* funName, const char* expectedType, - HandleValue arg) +static void +ReportArgTypeError(JSContext* cx, const char* funName, const char* expectedType, HandleValue arg) { UniqueChars bytes = DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, arg, nullptr); if (!bytes) - return false; + return; - return JS_ReportErrorFlagsAndNumberLatin1(cx, JSREPORT_ERROR, GetErrorMessage, - nullptr, JSMSG_NOT_EXPECTED_TYPE, - funName, expectedType, bytes.get()); + JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE, funName, + expectedType, bytes.get()); } static MOZ_MUST_USE bool @@ -307,8 +305,8 @@ RejectNonGenericMethod(JSContext* cx, const CallArgs& args, const char* className, const char* methodName) { - ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), - nullptr, className, methodName); + ReportValueError(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), + nullptr, className, methodName); return ReturnPromiseRejectedWithPendingError(cx, args); } @@ -803,8 +801,8 @@ // Step 1: If ! IsReadableStream(this) is false, return a promise rejected // with a TypeError exception. if (!Is(args.thisv())) { - ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), - nullptr, "cancel", ""); + ReportValueError(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(), + nullptr, "cancel", ""); return ReturnPromiseRejectedWithPendingError(cx, args); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Symbol.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Symbol.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/Symbol.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/Symbol.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -150,8 +150,8 @@ // step 1 HandleValue arg = args.get(0); if (!arg.isSymbol()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, - arg, nullptr, "not a symbol", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, arg, nullptr, + "not a symbol"); return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/TestingFunctions.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/TestingFunctions.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/builtin/TestingFunctions.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/builtin/TestingFunctions.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -1304,9 +1304,8 @@ if (!ToNumber(cx, args[0], &maxDouble)) return false; if (mozilla::IsNaN(maxDouble) || maxDouble < 0 || maxDouble > UINT32_MAX) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[0], nullptr, - "not a valid maximum frame count", NULL); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[0], nullptr, + "not a valid maximum frame count"); return false; } uint32_t max = uint32_t(maxDouble); @@ -1317,9 +1316,8 @@ RootedObject compartmentObject(cx); if (args.length() >= 2) { if (!args[1].isObject()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[0], nullptr, - "not an object", NULL); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[0], nullptr, + "not an object"); return false; } compartmentObject = UncheckedUnwrap(&args[1].toObject()); @@ -2468,10 +2466,12 @@ return false; size_t length = strlen(inlineFrame.label.get()); - auto label = reinterpret_cast(inlineFrame.label.release()); + auto* label = reinterpret_cast(inlineFrame.label.release()); frameLabel = NewString(cx, label, length); - if (!frameLabel) + if (!frameLabel) { + js_free(label); return false; + } if (!JS_DefineProperty(cx, inlineFrameInfo, "label", frameLabel, propAttrs)) return false; @@ -2994,9 +2994,14 @@ } auto iter = data->Start(); data->ReadBytes(iter, buffer.get(), size); - JSObject* arrayBuffer = JS_NewArrayBufferWithContents(cx, size, buffer.release()); - if (!arrayBuffer) + + auto* rawBuffer = buffer.release(); + JSObject* arrayBuffer = JS_NewArrayBufferWithContents(cx, size, rawBuffer); + if (!arrayBuffer) { + js_free(rawBuffer); return false; + } + args.rval().setObject(*arrayBuffer); return true; } @@ -3593,16 +3598,14 @@ // test is all about object identity, and ToString doesn't preserve that. // Non-GCThing endpoints don't make much sense. if (!args[0].isObject() && !args[0].isString() && !args[0].isSymbol()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[0], nullptr, - "not an object, string, or symbol", NULL); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[0], nullptr, + "not an object, string, or symbol"); return false; } if (!args[1].isObject() && !args[1].isString() && !args[1].isSymbol()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[0], nullptr, - "not an object, string, or symbol", NULL); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[0], nullptr, + "not an object, string, or symbol"); return false; } @@ -3698,25 +3701,22 @@ // test is all about object identity, and ToString doesn't preserve that. // Non-GCThing endpoints don't make much sense. if (!args[0].isObject() && !args[0].isString() && !args[0].isSymbol()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[0], nullptr, - "not an object, string, or symbol", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[0], nullptr, + "not an object, string, or symbol"); return false; } if (!args[1].isObject() || !args[1].toObject().is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[1], nullptr, - "not an array object", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[1], nullptr, + "not an array object"); return false; } RootedArrayObject objs(cx, &args[1].toObject().as()); size_t length = objs->getDenseInitializedLength(); if (length == 0) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[1], nullptr, - "not a dense array object with one or more elements", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[1], nullptr, + "not a dense array object with one or more elements"); return false; } @@ -3732,9 +3732,8 @@ if (!JS::ToInt32(cx, args[2], &maxNumPaths)) return false; if (maxNumPaths <= 0) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, args[2], nullptr, - "not greater than 0", nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, args[2], nullptr, + "not greater than 0"); return false; } @@ -5178,7 +5177,7 @@ return true; } - obj = ToWindowProxyIfWindow(&obj->global()); + obj = ToWindowProxyIfWindow(&obj->nonCCWGlobal()); args.rval().setObject(*obj); return true; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/ctypes/CTypes.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/ctypes/CTypes.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/ctypes/CTypes.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/ctypes/CTypes.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -97,10 +97,8 @@ js::gc::AutoSuppressGC suppress(maybecx); char buffer[10]; SprintfLiteral(buffer, "0x%x", c); - JS_ReportErrorFlagsAndNumberASCII(maybecx, JSREPORT_ERROR, - GetErrorMessage, - nullptr, JSMSG_BAD_SURROGATE_CHAR, - buffer); + JS_ReportErrorNumberASCII(maybecx, GetErrorMessage, nullptr, JSMSG_BAD_SURROGATE_CHAR, + buffer); } return (size_t) -1; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/devtools/automation/autospider.py firefox-trunk-62.0~a1~hg20180620r423058/js/src/devtools/automation/autospider.py --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/devtools/automation/autospider.py 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/devtools/automation/autospider.py 2018-06-20 17:29:12.000000000 +0000 @@ -297,7 +297,7 @@ CONFIGURE_ARGS += ' --target=x86_64-pc-mingw32 --host=x86_64-pc-mingw32' if platform.system() == 'Linux' and AUTOMATION: - CONFIGURE_ARGS = '--enable-stdcxx-compat ' + CONFIGURE_ARGS + CONFIGURE_ARGS = '--enable-stdcxx-compat --disable-gold ' + CONFIGURE_ARGS # Timeouts. ACTIVE_PROCESSES = set() diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/devtools/rootAnalysis/annotations.js firefox-trunk-62.0~a1~hg20180620r423058/js/src/devtools/rootAnalysis/annotations.js --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/devtools/rootAnalysis/annotations.js 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/devtools/rootAnalysis/annotations.js 2018-06-20 17:29:12.000000000 +0000 @@ -322,19 +322,10 @@ function extraRootedPointers() { return [ - 'ModuleValidator', - 'JSErrorResult', - 'WrappableJSErrorResult', - // These are not actually rooted, but are only used in the context of // AutoKeepAtoms. 'js::frontend::TokenStream', 'js::frontend::TokenStreamAnyChars', - - 'mozilla::ErrorResult', - 'mozilla::IgnoredErrorResult', - 'mozilla::IgnoreErrors', - 'mozilla::dom::binding_detail::FastErrorResult', ]; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/ds/SplayTree.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/ds/SplayTree.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/ds/SplayTree.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/ds/SplayTree.h 2018-06-20 17:29:12.000000000 +0000 @@ -82,7 +82,7 @@ return false; Node* last = lookup(v); splay(last); - checkCoherency(root, nullptr); + checkCoherency(); if (C::compare(v, last->item) == 0) { *res = last->item; return true; @@ -112,7 +112,7 @@ element->parent = last; splay(element); - checkCoherency(root, nullptr); + checkCoherency(); return true; } @@ -157,7 +157,7 @@ root->item = swap->item; freeNode(swap); - checkCoherency(root, nullptr); + checkCoherency(); } template @@ -276,29 +276,76 @@ forEachInner(op, node->right); } - Node* checkCoherency(Node* node, Node* minimum) + void checkCoherency() const { #ifdef DEBUG if (!enableCheckCoherency) - return nullptr; - if (!node) { - MOZ_ASSERT(!root); - return nullptr; - } - MOZ_ASSERT_IF(!node->parent, node == root); - MOZ_ASSERT_IF(minimum, C::compare(minimum->item, node->item) < 0); - if (node->left) { - MOZ_ASSERT(node->left->parent == node); - Node* leftMaximum = checkCoherency(node->left, minimum); - MOZ_ASSERT(C::compare(leftMaximum->item, node->item) < 0); - } - if (node->right) { - MOZ_ASSERT(node->right->parent == node); - return checkCoherency(node->right, node); - } - return node; -#else - return nullptr; + return; + if (!root) + return; + MOZ_ASSERT(root->parent == nullptr); + const Node* node = root; + const Node* minimum = nullptr; + MOZ_ASSERT_IF(node->left, node->left->parent == node); + MOZ_ASSERT_IF(node->right, node->right->parent == node); + + + // This is doing a depth-first search and check that the values are + // ordered properly. + while (true) { + // Go to the left-most child. + while (node->left) { + MOZ_ASSERT_IF(node->left, node->left->parent == node); + MOZ_ASSERT_IF(node->right, node->right->parent == node); + node = node->left; + } + + MOZ_ASSERT_IF(minimum, C::compare(minimum->item, node->item) < 0); + minimum = node; + + if (node->right) { + // Go once to the right and try again. + MOZ_ASSERT_IF(node->left, node->left->parent == node); + MOZ_ASSERT_IF(node->right, node->right->parent == node); + node = node->right; + } else { + // We reached a leaf node, move to the first branch to the right of + // our current left-most sub-tree. + MOZ_ASSERT(!node->left && !node->right); + const Node* prev = nullptr; + + // Visit the parent node, to find the right branch which we have + // not visited yet. Either we are coming back from the right + // branch, or we are coming back from the left branch with no + // right branch to visit. + while (node->parent) { + prev = node; + node = node->parent; + + // If we came back from the left branch, visit the value. + if (node->left == prev) { + MOZ_ASSERT_IF(minimum, C::compare(minimum->item, node->item) < 0); + minimum = node; + } + + if (node->right != prev && node->right != nullptr) + break; + } + + if (!node->parent) { + MOZ_ASSERT(node == root); + // We reached the root node either because we came back from + // the right hand side, or because the root node had a + // single child. + if (node->right == prev || node->right == nullptr) + return; + } + + // Go to the right node which we have not visited yet. + MOZ_ASSERT(node->right != prev && node->right != nullptr); + node = node->right; + } + } #endif } }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/Parser.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/Parser.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/Parser.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/Parser.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -23,6 +23,7 @@ #include "mozilla/Sprintf.h" #include "mozilla/TypeTraits.h" +#include #include #include "jsapi.h" @@ -1766,7 +1767,7 @@ NewEmptyBindingData(JSContext* cx, LifoAlloc& alloc, uint32_t numBindings) { using Data = typename Scope::Data; - size_t allocSize = Scope::sizeOfData(numBindings); + size_t allocSize = SizeOfData(numBindings); auto* bindings = alloc.allocInSize(allocSize, numBindings); if (!bindings) ReportOutOfMemory(cx); @@ -1780,9 +1781,7 @@ static MOZ_MUST_USE BindingName* FreshlyInitializeBindings(BindingName* cursor, const Vector& bindings) { - for (const BindingName& binding : bindings) - new (cursor++) BindingName(binding); - return cursor; + return std::uninitialized_copy(bindings.begin(), bindings.end(), cursor); } Maybe @@ -5440,14 +5439,21 @@ for (ParseNode* node = pn->pn_head; node; node = node->pn_next) { MOZ_ASSERT(node->isKind(ParseNodeKind::MutateProto) || node->isKind(ParseNodeKind::Colon) || - node->isKind(ParseNodeKind::Shorthand)); + node->isKind(ParseNodeKind::Shorthand) || + node->isKind(ParseNodeKind::Spread)); - ParseNode* target = node->isKind(ParseNodeKind::MutateProto) - ? node->pn_kid - : node->pn_right; + ParseNode* target; + if (node->isKind(ParseNodeKind::Spread)) { + target = node->pn_kid; + } else { + if (node->isKind(ParseNodeKind::MutateProto)) + target = node->pn_kid; + else + target = node->pn_right; - if (target->isKind(ParseNodeKind::Assign)) - target = target->pn_left; + if (target->isKind(ParseNodeKind::Assign)) + target = target->pn_left; + } if (!checkExportedNamesForDeclaration(target)) return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/TokenStream.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/TokenStream.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/TokenStream.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/TokenStream.cpp 2018-06-20 17:29:11.000000000 +0000 @@ -9,7 +9,9 @@ #include "frontend/TokenStream.h" #include "mozilla/ArrayUtils.h" +#include "mozilla/Attributes.h" #include "mozilla/IntegerTypeTraits.h" +#include "mozilla/Likely.h" #include "mozilla/MemoryChecking.h" #include "mozilla/PodOperations.h" #include "mozilla/ScopeExit.h" @@ -37,6 +39,7 @@ #include "vm/Realm.h" using mozilla::ArrayLength; +using mozilla::AssertedCast; using mozilla::IsAscii; using mozilla::IsAsciiAlpha; using mozilla::IsAsciiDigit; @@ -498,7 +501,7 @@ { TokenStreamAnyChars& anyChars = anyCharsAccess(); - if (MOZ_UNLIKELY(!sourceUnits.hasRawChars())) { + if (MOZ_UNLIKELY(sourceUnits.atEnd())) { anyChars.flags.isEOF = true; *cp = EOF; return true; @@ -513,7 +516,7 @@ if (MOZ_UNLIKELY(c == '\r')) { // If it's a \r\n sequence: treat as a single EOL, skip over the \n. - if (MOZ_LIKELY(sourceUnits.hasRawChars())) + if (MOZ_LIKELY(!sourceUnits.atEnd())) sourceUnits.matchCodeUnit('\n'); break; @@ -545,8 +548,13 @@ // The code point is usually |lead|: overwrite later if needed. *codePoint = lead; - // Dispense with single-unit code points ("code points", when a lone - // trailing surrogate is encountered). + // ECMAScript specifically requires that unpaired UTF-16 surrogates be + // treated as the corresponding code point and not as an error. See + // . + // Thus this function does not consider any sequence of 16-bit numbers to + // be intrinsically in error. + + // Dispense with single-unit code points and lone trailing surrogates. if (MOZ_LIKELY(!unicode::IsLeadSurrogate(lead))) { if (MOZ_UNLIKELY(lead == unicode::LINE_SEPARATOR || lead == unicode::PARA_SEPARATOR)) @@ -567,9 +575,8 @@ return true; } - // If there are no more units, or the next unit isn't a trailing surrogate, - // it's also a "code point". - if (MOZ_UNLIKELY(!sourceUnits.hasRawChars() || + // Also handle a lead surrogate not paired with a trailing surrogate. + if (MOZ_UNLIKELY(sourceUnits.atEnd() || !unicode::IsTrailSurrogate(sourceUnits.peekCodeUnit()))) { MOZ_ASSERT(!SourceUnits::isRawEOLChar(*codePoint)); @@ -582,26 +589,6 @@ return true; } -// This gets the next code unit -- the next numeric sub-unit of source text, -// possibly smaller than a full code point. It is simple and stupid, and it -// doesn't understand EOL, update line counters, or anything like that. If you -// use it to consume an EOL sequence, line counters *will not* be correct for -// subsequent code. -// -// Only use this if (a) the resulting code unit is guaranteed to be ungotten -// (by ungetCodeUnit()) if it's an EOL, and (b) the line-related state (lineno, -// linebase) is not used before it's ungotten. -template -int32_t -GeneralTokenStreamChars::getCodeUnit() -{ - if (MOZ_LIKELY(sourceUnits.hasRawChars())) - return sourceUnits.getCodeUnit(); - - anyCharsAccess().flags.isEOF = true; - return EOF; -} - template void GeneralTokenStreamChars::ungetChar(int32_t c) @@ -624,16 +611,6 @@ } } -template -void -TokenStreamCharsBase::ungetCodeUnit(int32_t c) -{ - if (c == EOF) - return; - - sourceUnits.ungetCodeUnit(); -} - template void TokenStreamChars::ungetCodePointIgnoreEOL(uint32_t codePoint) @@ -665,29 +642,6 @@ anyCharsAccess().undoInternalUpdateLineInfoForEOL(); } -// Return true iff |n| raw characters can be read from this without reading past -// EOF, and copy those characters into |cp| if so. The characters are not -// consumed: use skipChars(n) to do so after checking that the consumed -// characters had appropriate values. -template -bool -TokenStreamSpecific::peekChars(int n, CharT* cp) -{ - int i; - for (i = 0; i < n; i++) { - int32_t c = getCodeUnit(); - if (c == EOF) - break; - - cp[i] = char16_t(c); - } - - for (int j = i - 1; j >= 0; j--) - ungetCodeUnit(cp[j]); - - return i == n; -} - template size_t SourceUnits::findEOLMax(size_t start, size_t max) @@ -1070,97 +1024,110 @@ // cases, do not advance along the buffer. template uint32_t -TokenStreamSpecific::peekUnicodeEscape(uint32_t* codePoint) +GeneralTokenStreamChars::matchUnicodeEscape(uint32_t* codePoint) { - int32_t c = getCodeUnit(); - if (c != 'u') { - ungetCodeUnit(c); + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); + + int32_t unit = getCodeUnit(); + if (unit != 'u') { + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); return 0; } CharT cp[3]; - uint32_t length; - c = getCodeUnit(); - if (JS7_ISHEX(c) && peekChars(3, cp) && + unit = getCodeUnit(); + if (JS7_ISHEX(unit) && + sourceUnits.peekCodeUnits(3, cp) && JS7_ISHEX(cp[0]) && JS7_ISHEX(cp[1]) && JS7_ISHEX(cp[2])) { - *codePoint = (JS7_UNHEX(c) << 12) | + *codePoint = (JS7_UNHEX(unit) << 12) | (JS7_UNHEX(cp[0]) << 8) | (JS7_UNHEX(cp[1]) << 4) | JS7_UNHEX(cp[2]); - length = 5; - } else if (c == '{') { - length = peekExtendedUnicodeEscape(codePoint); - } else { - length = 0; + sourceUnits.skipCodeUnits(3); + return 5; } - ungetCodeUnit(c); + if (unit == '{') + return matchExtendedUnicodeEscape(codePoint); + + // NOTE: |unit| may be EOF here, so this ungets either one or two units. + ungetCodeUnit(unit); ungetCodeUnit('u'); - return length; + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); + return 0; } template uint32_t -TokenStreamSpecific::peekExtendedUnicodeEscape(uint32_t* codePoint) +GeneralTokenStreamChars::matchExtendedUnicodeEscape(uint32_t* codePoint) { - // The opening brace character was already read. - int32_t c = getCodeUnit(); + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '{'); - // Skip leading zeros. - uint32_t leadingZeros = 0; - while (c == '0') { - leadingZeros++; - c = getCodeUnit(); + int32_t unit = getCodeUnit(); + + // Skip leading zeroes. + uint32_t leadingZeroes = 0; + while (unit == '0') { + leadingZeroes++; + unit = getCodeUnit(); } - CharT cp[6]; size_t i = 0; uint32_t code = 0; - while (JS7_ISHEX(c) && i < 6) { - cp[i++] = c; - code = code << 4 | JS7_UNHEX(c); - c = getCodeUnit(); + while (JS7_ISHEX(unit) && i < 6) { + code = (code << 4) | JS7_UNHEX(unit); + unit = getCodeUnit(); + i++; } - uint32_t length; - if (c == '}' && (leadingZeros > 0 || i > 0) && code <= unicode::NonBMPMax) { + uint32_t gotten = + 2 + // 'u{' + leadingZeroes + + i + // significant hexdigits + (unit != EOF); // subtract a get if it didn't contribute to length + + if (unit == '}' && (leadingZeroes > 0 || i > 0) && code <= unicode::NonBMPMax) { *codePoint = code; - length = leadingZeros + i + 3; - } else { - length = 0; + return gotten; } - ungetCodeUnit(c); - while (i--) - ungetCodeUnit(cp[i]); - while (leadingZeros--) - ungetCodeUnit('0'); - - return length; + sourceUnits.unskipCodeUnits(gotten); + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); + return 0; } template uint32_t -TokenStreamSpecific::matchUnicodeEscapeIdStart(uint32_t* codePoint) +GeneralTokenStreamChars::matchUnicodeEscapeIdStart(uint32_t* codePoint) { - uint32_t length = peekUnicodeEscape(codePoint); - if (length > 0 && unicode::IsIdentifierStart(*codePoint)) { - skipChars(length); - return length; + uint32_t length = matchUnicodeEscape(codePoint); + if (MOZ_LIKELY(length > 0)) { + if (MOZ_LIKELY(unicode::IsIdentifierStart(*codePoint))) + return length; + + sourceUnits.unskipCodeUnits(length); } + + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); return 0; } template bool -TokenStreamSpecific::matchUnicodeEscapeIdent(uint32_t* codePoint) +GeneralTokenStreamChars::matchUnicodeEscapeIdent(uint32_t* codePoint) { - uint32_t length = peekUnicodeEscape(codePoint); - if (length > 0 && unicode::IsIdentifierPart(*codePoint)) { - skipChars(length); - return true; + uint32_t length = matchUnicodeEscape(codePoint); + if (MOZ_LIKELY(length > 0)) { + if (MOZ_LIKELY(unicode::IsIdentifierPart(*codePoint))) + return true; + + sourceUnits.unskipCodeUnits(length); } + + MOZ_ASSERT(sourceUnits.previousCodeUnit() == '\\'); return false; } @@ -1229,7 +1196,7 @@ // If there aren't enough characters left, it can't be the desired // directive. - if (!peekChars(directiveLength, peeked)) + if (!sourceUnits.peekCodeUnits(directiveLength, peeked)) return true; // It's also not the desired directive if the characters don't match. @@ -1241,35 +1208,50 @@ return false; } - skipChars(directiveLength); + sourceUnits.skipCodeUnits(directiveLength); tokenbuf.clear(); do { - int32_t c; - if (!peekChar(&c)) - return false; - - if (c == EOF || unicode::IsSpaceOrBOM2(c)) + int32_t unit = peekCodeUnit(); + if (unit == EOF) break; - consumeKnownChar(c); + if (MOZ_LIKELY(isAsciiCodePoint(unit))) { + if (unicode::IsSpaceOrBOM2(unit)) + break; + + consumeKnownCodeUnit(unit); + + // Debugging directives can occur in both single- and multi-line + // comments. If we're currently inside a multi-line comment, we + // also must recognize multi-line comment terminators. + if (isMultiline && unit == '*' && peekCodeUnit() == '/') { + ungetCodeUnit('*'); + break; + } + + if (!tokenbuf.append(unit)) + return false; + + continue; + } + + int32_t codePoint; + if (!getCodePoint(&codePoint)) + return false; - // Debugging directives can occur in both single- and multi-line - // comments. If we're currently inside a multi-line comment, we also - // need to recognize multi-line comment terminators. - if (isMultiline && c == '*' && matchCodeUnit('/')) { - ungetCodeUnit('/'); - ungetCodeUnit('*'); + if (unicode::IsSpaceOrBOM2(codePoint)) { + ungetNonAsciiNormalizedCodePoint(codePoint); break; } - if (!tokenbuf.append(c)) + if (!appendCodePointToTokenbuf(codePoint)) return false; } while (true); if (tokenbuf.empty()) { - // The directive's URL was missing, but this is not quite an - // exception that we should stop and drop everything for. + // The directive's URL was missing, but comments can contain anything, + // so it isn't an error. return true; } @@ -1373,24 +1355,6 @@ return tokenbuf.append(units[1]); } -template -void -TokenStreamChars::matchMultiUnitCodePointSlow(char16_t lead, - uint32_t* codePoint) -{ - MOZ_ASSERT(unicode::IsLeadSurrogate(lead), - "matchMultiUnitCodepoint should have ensured |lead| is a lead " - "surrogate"); - - int32_t maybeTrail = getCodeUnit(); - if (MOZ_LIKELY(unicode::IsTrailSurrogate(maybeTrail))) { - *codePoint = unicode::UTF16Decode(lead, maybeTrail); - } else { - ungetCodeUnit(maybeTrail); - *codePoint = 0; - } -} - template bool TokenStreamSpecific::putIdentInTokenbuf(const CharT* identStart) @@ -1404,27 +1368,46 @@ }); tokenbuf.clear(); - for (;;) { - int32_t c = getCodeUnit(); + do { + int32_t unit = getCodeUnit(); + if (unit == EOF) + break; uint32_t codePoint; - if (!matchMultiUnitCodePoint(c, &codePoint)) - return false; - if (codePoint) { - if (!unicode::IsIdentifierPart(codePoint)) + if (MOZ_LIKELY(isAsciiCodePoint(unit))) { + if (MOZ_LIKELY(unicode::IsIdentifierPart(char16_t(unit)))) { + if (!tokenbuf.append(unit)) + return false; + + continue; + } + + if (unit != '\\' || !matchUnicodeEscapeIdent(&codePoint)) break; } else { - if (unicode::IsIdentifierPart(char16_t(c))) { - codePoint = c; - } else { - if (c != '\\' || !matchUnicodeEscapeIdent(&codePoint)) - break; + int32_t cp; + if (!getNonAsciiCodePoint(unit, &cp)) + return false; + + codePoint = AssertedCast(cp); + } + + if (!unicode::IsIdentifierPart(codePoint)) { + if (MOZ_UNLIKELY(codePoint == unicode::LINE_SEPARATOR || + codePoint == unicode::PARA_SEPARATOR)) + { + // |restoreNextRawCharAddress| undoes all gets, but it doesn't + // revert line/column updates. The ASCII code path never + // updates line/column state, so only Unicode separators gotten + // by |getNonAsciiCodePoint| require this. + anyCharsAccess().undoInternalUpdateLineInfoForEOL(); } + break; } if (!appendCodePointToTokenbuf(codePoint)) return false; - } + } while (true); return true; } @@ -1442,30 +1425,38 @@ this->badToken(); }); - int c; + // We've already consumed an initial code point in the identifer, to *know* + // that this is an identifier. So no need to worry about not consuming any + // code points in the loop below. + int32_t unit; while (true) { - c = getCodeUnit(); - if (c == EOF) + unit = getCodeUnit(); + if (unit == EOF) break; - uint32_t codePoint; - if (!matchMultiUnitCodePoint(c, &codePoint)) - return false; - if (codePoint) { - if (!unicode::IsIdentifierPart(codePoint)) - break; + if (MOZ_LIKELY(isAsciiCodePoint(unit))) { + if (MOZ_UNLIKELY(!unicode::IsIdentifierPart(static_cast(unit)))) { + // Handle a Unicode escape -- otherwise it's not part of the + // identifier. + uint32_t codePoint; + if (unit != '\\' || !matchUnicodeEscapeIdent(&codePoint)) { + ungetCodeUnit(unit); + break; + } - continue; - } + escaping = IdentifierEscapes::SawUnicodeEscape; + } + } else { + int32_t codePoint; + if (!getNonAsciiCodePoint(unit, &codePoint)) + return false; - if (!unicode::IsIdentifierPart(char16_t(c))) { - uint32_t qc; - if (c != '\\' || !matchUnicodeEscapeIdent(&qc)) + if (!unicode::IsIdentifierPart(uint32_t(codePoint))) { + ungetNonAsciiNormalizedCodePoint(codePoint); break; - escaping = IdentifierEscapes::SawUnicodeEscape; + } } } - ungetCodeUnit(c); const CharT* chars; size_t length; @@ -1596,7 +1587,7 @@ template MOZ_MUST_USE bool -TokenStreamSpecific::decimalNumber(int c, TokenStart start, +TokenStreamSpecific::decimalNumber(int32_t unit, TokenStart start, const CharT* numStart, Modifier modifier, TokenKind* out) { @@ -1607,14 +1598,15 @@ }); // Consume integral component digits. - while (IsAsciiDigit(c)) - c = getCodeUnit(); + while (IsAsciiDigit(unit)) + unit = getCodeUnit(); // Numbers contain no escapes, so we can read directly from |sourceUnits|. double dval; DecimalPoint decimalPoint = NoDecimal; - if (c != '.' && c != 'e' && c != 'E') { - ungetCodeUnit(c); + if (unit != '.' && unit != 'e' && unit != 'E') { + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); // Most numbers are pure decimal integers without fractional component // or exponential notation. Handle that with optimized code. @@ -1625,33 +1617,33 @@ } } else { // Consume any decimal dot and fractional component. - if (c == '.') { + if (unit == '.') { decimalPoint = HasDecimal; do { - c = getCodeUnit(); - } while (IsAsciiDigit(c)); + unit = getCodeUnit(); + } while (IsAsciiDigit(unit)); } // Consume any exponential notation. - if (c == 'e' || c == 'E') { - c = getCodeUnit(); - if (c == '+' || c == '-') - c = getCodeUnit(); + if (unit == 'e' || unit == 'E') { + unit = getCodeUnit(); + if (unit == '+' || unit == '-') + unit = getCodeUnit(); // Exponential notation must contain at least one digit. - if (!IsAsciiDigit(c)) { - ungetCodeUnit(c); + if (!IsAsciiDigit(unit)) { + ungetCodeUnit(unit); error(JSMSG_MISSING_EXPONENT); return false; } // Consume exponential digits. do { - c = getCodeUnit(); - } while (IsAsciiDigit(c)); + unit = getCodeUnit(); + } while (IsAsciiDigit(unit)); } - ungetCodeUnit(c); + ungetCodeUnit(unit); const CharT* dummy; if (!js_strtod(anyCharsAccess().cx, numStart, sourceUnits.addressOfNextCodeUnit(), &dummy, @@ -1664,31 +1656,23 @@ // Number followed by IdentifierStart is an error. (This is the only place // in ECMAScript where token boundary is inadequate to properly separate // two tokens, necessitating this unaesthetic lookahead.) - if (c != EOF) { - if (unicode::IsIdentifierStart(char16_t(c))) { - error(JSMSG_IDSTART_AFTER_NUMBER); - return false; - } - - consumeKnownCharIgnoreEOL(c); - - uint32_t codePoint; - if (!matchMultiUnitCodePoint(c, &codePoint)) - return false; + if (unit != EOF) { + if (MOZ_LIKELY(isAsciiCodePoint(unit))) { + if (unicode::IsIdentifierStart(char16_t(unit))) { + error(JSMSG_IDSTART_AFTER_NUMBER); + return false; + } + } else { + int32_t codePoint; + if (!getCodePoint(&codePoint)) + return false; - if (codePoint) { - // In all cases revert the get of the overall code point. - ungetCodePointIgnoreEOL(codePoint); + ungetNonAsciiNormalizedCodePoint(codePoint); - if (unicode::IsIdentifierStart(codePoint)) { - // This will properly point at the start of the code point. + if (unicode::IsIdentifierStart(uint32_t(codePoint))) { error(JSMSG_IDSTART_AFTER_NUMBER); return false; } - } else { - // If not a multi-unit code point, we only need to unget the single - // code unit consumed. - ungetCodeUnit(c); } } @@ -1826,23 +1810,31 @@ // This loop runs more than once only when whitespace or comments are // encountered. do { - if (MOZ_UNLIKELY(!sourceUnits.hasRawChars())) { + int32_t unit = getCodeUnit(); + if (MOZ_UNLIKELY(unit == EOF)) { + MOZ_ASSERT(sourceUnits.atEnd()); anyCharsAccess().flags.isEOF = true; TokenStart start(sourceUnits, 0); newSimpleToken(TokenKind::Eof, start, modifier, ttp); return true; } - int c = sourceUnits.getCodeUnit(); - MOZ_ASSERT(c != EOF); + if (MOZ_UNLIKELY(!isAsciiCodePoint(unit))) { + // Non-ASCII code points can only be identifiers or whitespace. + // It would be nice to compute these *after* discarding whitespace, + // but IN A WORLD where |unicode::IsSpaceOrBOM2| requires consuming + // a variable number of code points, it's easier to assume it's an + // identifier and maybe do a little wasted work, than to unget and + // compute and reget if whitespace. + TokenStart start(sourceUnits, -1); + const CharT* identStart = sourceUnits.addressOfNextCodeUnit() - 1; + + int32_t codePoint; + if (!getNonAsciiCodePoint(unit, &codePoint)) + return badToken(); - // Chars not in the range 0..127 are rare. Getting them out of the way - // early allows subsequent checking to be faster. - if (MOZ_UNLIKELY(c >= 128)) { - if (unicode::IsSpaceOrBOM2(c)) { - if (c == unicode::LINE_SEPARATOR || - c == unicode::PARA_SEPARATOR) - { + if (unicode::IsSpaceOrBOM2(codePoint)) { + if (codePoint == unicode::LINE_SEPARATOR || codePoint == unicode::PARA_SEPARATOR) { if (!updateLineInfoForEOL()) return badToken(); @@ -1852,33 +1844,22 @@ continue; } - // If there's an identifier here (and no error occurs), it starts - // at the previous code unit. - TokenStart start(sourceUnits, -1); - const CharT* identStart = sourceUnits.addressOfNextCodeUnit() - 1; - - static_assert('$' < 128, + static_assert(isAsciiCodePoint('$'), "IdentifierStart contains '$', but as " "!IsUnicodeIDStart('$'), ensure that '$' is never " "handled here"); - static_assert('_' < 128, + static_assert(isAsciiCodePoint('_'), "IdentifierStart contains '_', but as " "!IsUnicodeIDStart('_'), ensure that '_' is never " "handled here"); - if (unicode::IsUnicodeIDStart(char16_t(c))) - return identifierName(start, identStart, IdentifierEscapes::None, modifier, ttp); - uint32_t codePoint = c; - if (!matchMultiUnitCodePoint(c, &codePoint)) - return badToken(); - - if (codePoint && unicode::IsUnicodeIDStart(codePoint)) + if (unicode::IsUnicodeIDStart(uint32_t(codePoint))) return identifierName(start, identStart, IdentifierEscapes::None, modifier, ttp); ungetCodePointIgnoreEOL(codePoint); error(JSMSG_ILLEGAL_CHARACTER); return badToken(); - } + } // !isAsciiCodePoint(unit) // Get the token kind, based on the first char. The ordering of c1kind // comparison is based on the frequency of tokens in real code: @@ -1899,7 +1880,7 @@ // frequencies used to break close categories (e.g. |Dec| and // |String|). |Other| is biggish, but no other token kind is common // enough for it to be worth adding extra values to FirstCharKind. - FirstCharKind c1kind = FirstCharKind(firstCharKinds[c]); + FirstCharKind c1kind = FirstCharKind(firstCharKinds[unit]); // Look for an unambiguous single-char token. // @@ -1927,19 +1908,19 @@ if (c1kind == Dec) { TokenStart start(sourceUnits, -1); const CharT* numStart = sourceUnits.addressOfNextCodeUnit() - 1; - return decimalNumber(c, start, numStart, modifier, ttp); + return decimalNumber(unit, start, numStart, modifier, ttp); } // Look for a string or a template string. // if (c1kind == String) - return getStringOrTemplateToken(static_cast(c), modifier, ttp); + return getStringOrTemplateToken(static_cast(unit), modifier, ttp); // Skip over EOL chars, updating line state along the way. // if (c1kind == EOL) { // If it's a \r\n sequence, consume it as a single EOL. - if (c == '\r' && sourceUnits.hasRawChars()) + if (unit == '\r' && !sourceUnits.atEnd()) sourceUnits.matchCodeUnit('\n'); if (!updateLineInfoForEOL()) @@ -1958,50 +1939,53 @@ int radix; const CharT* numStart; - c = getCodeUnit(); - if (c == 'x' || c == 'X') { + unit = getCodeUnit(); + if (unit == 'x' || unit == 'X') { radix = 16; - c = getCodeUnit(); - if (!JS7_ISHEX(c)) { - ungetCodeUnit(c); - reportError(JSMSG_MISSING_HEXDIGITS); + unit = getCodeUnit(); + if (!JS7_ISHEX(unit)) { + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); + error(JSMSG_MISSING_HEXDIGITS); return badToken(); } // one past the '0x' numStart = sourceUnits.addressOfNextCodeUnit() - 1; - while (JS7_ISHEX(c)) - c = getCodeUnit(); - } else if (c == 'b' || c == 'B') { + while (JS7_ISHEX(unit)) + unit = getCodeUnit(); + } else if (unit == 'b' || unit == 'B') { radix = 2; - c = getCodeUnit(); - if (c != '0' && c != '1') { - ungetCodeUnit(c); - reportError(JSMSG_MISSING_BINARY_DIGITS); + unit = getCodeUnit(); + if (unit != '0' && unit != '1') { + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); + error(JSMSG_MISSING_BINARY_DIGITS); return badToken(); } // one past the '0b' numStart = sourceUnits.addressOfNextCodeUnit() - 1; - while (c == '0' || c == '1') - c = getCodeUnit(); - } else if (c == 'o' || c == 'O') { + while (unit == '0' || unit == '1') + unit = getCodeUnit(); + } else if (unit == 'o' || unit == 'O') { radix = 8; - c = getCodeUnit(); - if (c < '0' || c > '7') { - ungetCodeUnit(c); - reportError(JSMSG_MISSING_OCTAL_DIGITS); + unit = getCodeUnit(); + if (!JS7_ISOCT(unit)) { + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); + error(JSMSG_MISSING_OCTAL_DIGITS); return badToken(); } // one past the '0o' numStart = sourceUnits.addressOfNextCodeUnit() - 1; - while ('0' <= c && c <= '7') - c = getCodeUnit(); - } else if (IsAsciiDigit(c)) { + while (JS7_ISOCT(unit)) + unit = getCodeUnit(); + } else if (IsAsciiDigit(unit)) { radix = 8; // one past the '0' numStart = sourceUnits.addressOfNextCodeUnit() - 1; @@ -2016,50 +2000,52 @@ // numbers, which makes our behaviour a superset of the // ECMA numeric grammar. We might not always be so // permissive, so we warn about it. - if (c >= '8') { - if (!warning(JSMSG_BAD_OCTAL, c == '8' ? "08" : "09")) + if (unit >= '8') { + if (!warning(JSMSG_BAD_OCTAL, unit == '8' ? "08" : "09")) return badToken(); // Use the decimal scanner for the rest of the number. - return decimalNumber(c, start, numStart, modifier, ttp); + return decimalNumber(unit, start, numStart, modifier, ttp); } - c = getCodeUnit(); - } while (IsAsciiDigit(c)); + unit = getCodeUnit(); + } while (IsAsciiDigit(unit)); } else { // '0' not followed by [XxBbOo0-9]; scan as a decimal number. numStart = sourceUnits.addressOfNextCodeUnit() - 1; - return decimalNumber(c, start, numStart, modifier, ttp); - } - ungetCodeUnit(c); + // NOTE: |unit| may be EOF here. (This is permitted by case #3 + // in TokenStream.h docs for this function.) + return decimalNumber(unit, start, numStart, modifier, ttp); + } + + // Check for an identifier-start code point immediately after the + // number. This must be an error, and somewhat surprisingly, if + // a check doesn't happen here, it never will. + if (MOZ_UNLIKELY(unit == EOF)) { + // Technically this isn't necessary -- ungetting EOF does + // nothing -- but it's conceptually nicer if we consider all + // gets requiring an unget to revert them. + ungetCodeUnit(unit); + } else if (MOZ_LIKELY(isAsciiCodePoint(unit))) { + ungetCodeUnit(unit); - if (c != EOF) { - if (unicode::IsIdentifierStart(char16_t(c))) { + if (unicode::IsIdentifierStart(char16_t(unit))) { error(JSMSG_IDSTART_AFTER_NUMBER); return badToken(); } + } else { + int32_t codePoint; + if (!getNonAsciiCodePoint(unit, &codePoint)) + return badToken(); - consumeKnownCharIgnoreEOL(c); + ungetCodePointIgnoreEOL(codePoint); + if (codePoint == unicode::LINE_SEPARATOR || codePoint == unicode::PARA_SEPARATOR) + anyCharsAccess().undoInternalUpdateLineInfoForEOL(); - uint32_t codePoint; - if (!matchMultiUnitCodePoint(c, &codePoint)) + if (unicode::IsIdentifierStart(uint32_t(codePoint))) { + error(JSMSG_IDSTART_AFTER_NUMBER); return badToken(); - - if (codePoint) { - // In all cases revert the get of the overall code point. - ungetCodePointIgnoreEOL(codePoint); - - if (unicode::IsIdentifierStart(codePoint)) { - // This will properly point at the start of the code - // point. - error(JSMSG_IDSTART_AFTER_NUMBER); - return badToken(); - } - } else { - // If not a multi-unit code point, we only need to unget - // the single code unit consumed. - ungetCodeUnit(c); } } @@ -2087,21 +2073,24 @@ #ifdef DEBUG simpleKind = TokenKind::Limit; // sentinel value for code after switch #endif - switch (c) { + switch (static_cast(unit)) { case '.': - c = getCodeUnit(); - if (IsAsciiDigit(c)) { + unit = getCodeUnit(); + if (IsAsciiDigit(unit)) { return decimalNumber('.', start, sourceUnits.addressOfNextCodeUnit() - 2, modifier, ttp); } - if (c == '.') { + if (unit == '.') { if (matchCodeUnit('.')) { simpleKind = TokenKind::TripleDot; break; } } - ungetCodeUnit(c); + + // NOTE: |unit| may be EOF here. A stray '.' at EOF would be an + // error, but subsequent code will handle it. + ungetCodeUnit(unit); simpleKind = TokenKind::Dot; break; @@ -2123,8 +2112,8 @@ break; case '\\': { - uint32_t qc; - if (uint32_t escapeLength = matchUnicodeEscapeIdStart(&qc)) { + uint32_t codePoint; + if (uint32_t escapeLength = matchUnicodeEscapeIdStart(&codePoint)) { return identifierName(start, sourceUnits.addressOfNextCodeUnit() - escapeLength - 1, IdentifierEscapes::SawUnicodeEscape, modifier, ttp); @@ -2209,13 +2198,14 @@ case '/': // Look for a single-line comment. if (matchCodeUnit('/')) { - c = getCodeUnit(); - if (c == '@' || c == '#') { - bool shouldWarn = c == '@'; + unit = getCodeUnit(); + if (unit == '@' || unit == '#') { + bool shouldWarn = unit == '@'; if (!getDirectives(false, shouldWarn)) return false; } else { - ungetCodeUnit(c); + // NOTE: |unit| may be EOF here. + ungetCodeUnit(unit); } consumeRestOfSingleLineComment(); @@ -2287,12 +2277,12 @@ break; default: - // We consumed a bad character/code point. Put it back so the - // error location is the bad character. - ungetCodePointIgnoreEOL(c); + // We consumed a bad ASCII code point/unit. Put it back so the + // error location is the bad code point. + ungetCodeUnit(unit); error(JSMSG_ILLEGAL_CHARACTER); return badToken(); - } + } // switch (static_cast(unit)) MOZ_ASSERT(simpleKind != TokenKind::Limit, "switch-statement should have set |simpleKind| before " @@ -2312,8 +2302,6 @@ MOZ_ASSERT(untilChar == '\'' || untilChar == '"' || untilChar == '`', "unexpected string/template literal delimiter"); - int c; - bool parsingTemplate = (untilChar == '`'); bool templateHead = false; @@ -2326,55 +2314,129 @@ this->badToken(); }); + auto ReportPrematureEndOfLiteral = [this, untilChar](unsigned errnum) { + // Unicode separators aren't end-of-line in template or (as of + // recently) string literals, so this assertion doesn't allow them. + MOZ_ASSERT(this->sourceUnits.atEnd() || + this->sourceUnits.peekCodeUnit() == '\r' || + this->sourceUnits.peekCodeUnit() == '\n', + "must be parked at EOF or EOL to call this function"); + + // The various errors reported here include language like "in a '' + // literal" or similar, with '' being '', "", or `` as appropriate. + const char delimiters[] = { untilChar, untilChar, '\0' }; + + this->error(errnum, delimiters); + return; + }; + // We need to detect any of these chars: " or ', \n (or its // equivalents), \\, EOF. Because we detect EOL sequences here and // put them back immediately, we can use getCodeUnit(). - while ((c = getCodeUnit()) != untilChar) { - if (c == EOF) { - ungetCodeUnit(c); - const char delimiters[] = { untilChar, untilChar, '\0' }; - error(JSMSG_EOF_BEFORE_END_OF_LITERAL, delimiters); + int32_t unit; + while ((unit = getCodeUnit()) != untilChar) { + if (unit == EOF) { + ReportPrematureEndOfLiteral(JSMSG_EOF_BEFORE_END_OF_LITERAL); return false; } - if (c == '\\') { - // When parsing templates, we don't immediately report errors for - // invalid escapes; these are handled by the parser. - // In those cases we don't append to tokenbuf, since it won't be - // read. - if (!getChar(&c)) + // Non-ASCII code points are always directly appended -- even + // U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR that are + // ordinarily LineTerminatorSequences. (They contribute their literal + // values to template and [as of recently] string literals, but they're + // line terminators when computing line/column coordinates.) Handle + // the non-ASCI case early for readability. + if (MOZ_UNLIKELY(!isAsciiCodePoint(unit))) { + static_assert(mozilla::IsSame::value, + "need a getNonAsciiCodePoint that doesn't normalize " + "LineTerminatorSequences to correctly handle UTF-8"); + + int32_t codePoint; + if (unit == unicode::LINE_SEPARATOR || unit == unicode::PARA_SEPARATOR) { + if (!updateLineInfoForEOL()) + return false; + + anyCharsAccess().updateFlagsForEOL(); + + codePoint = unit; + } else { + if (!getNonAsciiCodePoint(unit, &codePoint)) + return false; + } + + if (!appendCodePointToTokenbuf(codePoint)) return false; - if (c == EOF) { - const char delimiters[] = { untilChar, untilChar, '\0' }; - error(JSMSG_EOF_IN_ESCAPE_IN_LITERAL, delimiters); + continue; + } + + if (unit == '\\') { + // When parsing templates, we don't immediately report errors for + // invalid escapes; these are handled by the parser. We don't + // append to tokenbuf in those cases because it won't be read. + unit = getCodeUnit(); + if (unit == EOF) { + ReportPrematureEndOfLiteral(JSMSG_EOF_IN_ESCAPE_IN_LITERAL); return false; } - switch (static_cast(c)) { - case 'b': c = '\b'; break; - case 'f': c = '\f'; break; - case 'n': c = '\n'; break; - case 'r': c = '\r'; break; - case 't': c = '\t'; break; - case 'v': c = '\v'; break; - - case '\n': - // ES5 7.8.4: an escaped line terminator represents - // no character. + // Non-ASCII |unit| isn't handled by code after this, so dedicate + // an unlikely special-case to it and then continue. + if (MOZ_UNLIKELY(!isAsciiCodePoint(unit))) { + int32_t codePoint; + if (!getNonAsciiCodePoint(unit, &codePoint)) + return false; + + // If we consumed U+2028 LINE SEPARATOR or U+2029 PARAGRAPH + // SEPARATOR, they'll be normalized to '\n'. '\' followed by + // LineContinuation represents no code points, so don't append + // in this case. + if (codePoint != '\n') { + if (!tokenbuf.append(unit)) + return false; + } + + continue; + } + + switch (static_cast(unit)) { + case 'b': unit = '\b'; break; + case 'f': unit = '\f'; break; + case 'n': unit = '\n'; break; + case 'r': unit = '\r'; break; + case 't': unit = '\t'; break; + case 'v': unit = '\v'; break; + + case '\r': + sourceUnits.matchCodeUnit('\n'); + MOZ_FALLTHROUGH; + case '\n': { + // LineContinuation represents no code points. We're manually + // consuming a LineTerminatorSequence, so we must manually + // update line/column info. + if (!updateLineInfoForEOL()) + return false; + continue; + } // Unicode character specification. case 'u': { int32_t c2 = getCodeUnit(); + if (c2 == EOF) { + ReportPrematureEndOfLiteral(JSMSG_EOF_IN_ESCAPE_IN_LITERAL); + return false; + } + + // First handle a delimited Unicode escape, e.g. \u{1F4A9}. if (c2 == '{') { uint32_t start = sourceUnits.offset() - 3; uint32_t code = 0; bool first = true; bool valid = true; do { - int32_t c = getCodeUnit(); - if (c == EOF) { + int32_t u3 = getCodeUnit(); + if (u3 == EOF) { if (parsingTemplate) { TokenStreamAnyChars& anyChars = anyCharsAccess(); anyChars.setInvalidTemplateEscape(start, @@ -2385,7 +2447,7 @@ reportInvalidEscapeError(start, InvalidEscapeType::Unicode); return false; } - if (c == '}') { + if (u3 == '}') { if (first) { if (parsingTemplate) { TokenStreamAnyChars& anyChars = anyCharsAccess(); @@ -2400,12 +2462,14 @@ break; } - if (!JS7_ISHEX(c)) { + // Beware: |u3| may be a non-ASCII code point here; if + // so it'll pass into this |if|-block. + if (!JS7_ISHEX(u3)) { if (parsingTemplate) { - // We put the character back so that we read - // it on the next pass, which matters if it - // was '`' or '\'. - ungetCodeUnit(c); + // We put the character back so that we read it + // on the next pass, which matters if it was + // '`' or '\'. + ungetCodeUnit(u3); TokenStreamAnyChars& anyChars = anyCharsAccess(); anyChars.setInvalidTemplateEscape(start, @@ -2417,7 +2481,7 @@ return false; } - code = (code << 4) | JS7_UNHEX(c); + code = (code << 4) | JS7_UNHEX(u3); if (code > unicode::NonBMPMax) { if (parsingTemplate) { TokenStreamAnyChars& anyChars = anyCharsAccess(); @@ -2437,26 +2501,28 @@ continue; MOZ_ASSERT(code <= unicode::NonBMPMax); - if (code < unicode::NonBMPMin) { - c = code; - } else { - if (!tokenbuf.append(unicode::LeadSurrogate(code))) - return false; - c = unicode::TrailSurrogate(code); - } - break; - } + if (!appendCodePointToTokenbuf(code)) + return false; + + continue; + } // end of delimited Unicode escape handling + // Otherwise it must be a fixed-length \uXXXX Unicode escape. + // If it isn't, this is usually an error -- but if this is a + // template literal, we must defer error reporting because + // malformed escapes are okay in *tagged* template literals. CharT cp[3]; - if (JS7_ISHEX(c2) && peekChars(3, cp) && + if (JS7_ISHEX(c2) && + sourceUnits.peekCodeUnits(3, cp) && JS7_ISHEX(cp[0]) && JS7_ISHEX(cp[1]) && JS7_ISHEX(cp[2])) { - c = (JS7_UNHEX(c2) << 12) | - (JS7_UNHEX(cp[0]) << 8) | - (JS7_UNHEX(cp[1]) << 4) | - JS7_UNHEX(cp[2]); - skipChars(3); + unit = (JS7_UNHEX(c2) << 12) | + (JS7_UNHEX(cp[0]) << 8) | + (JS7_UNHEX(cp[1]) << 4) | + JS7_UNHEX(cp[2]); + sourceUnits.skipCodeUnits(3); } else { + // Beware: |c2| may not be an ASCII code point here! ungetCodeUnit(c2); uint32_t start = sourceUnits.offset() - 2; if (parsingTemplate) { @@ -2468,14 +2534,16 @@ return false; } break; - } + } // case 'u' // Hexadecimal character specification. case 'x': { CharT cp[2]; - if (peekChars(2, cp) && JS7_ISHEX(cp[0]) && JS7_ISHEX(cp[1])) { - c = (JS7_UNHEX(cp[0]) << 4) + JS7_UNHEX(cp[1]); - skipChars(2); + if (sourceUnits.peekCodeUnits(2, cp) && + JS7_ISHEX(cp[0]) && JS7_ISHEX(cp[1])) + { + unit = (JS7_UNHEX(cp[0]) << 4) + JS7_UNHEX(cp[1]); + sourceUnits.skipCodeUnits(2); } else { uint32_t start = sourceUnits.offset() - 2; if (parsingTemplate) { @@ -2489,60 +2557,76 @@ break; } - default: + default: { + if (!JS7_ISOCT(unit)) + break; + // Octal character specification. - if (JS7_ISOCT(c)) { - int32_t val = JS7_UNOCT(c); + int32_t val = JS7_UNOCT(unit); - if (!peekChar(&c)) - return false; + unit = peekCodeUnit(); + if (MOZ_UNLIKELY(unit == EOF)) { + ReportPrematureEndOfLiteral(JSMSG_EOF_IN_ESCAPE_IN_LITERAL); + return false; + } - // Strict mode code allows only \0, then a non-digit. - if (val != 0 || IsAsciiDigit(c)) { - TokenStreamAnyChars& anyChars = anyCharsAccess(); - if (parsingTemplate) { - anyChars.setInvalidTemplateEscape(sourceUnits.offset() - 2, - InvalidEscapeType::Octal); - continue; - } - if (!reportStrictModeError(JSMSG_DEPRECATED_OCTAL)) - return false; - anyChars.flags.sawOctalEscape = true; + // Strict mode code allows only \0, then a non-digit. + if (val != 0 || IsAsciiDigit(unit)) { + TokenStreamAnyChars& anyChars = anyCharsAccess(); + if (parsingTemplate) { + anyChars.setInvalidTemplateEscape(sourceUnits.offset() - 2, + InvalidEscapeType::Octal); + continue; } + if (!reportStrictModeError(JSMSG_DEPRECATED_OCTAL)) + return false; + anyChars.flags.sawOctalEscape = true; + } - if (JS7_ISOCT(c)) { - val = 8 * val + JS7_UNOCT(c); - consumeKnownChar(c); - if (!peekChar(&c)) - return false; - if (JS7_ISOCT(c)) { - int32_t save = val; - val = 8 * val + JS7_UNOCT(c); - if (val <= 0xFF) - consumeKnownChar(c); - else - val = save; - } + if (JS7_ISOCT(unit)) { + val = 8 * val + JS7_UNOCT(unit); + consumeKnownCodeUnit(unit); + + unit = peekCodeUnit(); + if (MOZ_UNLIKELY(unit == EOF)) { + ReportPrematureEndOfLiteral(JSMSG_EOF_IN_ESCAPE_IN_LITERAL); + return false; } - c = char16_t(val); + if (JS7_ISOCT(unit)) { + int32_t save = val; + val = 8 * val + JS7_UNOCT(unit); + if (val <= 0xFF) + consumeKnownCodeUnit(unit); + else + val = save; + } } + + unit = char16_t(val); break; + } // default } - } else if (c == '\r' || c == '\n') { + + if (!tokenbuf.append(unit)) + return false; + + continue; + } // (unit == '\\') + + if (unit == '\r' || unit == '\n') { if (!parsingTemplate) { // String literals don't allow ASCII line breaks. - ungetCodeUnit(c); - const char delimiters[] = { untilChar, untilChar, '\0' }; - error(JSMSG_EOL_BEFORE_END_OF_STRING, delimiters); + ungetCodeUnit(unit); + ReportPrematureEndOfLiteral(JSMSG_EOL_BEFORE_END_OF_STRING); return false; } - if (c == '\r') { - c = '\n'; + if (unit == '\r') { + unit = '\n'; // If it's a \r\n sequence: treat as a single EOL, skip over the \n. - if (sourceUnits.hasRawChars()) + if (!sourceUnits.atEnd()) sourceUnits.matchCodeUnit('\n'); } @@ -2550,24 +2634,13 @@ return false; anyCharsAccess().updateFlagsForEOL(); - } else if (c == unicode::LINE_SEPARATOR || c == unicode::PARA_SEPARATOR) { - // U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR encode - // their literal values in template literals and (as of fairly - // recently) string literals, but they still count as line - // terminators when computing line/column coordinates. - if (!updateLineInfoForEOL()) - return false; - - anyCharsAccess().updateFlagsForEOL(); - } else if (parsingTemplate && c == '$' && matchCodeUnit('{')) { + } else if (parsingTemplate && unit == '$' && matchCodeUnit('{')) { templateHead = true; break; } - if (!tokenbuf.append(c)) { - ReportOutOfMemory(anyCharsAccess().cx); + if (!tokenbuf.append(unit)) return false; - } } JSAtom* atom = atomizeChars(anyCharsAccess().cx, tokenbuf.begin(), tokenbuf.length()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/TokenStream.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/TokenStream.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/frontend/TokenStream.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/frontend/TokenStream.h 2018-06-20 17:29:12.000000000 +0000 @@ -170,6 +170,7 @@ #include "mozilla/TypeTraits.h" #include "mozilla/Unused.h" +#include #include #include #include @@ -908,12 +909,14 @@ ptr(buf) { } - bool hasRawChars() const { - return ptr < limit_; + bool atStart() const { + MOZ_ASSERT(ptr, "shouldn't be using if poisoned"); + return ptr == base_; } - bool atStart() const { - return offset() == 0; + bool atEnd() const { + MOZ_ASSERT(ptr <= limit_, "shouldn't have overrun"); + return ptr >= limit_; } size_t startOffset() const { @@ -948,6 +951,29 @@ return *ptr; // this will nullptr-crash if poisoned } + bool peekCodeUnits(uint8_t n, CharT* out) const { + MOZ_ASSERT(ptr, "shouldn't peek into poisoned SourceUnits"); + if (n > mozilla::PointerRangeSize(ptr, limit_)) + return false; + + std::copy_n(ptr, n, out); + return true; + } + + void skipCodeUnits(uint32_t n) { + MOZ_ASSERT(ptr, "shouldn't use poisoned SourceUnits"); + MOZ_ASSERT(n <= mozilla::PointerRangeSize(ptr, limit_), + "shouldn't skip beyond end of SourceUnits"); + ptr += n; + } + + void unskipCodeUnits(uint32_t n) { + MOZ_ASSERT(ptr, "shouldn't use poisoned SourceUnits"); + MOZ_ASSERT(n <= mozilla::PointerRangeSize(base_, ptr), + "shouldn't skip beyond start of SourceUnits"); + ptr -= n; + } + bool matchCodeUnit(CharT c) { if (*ptr == c) { // this will nullptr-crash if poisoned ptr++; @@ -1024,7 +1050,12 @@ class TokenStreamCharsBase { protected: - void ungetCodeUnit(int32_t c); + void ungetCodeUnit(int32_t c) { + if (c == EOF) + return; + + sourceUnits.ungetCodeUnit(); + } public: using CharBuffer = Vector; @@ -1047,10 +1078,24 @@ bool matchCodeUnit(int32_t expect) { MOZ_ASSERT(expect != EOF, "shouldn't be matching EOFs"); MOZ_ASSERT(!SourceUnits::isRawEOLChar(expect)); - return MOZ_LIKELY(sourceUnits.hasRawChars()) && sourceUnits.matchCodeUnit(expect); + return MOZ_LIKELY(!sourceUnits.atEnd()) && sourceUnits.matchCodeUnit(expect); } protected: + int32_t peekCodeUnit() { + return MOZ_LIKELY(!sourceUnits.atEnd()) ? sourceUnits.peekCodeUnit() : EOF; + } + + void consumeKnownCodeUnit(int32_t unit) { + MOZ_ASSERT(unit != EOF, "shouldn't be matching EOF"); + MOZ_ASSERT(!sourceUnits.atEnd(), "must have units to consume"); +#ifdef DEBUG + CharT next = +#endif + sourceUnits.getCodeUnit(); + MOZ_ASSERT(next == unit, "must be consuming the correct unit"); + } + MOZ_MUST_USE bool fillWithTemplateStringContents(CharBuffer& charbuf, const CharT* cur, const CharT* end) { while (cur < end) { @@ -1079,7 +1124,7 @@ * (The code point's exact value might not be used, however, if subsequent * code observes that |unit| is part of a LineTerminatorSequence.) */ - static MOZ_MUST_USE MOZ_ALWAYS_INLINE bool isAsciiCodePoint(CharT unit) { + static constexpr MOZ_ALWAYS_INLINE MOZ_MUST_USE bool isAsciiCodePoint(CharT unit) { return mozilla::IsAscii(unit); } @@ -1147,6 +1192,9 @@ return token; } + uint32_t matchUnicodeEscape(uint32_t* codePoint); + uint32_t matchExtendedUnicodeEscape(uint32_t* codePoint); + protected: using typename CharsSharedBase::SourceUnits; @@ -1211,7 +1259,23 @@ MOZ_COLD bool badToken(); - int32_t getCodeUnit(); + /** + * Get the next code unit -- the next numeric sub-unit of source text, + * possibly smaller than a full code point -- without updating line/column + * counters or consuming LineTerminatorSequences. + * + * Because of these limitations, only use this if (a) the resulting code + * unit is guaranteed to be ungotten (by ungetCodeUnit()) if it's an EOL, + * and (b) the line-related state (lineno, linebase) is not used before + * it's ungotten. + */ + int32_t getCodeUnit() { + if (MOZ_LIKELY(!sourceUnits.atEnd())) + return sourceUnits.getCodeUnit(); + + anyCharsAccess().flags.isEOF = true; + return EOF; + } void ungetCodeUnit(int32_t c) { MOZ_ASSERT_IF(c == EOF, anyCharsAccess().flags.isEOF); @@ -1230,6 +1294,10 @@ MOZ_MUST_USE MOZ_ALWAYS_INLINE bool updateLineInfoForEOL() { return anyCharsAccess().internalUpdateLineInfoForEOL(sourceUnits.offset()); } + + protected: + uint32_t matchUnicodeEscapeIdStart(uint32_t* codePoint); + bool matchUnicodeEscapeIdent(uint32_t* codePoint); }; template class TokenStreamChars; @@ -1247,8 +1315,6 @@ using typename GeneralCharsBase::TokenStreamSpecific; - void matchMultiUnitCodePointSlow(char16_t lead, uint32_t* codePoint); - protected: using GeneralCharsBase::anyCharsAccess; using GeneralCharsBase::getCodeUnit; @@ -1261,31 +1327,6 @@ using GeneralCharsBase::GeneralCharsBase; - // |c| must be the code unit just gotten. If it and the subsequent code - // unit form a valid surrogate pair, get the second code unit, set - // |*codePoint| to the code point encoded by the surrogate pair, and return - // true. Otherwise do not get a second code unit, set |*codePoint = 0|, - // and return true. - // - // ECMAScript specifically requires that unpaired UTF-16 surrogates be - // treated as the corresponding code point and not as an error. See - // . - // Therefore this function always returns true. The |bool| return type - // exists so that a future UTF-8 |TokenStreamChars| can treat malformed - // multi-code unit UTF-8 sequences as errors. (Because ECMAScript only - // interprets UTF-16 inputs, the process of translating the UTF-8 to UTF-16 - // would fail, so no script should execute. Technically, we shouldn't even - // be tokenizing -- but it probably isn't realistic to assume every user - // correctly passes only valid UTF-8, at least not without better types in - // our codebase for strings that by construction only contain valid UTF-8.) - MOZ_ALWAYS_INLINE bool matchMultiUnitCodePoint(char16_t c, uint32_t* codePoint) { - if (MOZ_LIKELY(!unicode::IsLeadSurrogate(c))) - *codePoint = 0; - else - matchMultiUnitCodePointSlow(c, codePoint); - return true; - } - // Try to get the next code point, normalizing '\r', '\r\n', '\n', and the // Unicode line/paragraph separators into '\n'. Also updates internal // line-counter state. Return true on success and store the character in @@ -1315,7 +1356,7 @@ "getFullAsciiCodePoint called incorrectly"); if (MOZ_UNLIKELY(lead == '\r')) { - if (MOZ_LIKELY(sourceUnits.hasRawChars())) + if (MOZ_LIKELY(!sourceUnits.atEnd())) sourceUnits.matchCodeUnit('\n'); } else if (MOZ_LIKELY(lead != '\n')) { *codePoint = lead; @@ -1345,9 +1386,37 @@ */ MOZ_MUST_USE bool getNonAsciiCodePoint(char16_t lead, int32_t* cp); + /** + * Unget a full code point (ASCII or not) without altering line/column + * state. If line/column state must be updated, this must happen manually. + * This method ungets a single code point, not a LineTerminatorSequence + * that is multiple code points. (Generally you shouldn't be in a state + * where you've just consumed "\r\n" and want to unget that full sequence.) + * + * This function ordinarily should be used to unget code points that have + * been consumed *without* line/column state having been updated. + */ void ungetCodePointIgnoreEOL(uint32_t codePoint); /** + * Unget an originally non-ASCII, normalized code point, including undoing + * line/column updates that were performed for it. Don't use this if the + * code point was gotten *without* line/column state being updated! + */ + void ungetNonAsciiNormalizedCodePoint(uint32_t codePoint) { + MOZ_ASSERT_IF(isAsciiCodePoint(codePoint), + codePoint == '\n'); + MOZ_ASSERT(codePoint != unicode::LINE_SEPARATOR, + "should not be ungetting un-normalized code points"); + MOZ_ASSERT(codePoint != unicode::PARA_SEPARATOR, + "should not be ungetting un-normalized code points"); + + ungetCodePointIgnoreEOL(codePoint); + if (codePoint == '\n') + anyCharsAccess().undoInternalUpdateLineInfoForEOL(); + } + + /** * Unget a just-gotten LineTerminator sequence: '\r', '\n', '\r\n', or * a Unicode line/paragraph separator, also undoing line/column information * changes reflecting that LineTerminator. @@ -1432,6 +1501,7 @@ using CharsSharedBase::appendCodePointToTokenbuf; using CharsSharedBase::atomizeChars; using GeneralCharsBase::badToken; + using CharsSharedBase::consumeKnownCodeUnit; using GeneralCharsBase::consumeRestOfSingleLineComment; using CharsSharedBase::copyTokenbufTo; using CharsSharedBase::fillWithTemplateStringContents; @@ -1442,17 +1512,20 @@ using CharsBase::getNonAsciiCodePoint; using CharsSharedBase::isAsciiCodePoint; using CharsSharedBase::matchCodeUnit; - using CharsBase::matchMultiUnitCodePoint; + using GeneralCharsBase::matchUnicodeEscapeIdent; + using GeneralCharsBase::matchUnicodeEscapeIdStart; using GeneralCharsBase::newAtomToken; using GeneralCharsBase::newNameToken; using GeneralCharsBase::newNumberToken; using GeneralCharsBase::newRegExpToken; using GeneralCharsBase::newSimpleToken; + using CharsSharedBase::peekCodeUnit; using CharsSharedBase::sourceUnits; using CharsSharedBase::tokenbuf; using GeneralCharsBase::ungetChar; using CharsBase::ungetCodePointIgnoreEOL; using CharsSharedBase::ungetCodeUnit; + using CharsBase::ungetNonAsciiNormalizedCodePoint; using GeneralCharsBase::updateLineInfoForEOL; template friend class TokenStreamPosition; @@ -1593,14 +1666,14 @@ * Tokenize a decimal number that begins at |numStart| into the provided * token. * - * |c| must be one of these values: + * |unit| must be one of these values: * * 1. The first decimal digit in the integral part of a decimal number * not starting with '0' or '.', e.g. '1' for "17", '3' for "3.14", or * '8' for "8.675309e6". * * In this case, the next |getCodeUnit()| must return the code unit after - * |c| in the overall number. + * |unit| in the overall number. * * 2. The '.' in a "."/"0."-prefixed decimal number or the 'e'/'E' in a * "0e"/"0E"-prefixed decimal number, e.g. ".17", "0.42", or "0.1e3". @@ -1612,8 +1685,8 @@ * * 3. The code unit after the '0' where "0" is the entire number token. * - * In this case, the next |getCodeUnit()| returns the code unit after - * |c|. + * In this case, the next |getCodeUnit()| would return the code unit + * after |unit|, but this function will never perform such call. * * 4. (Non-strict mode code only) The first '8' or '9' in a "noctal" * number that begins with a '0' but contains a non-octal digit in its @@ -1621,13 +1694,13 @@ * '8' in "0386" or '9' in "09+7" (three separate tokens"). * * In this case, the next |getCodeUnit()| returns the code unit after - * |c|: '.', '6', or '+' in the examples above. + * |unit|: '.', '6', or '+' in the examples above. * * This interface is super-hairy and horribly stateful. Unfortunately, its * hair merely reflects the intricacy of ECMAScript numeric literal syntax. * And incredibly, it *improves* on the goto-based horror that predated it. */ - MOZ_MUST_USE bool decimalNumber(int c, TokenStart start, const CharT* numStart, + MOZ_MUST_USE bool decimalNumber(int32_t unit, TokenStart start, const CharT* numStart, Modifier modifier, TokenKind* out); /** Tokenize a regular expression literal beginning at |start|. */ @@ -1800,12 +1873,6 @@ MOZ_MUST_USE bool getStringOrTemplateToken(char untilChar, Modifier modifier, TokenKind* out); - uint32_t peekUnicodeEscape(uint32_t* codePoint); - uint32_t peekExtendedUnicodeEscape(uint32_t* codePoint); - uint32_t matchUnicodeEscapeIdStart(uint32_t* codePoint); - bool matchUnicodeEscapeIdent(uint32_t* codePoint); - bool peekChars(int n, CharT* cp); - MOZ_MUST_USE bool getDirectives(bool isMultiline, bool shouldWarnDeprecated); MOZ_MUST_USE bool getDirective(bool isMultiline, bool shouldWarnDeprecated, const char* directive, uint8_t directiveLength, @@ -1813,35 +1880,6 @@ UniquePtr* destination); MOZ_MUST_USE bool getDisplayURL(bool isMultiline, bool shouldWarnDeprecated); MOZ_MUST_USE bool getSourceMappingURL(bool isMultiline, bool shouldWarnDeprecated); - - void consumeKnownChar(int32_t expect) { - int32_t c; - MOZ_ALWAYS_TRUE(getChar(&c)); - MOZ_ASSERT(c == expect); - } - - void consumeKnownCharIgnoreEOL(int32_t expect) { -#ifdef DEBUG - auto c = -#endif - getCodeUnit(); - MOZ_ASSERT(c == expect); - } - - MOZ_MUST_USE bool peekChar(int32_t* c) { - if (!getChar(c)) - return false; - ungetChar(*c); - return true; - } - - void skipChars(uint32_t n) { - while (n-- > 0) { - MOZ_ASSERT(sourceUnits.hasRawChars()); - mozilla::DebugOnly c = getCodeUnit(); - MOZ_ASSERT(!SourceUnits::isRawEOLChar(c)); - } - } }; // It's preferable to define this in TokenStream.cpp, but its template-ness diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/fuzz-tests/tests.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/fuzz-tests/tests.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/fuzz-tests/tests.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/fuzz-tests/tests.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -56,7 +56,7 @@ // Populate the global object with the standard globals like Object and // Array. - if (!JS_InitStandardClasses(cx, newGlobal)) + if (!JS::InitRealmStandardClasses(cx)) return nullptr; return newGlobal; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Allocator.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Allocator.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Allocator.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Allocator.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -284,7 +284,7 @@ MOZ_ASSERT_IF(!cx->zone()->isAtomsZone(), kind != AllocKind::ATOM && kind != AllocKind::FAT_INLINE_ATOM); - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(cx->isAllocAllowed()); #endif @@ -380,7 +380,7 @@ // It should not be possible to allocate on the main thread while we are // inside a GC. Zone *zone = cx->zone(); - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy(), "allocating while under GC"); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy(), "allocating while under GC"); return cx->arenas()->allocateFromArena(zone, thingKind, ShouldCheckThresholds::CheckThresholds); } @@ -405,8 +405,8 @@ zone->arenas.checkEmptyFreeList(thingKind); mozilla::DebugOnly rt = zone->runtimeFromMainThread(); - MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting()); - MOZ_ASSERT_IF(!JS::CurrentThreadIsHeapMinorCollecting(), !rt->gc.isBackgroundSweeping()); + MOZ_ASSERT(JS::RuntimeHeapIsCollecting()); + MOZ_ASSERT_IF(!JS::RuntimeHeapIsMinorCollecting(), !rt->gc.isBackgroundSweeping()); return zone->arenas.allocateFromArena(zone, thingKind, ShouldCheckThresholds::DontCheckThresholds); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Barrier.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Barrier.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Barrier.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Barrier.cpp 2018-06-20 17:29:11.000000000 +0000 @@ -24,7 +24,7 @@ RuntimeFromMainThreadIsHeapMajorCollecting(JS::shadow::Zone* shadowZone) { MOZ_ASSERT(CurrentThreadCanAccessRuntime(shadowZone->runtimeFromMainThread())); - return JS::CurrentThreadIsHeapMajorCollecting(); + return JS::RuntimeHeapIsMajorCollecting(); } #ifdef DEBUG diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Cell.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Cell.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Cell.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Cell.h 2018-06-20 17:29:12.000000000 +0000 @@ -393,7 +393,7 @@ if (thing->isMarkedGray()) { // There shouldn't be anything marked grey unless we're on the main thread. MOZ_ASSERT(CurrentThreadCanAccessRuntime(thing->runtimeFromAnyThread())); - if (!JS::CurrentThreadIsHeapCollecting()) + if (!JS::RuntimeHeapIsCollecting()) JS::UnmarkGrayGCThingRecursively(JS::GCCellPtr(thing, thing->getTraceKind())); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/DeletePolicy.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/DeletePolicy.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/DeletePolicy.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/DeletePolicy.h 2018-06-20 17:29:12.000000000 +0000 @@ -74,7 +74,7 @@ void operator()(const T* constPtr) { if (constPtr) { auto ptr = const_cast(constPtr); - if (JS::CurrentThreadIsHeapCollecting()) { + if (JS::RuntimeHeapIsCollecting()) { MOZ_ASSERT(js::CurrentThreadIsGCSweeping()); // Do not attempt to clear out storebuffer edges. } else { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GC.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GC.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GC.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GC.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -1734,7 +1734,7 @@ void GCRuntime::setMarkStackLimit(size_t limit, AutoLockGC& lock) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); AutoUnlockGC unlock(lock); AutoStopVerifyingBarriers pauseVerification(rt, false); marker.setMaxCapacity(limit); @@ -2968,7 +2968,7 @@ * Update runtime-wide pointers to relocated cells. */ void -GCRuntime::updateRuntimePointersToRelocatedCells(AutoTraceSession& session) +GCRuntime::updateRuntimePointersToRelocatedCells(AutoGCSession& session) { MOZ_ASSERT(!rt->isBeingDestroyed()); @@ -3330,7 +3330,7 @@ return false; /* GC is already running. */ - if (JS::CurrentThreadIsHeapCollecting()) + if (JS::RuntimeHeapIsCollecting()) return false; JS::PrepareForFullGC(rt->mainContextFromOwnThread()); @@ -3341,14 +3341,14 @@ void GCRuntime::maybeAllocTriggerZoneGC(Zone* zone, const AutoLockGC& lock) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); - if (!CurrentThreadCanAccessRuntime(rt)) { // Zones in use by a helper thread can't be collected. MOZ_ASSERT(zone->usedByHelperThread() || zone->isAtomsZone()); return; } + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); + size_t usedBytes = zone->usage.gcBytes(); size_t thresholdBytes = zone->threshold.gcTriggerBytes(); @@ -3394,7 +3394,7 @@ MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt)); /* GC is already running. */ - if (JS::CurrentThreadIsHeapBusy()) + if (JS::RuntimeHeapIsBusy()) return false; #ifdef JS_GC_ZEAL @@ -3454,7 +3454,7 @@ { MOZ_ASSERT(fullGCForAtomsRequested_); MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt)); - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(cx->canCollectAtoms()); fullGCForAtomsRequested_ = false; MOZ_RELEASE_ASSERT(triggerGC(JS::gcreason::DELAYED_ATOMS_GC)); @@ -3705,7 +3705,7 @@ void GCRuntime::freeUnusedLifoBlocksAfterSweeping(LifoAlloc* lifo) { - MOZ_ASSERT(JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(JS::RuntimeHeapIsBusy()); AutoLockGC lock(rt); blocksToFreeAfterSweeping.ref().transferUnusedFrom(lifo); } @@ -3713,7 +3713,7 @@ void GCRuntime::freeAllLifoBlocksAfterSweeping(LifoAlloc* lifo) { - MOZ_ASSERT(JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(JS::RuntimeHeapIsBusy()); AutoLockGC lock(rt); blocksToFreeAfterSweeping.ref().transferFrom(lifo); } @@ -4262,8 +4262,7 @@ } bool -GCRuntime::prepareZonesForCollection(JS::gcreason::Reason reason, bool* isFullOut, - AutoLockForExclusiveAccess& lock) +GCRuntime::prepareZonesForCollection(JS::gcreason::Reason reason, bool* isFullOut) { #ifdef DEBUG /* Assert that zone state is as we expect */ @@ -4355,7 +4354,7 @@ { gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::PURGE_SHAPE_TABLES); for (GCZonesIter zone(rt); !zone.done(); zone.next()) { - if (zone->keepShapeTables() || zone->isSelfHostingZone()) + if (!CanRelocateZone(zone) || zone->keepShapeTables()) continue; for (auto baseShape = zone->cellIter(); !baseShape.done(); baseShape.next()) baseShape->maybePurgeTable(); @@ -4384,31 +4383,27 @@ } bool -GCRuntime::beginMarkPhase(JS::gcreason::Reason reason, AutoTraceSession& session) +GCRuntime::beginMarkPhase(JS::gcreason::Reason reason, AutoGCSession& session) { - MOZ_ASSERT(session.maybeLock.isSome()); - #ifdef DEBUG if (fullCompartmentChecks) checkForCompartmentMismatches(); #endif - if (!prepareZonesForCollection(reason, &isFull.ref(), session.lock())) + if (!prepareZonesForCollection(reason, &isFull.ref())) return false; - /* If we're not collecting the atoms zone we can release the lock now. */ - if (!atomsZone->isCollecting()) - session.maybeLock.reset(); + /* * Check it's safe to access the atoms zone if we are collecting it. */ + if (atomsZone->isCollecting()) + session.maybeCheckAtomsAccess.emplace(rt); /* * In an incremental GC, clear the area free lists to ensure that subsequent * allocations refill them and end up marking new cells back. See * arenaAllocatedDuringGC(). */ - if (isIncremental) { - for (GCZonesIter zone(rt); !zone.done(); zone.next()) - zone->arenas.clearFreeLists(); - } + for (GCZonesIter zone(rt); !zone.done(); zone.next()) + zone->arenas.clearFreeLists(); marker.start(); GCMarker* gcmarker = ▮ @@ -4668,7 +4663,7 @@ public: explicit MarkingValidator(GCRuntime* gc); ~MarkingValidator(); - void nonIncrementalMark(AutoTraceSession& session); + void nonIncrementalMark(AutoGCSession& session); void validate(); private: @@ -4694,7 +4689,7 @@ } void -js::gc::MarkingValidator::nonIncrementalMark(AutoTraceSession& session) +js::gc::MarkingValidator::nonIncrementalMark(AutoGCSession& session) { /* * Perform a non-incremental mark for all collecting zones and record @@ -4910,7 +4905,7 @@ #endif // JS_GC_ZEAL void -GCRuntime::computeNonIncrementalMarkingForValidation(AutoTraceSession& session) +GCRuntime::computeNonIncrementalMarkingForValidation(AutoGCSession& session) { #ifdef JS_GC_ZEAL MOZ_ASSERT(!markingValidator); @@ -5729,8 +5724,7 @@ zone->changeGCState(Zone::Mark, Zone::Sweep); /* Purge the ArenaLists before sweeping. */ - if (isIncremental) - zone->arenas.unmarkPreMarkedFreeCells(); + zone->arenas.unmarkPreMarkedFreeCells(); zone->arenas.clearFreeLists(); if (zone->isAtomsZone()) @@ -5860,8 +5854,7 @@ zone->threshold.updateAfterGC(zone->usage.gcBytes(), invocationKind, tunables, schedulingState, lock); zone->updateAllGCMallocCountersOnGCEnd(lock); - if (isIncremental) - zone->arenas.unmarkPreMarkedFreeCells(); + zone->arenas.unmarkPreMarkedFreeCells(); } /* @@ -5888,12 +5881,12 @@ } void -GCRuntime::beginSweepPhase(JS::gcreason::Reason reason, AutoTraceSession& session) +GCRuntime::beginSweepPhase(JS::gcreason::Reason reason, AutoGCSession& session) { /* * Sweep phase. * - * Finalize as we sweep, outside of lock but with CurrentThreadIsHeapBusy() + * Finalize as we sweep, outside of lock but with RuntimeHeapIsBusy() * true so that any attempt to allocate a GC-thing from a finalizer will * fail, rather than nest badly and leave the unmarked newborn to be swept. */ @@ -6763,7 +6756,7 @@ IncrementalProgress GCRuntime::compactPhase(JS::gcreason::Reason reason, SliceBudget& sliceBudget, - AutoTraceSession& session) + AutoGCSession& session) { assertBackgroundSweepingFinished(); MOZ_ASSERT(startedCompacting); @@ -6874,36 +6867,34 @@ } /* Start a new heap session. */ -AutoTraceSession::AutoTraceSession(JSRuntime* rt, JS::HeapState heapState) +AutoHeapSession::AutoHeapSession(JSRuntime* rt, JS::HeapState heapState) : runtime(rt), - prevState(rt->mainContextFromOwnThread()->heapState), + prevState(rt->heapState_), profilingStackFrame(rt->mainContextFromOwnThread(), HeapStateToLabel(heapState), ProfilingStackFrame::Category::GCCC) { + MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt)); MOZ_ASSERT(prevState == JS::HeapState::Idle); MOZ_ASSERT(heapState != JS::HeapState::Idle); MOZ_ASSERT_IF(heapState == JS::HeapState::MajorCollecting, rt->gc.nursery().isEmpty()); - // Session always begins with lock held, see comment in class definition. - maybeLock.emplace(rt); - - rt->mainContextFromOwnThread()->heapState = heapState; + rt->heapState_ = heapState; } -AutoTraceSession::~AutoTraceSession() +AutoHeapSession::~AutoHeapSession() { - MOZ_ASSERT(JS::CurrentThreadIsHeapBusy()); - runtime->mainContextFromOwnThread()->heapState = prevState; + MOZ_ASSERT(JS::RuntimeHeapIsBusy()); + runtime->heapState_ = prevState; } JS_PUBLIC_API(JS::HeapState) -JS::CurrentThreadHeapState() +JS::RuntimeHeapState() { - return TlsContext.get()->heapState; + return TlsContext.get()->runtime()->heapState(); } GCRuntime::IncrementalResult -GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoTraceSession& session) +GCRuntime::resetIncrementalGC(gc::AbortReason reason, AutoGCSession& session) { MOZ_ASSERT(reason != gc::AbortReason::None); @@ -6945,6 +6936,11 @@ for (CompartmentsIter c(rt); !c.done(); c.next()) c->gcState.scheduledForDestruction = false; + for (GCZonesIter zone(rt); !zone.done(); zone.next()) { + if (zone->isGCMarking()) + zone->arenas.unmarkPreMarkedFreeCells(); + } + /* Finish sweeping the current sweep group, then abort. */ abortSweepAfterCurrentGroup = true; @@ -7073,17 +7069,6 @@ #endif } -void -GCRuntime::changeToNonIncrementalGC() -{ - MOZ_ASSERT(isIncremental); - - for (GCZonesIter zone(rt); !zone.done(); zone.next()) { - if (zone->isGCMarking() || zone->isGCSweeping()) - zone->arenas.unmarkPreMarkedFreeCells(); - } -} - static bool IsShutdownGC(JS::gcreason::Reason reason) { @@ -7101,15 +7086,8 @@ void GCRuntime::incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason, - AutoTraceSession& session) + AutoGCSession& session) { - /* - * Drop the exclusive access lock if we are in an incremental collection - * that does not touch the atoms zone. - */ - if (isIncrementalGCInProgress() && !atomsZone->isCollecting()) - session.maybeLock.reset(); - AutoDisableBarriers disableBarriers(rt); bool destroyingRuntime = (reason == JS::gcreason::DESTROY_RUNTIME); @@ -7136,8 +7114,6 @@ } #endif MOZ_ASSERT_IF(isIncrementalGCInProgress(), isIncremental); - if (isIncrementalGCInProgress() && budget.isUnlimited()) - changeToNonIncrementalGC(); isIncremental = !budget.isUnlimited(); @@ -7339,7 +7315,7 @@ GCRuntime::IncrementalResult GCRuntime::budgetIncrementalGC(bool nonincrementalByAPI, JS::gcreason::Reason reason, - SliceBudget& budget, AutoTraceSession& session) + SliceBudget& budget, AutoGCSession& session) { if (nonincrementalByAPI) { stats().nonincremental(gc::AbortReason::NonIncrementalRequested); @@ -7506,7 +7482,7 @@ minorGC(reason, gcstats::PhaseKind::EVICT_NURSERY_FOR_MAJOR_GC); - AutoTraceSession session(rt, JS::HeapState::MajorCollecting); + AutoGCSession session(rt, JS::HeapState::MajorCollecting); majorGCTriggerReason = JS::gcreason::NO_REASON; @@ -7539,8 +7515,9 @@ } // We don't allow off-thread parsing to start while we're doing an - // incremental GC. - MOZ_ASSERT_IF(rt->activeGCInAtomsZone(), !rt->hasHelperThreadZones()); + // incremental GC of the atoms zone. + if (rt->activeGCInAtomsZone()) + session.maybeCheckAtomsAccess.emplace(rt); auto result = budgetIncrementalGC(nonincrementalByAPI, reason, budget, session); @@ -7637,7 +7614,7 @@ MOZ_RELEASE_ASSERT(CurrentThreadCanAccessRuntime(rt)); /* If we attempt to invoke the GC while we are running in the GC, assert. */ - MOZ_RELEASE_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_RELEASE_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(rt->mainContextFromOwnThread()->isAllocAllowed()); } @@ -7894,7 +7871,7 @@ void GCRuntime::minorGC(JS::gcreason::Reason reason, gcstats::PhaseKind phase) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT_IF(reason == JS::gcreason::EVICT_NURSERY, !rt->mainContextFromOwnThread()->suppressGC); @@ -7984,12 +7961,6 @@ cx->nursery().waitBackgroundFreeEnd(); } -AutoPrepareForTracing::AutoPrepareForTracing(JSContext* cx) -{ - js::gc::FinishGC(cx); - session_.emplace(cx->runtime()); -} - Realm* js::NewRealm(JSContext* cx, JSPrincipals* principals, const JS::RealmOptions& options) { @@ -8293,7 +8264,7 @@ void GCRuntime::setFullCompartmentChecks(bool enabled) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting()); fullCompartmentChecks = enabled; } @@ -8313,7 +8284,7 @@ bool GCRuntime::selectForMarking(JSObject* object) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting()); return selectedForMarking.ref().append(object); } @@ -8326,7 +8297,7 @@ void GCRuntime::setDeterministic(bool enabled) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting()); deterministicOnly = enabled; } #endif @@ -8498,21 +8469,23 @@ } JS::AutoEnterCycleCollection::AutoEnterCycleCollection(JSRuntime* rt) + : runtime_(rt) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); - TlsContext.get()->heapState = HeapState::CycleCollecting; + MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt)); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); + runtime_->heapState_ = HeapState::CycleCollecting; } JS::AutoEnterCycleCollection::~AutoEnterCycleCollection() { - MOZ_ASSERT(JS::CurrentThreadIsHeapCycleCollecting()); - TlsContext.get()->heapState = HeapState::Idle; + MOZ_ASSERT(JS::RuntimeHeapIsCycleCollecting()); + runtime_->heapState_ = HeapState::Idle; } JS::AutoAssertGCCallback::AutoAssertGCCallback() : AutoSuppressGCAnalysis() { - MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsCollecting()); } #endif // DEBUG @@ -8807,7 +8780,7 @@ JS_PUBLIC_API(bool) JS::IsIncrementalBarrierNeeded(JSContext* cx) { - if (JS::CurrentThreadIsHeapBusy()) + if (JS::RuntimeHeapIsBusy()) return false; auto state = cx->runtime()->gc.state(); @@ -8820,7 +8793,7 @@ if (!obj) return; - MOZ_ASSERT(!JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting()); JSObject::writeBarrierPre(obj); } @@ -8834,7 +8807,7 @@ if (!thing) return; - MOZ_ASSERT(!JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMajorCollecting()); DispatchTyped(IncrementalReadBarrierFunctor(), thing); } @@ -9197,13 +9170,13 @@ // of cells that will be marked black by the next GC slice in an incremental // GC. For performance reasons we don't do this in CellIsMarkedGrayIfKnown. - // TODO: I'd like to AssertHeapIsIdle() here, but this ends up getting - // called during GC and while iterating the heap for memory reporting. - MOZ_ASSERT(!JS::CurrentThreadIsHeapCycleCollecting()); - if (!CanCheckGrayBits(cell)) return true; + // TODO: I'd like to AssertHeapIsIdle() here, but this ends up getting + // called during GC and while iterating the heap for memory reporting. + MOZ_ASSERT(!JS::RuntimeHeapIsCycleCollecting()); + auto tc = &cell->asTenured(); if (!detail::CellIsMarkedGray(tc)) return true; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GC-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GC-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GC-inl.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GC-inl.h 2018-06-20 17:29:12.000000000 +0000 @@ -130,7 +130,7 @@ firstThingOffset = Arena::firstThingOffset(kind); thingSize = Arena::thingSize(kind); traceKind = MapAllocToTraceKind(kind); - needsBarrier = mayNeedBarrier && !JS::CurrentThreadIsHeapCollecting(); + needsBarrier = mayNeedBarrier && !JS::RuntimeHeapIsCollecting(); reset(arena); } @@ -188,7 +188,7 @@ explicit ArenaCellIter(Arena* arena) : ArenaCellIterImpl(arena, CellIterMayNeedBarrier) { - MOZ_ASSERT(JS::CurrentThreadIsHeapTracing()); + MOZ_ASSERT(JS::RuntimeHeapIsTracing()); } }; @@ -217,7 +217,7 @@ // If called from outside a GC, ensure that the heap is in a state // that allows us to iterate. - if (!JS::CurrentThreadIsHeapBusy()) { + if (!JS::RuntimeHeapIsBusy()) { // Assert that no GCs can occur while a ZoneCellIter is live. nogc.emplace(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCInternals.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCInternals.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCInternals.h 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCInternals.h 2018-06-20 17:29:12.000000000 +0000 @@ -14,6 +14,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/Maybe.h" +#include "gc/GC.h" #include "gc/RelocationOverlay.h" #include "gc/Zone.h" #include "vm/HelperThreads.h" @@ -22,43 +23,94 @@ namespace js { namespace gc { -/* - * This class should be used by any code that needs to exclusive access to the - * heap in order to trace through it... - */ -class MOZ_RAII AutoTraceSession -{ - public: - explicit AutoTraceSession(JSRuntime* rt, JS::HeapState state = JS::HeapState::Tracing); - ~AutoTraceSession(); - - // Constructing an AutoTraceSession takes the exclusive access lock, but GC - // may release it during a trace session if we're not collecting the atoms - // zone. - mozilla::Maybe maybeLock; +class MOZ_RAII AutoCheckCanAccessAtomsDuringGC +{ +#ifdef DEBUG + JSRuntime* runtime; + + public: + explicit AutoCheckCanAccessAtomsDuringGC(JSRuntime* rt) + : runtime(rt) + { + // Ensure we're only used from within the GC. + MOZ_ASSERT(JS::RuntimeHeapIsMajorCollecting()); - AutoLockForExclusiveAccess& lock() { - return maybeLock.ref(); + // Ensure there is no off-thread parsing running. + MOZ_ASSERT(!rt->hasHelperThreadZones()); + + // Set up a check to assert if we try to start an off-thread parse. + runtime->setOffThreadParsingBlocked(true); + } + ~AutoCheckCanAccessAtomsDuringGC() { + runtime->setOffThreadParsingBlocked(false); } +#else + public: + explicit AutoCheckCanAccessAtomsDuringGC(JSRuntime* rt) {} +#endif +}; + +// Abstract base class for exclusive heap access for tracing or GC. +class MOZ_RAII AutoHeapSession +{ + public: + ~AutoHeapSession(); protected: - JSRuntime* runtime; + AutoHeapSession(JSRuntime* rt, JS::HeapState state); private: - AutoTraceSession(const AutoTraceSession&) = delete; - void operator=(const AutoTraceSession&) = delete; + AutoHeapSession(const AutoHeapSession&) = delete; + void operator=(const AutoHeapSession&) = delete; + JSRuntime* runtime; JS::HeapState prevState; AutoGeckoProfilerEntry profilingStackFrame; }; -class MOZ_RAII AutoPrepareForTracing +class MOZ_RAII AutoGCSession : public AutoHeapSession { - mozilla::Maybe session_; + public: + explicit AutoGCSession(JSRuntime* rt, JS::HeapState state) + : AutoHeapSession(rt, state) + {} + AutoCheckCanAccessAtomsDuringGC& checkAtomsAccess() { + return maybeCheckAtomsAccess.ref(); + } + + // During a GC we can check that it's not possible for anything else to be + // using the atoms zone. + mozilla::Maybe maybeCheckAtomsAccess; +}; + +class MOZ_RAII AutoTraceSession : public AutoLockForExclusiveAccess, + public AutoHeapSession +{ + public: + explicit AutoTraceSession(JSRuntime* rt) + : AutoLockForExclusiveAccess(rt), + AutoHeapSession(rt, JS::HeapState::Tracing) + {} +}; + +struct MOZ_RAII AutoFinishGC +{ + explicit AutoFinishGC(JSContext* cx) { + FinishGC(cx); + } +}; + +// This class should be used by any code that needs to exclusive access to the +// heap in order to trace through it. +class MOZ_RAII AutoPrepareForTracing : private AutoFinishGC, + public AutoTraceSession +{ public: - explicit AutoPrepareForTracing(JSContext* cx); - AutoTraceSession& session() { return session_.ref(); } + explicit AutoPrepareForTracing(JSContext* cx) + : AutoFinishGC(cx), + AutoTraceSession(cx->runtime()) + {} }; AbortReason diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCMarker.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCMarker.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCMarker.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCMarker.h 2018-06-20 17:29:11.000000000 +0000 @@ -14,6 +14,7 @@ namespace js { +class AutoAccessAtomsZone; class WeakMapBase; static const size_t NON_INCREMENTAL_MARK_STACK_BASE_CAPACITY = 4096; @@ -281,7 +282,7 @@ void setGCMode(JSGCMode mode) { stack.setGCMode(mode); } size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, - const AutoLockForExclusiveAccess& lock) const; + const AutoAccessAtomsZone& access) const; #ifdef DEBUG diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCRuntime.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCRuntime.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/GCRuntime.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/GCRuntime.h 2018-06-20 17:29:12.000000000 +0000 @@ -26,6 +26,7 @@ namespace js { +class AutoAccessAtomsZone; class AutoLockGC; class AutoLockGCBgAlloc; class AutoLockHelperThreadState; @@ -37,6 +38,7 @@ using ZoneVector = Vector; class AutoCallGCCallbacks; +class AutoGCSession; class AutoRunParallelTask; class AutoTraceSession; class MarkingValidator; @@ -264,7 +266,7 @@ MarkRuntime }; void traceRuntime(JSTracer* trc, AutoTraceSession& session); - void traceRuntimeForMinorGC(JSTracer* trc, AutoTraceSession& session); + void traceRuntimeForMinorGC(JSTracer* trc, AutoGCSession& session); void purgeRuntimeForMinorGC(); @@ -540,8 +542,8 @@ void requestMajorGC(JS::gcreason::Reason reason); SliceBudget defaultBudget(JS::gcreason::Reason reason, int64_t millis); IncrementalResult budgetIncrementalGC(bool nonincrementalByAPI, JS::gcreason::Reason reason, - SliceBudget& budget, AutoTraceSession& session); - IncrementalResult resetIncrementalGC(AbortReason reason, AutoTraceSession& session); + SliceBudget& budget, AutoGCSession& session); + IncrementalResult resetIncrementalGC(AbortReason reason, AutoGCSession& session); // Assert if the system state is such that we should never // receive a request to do GC work. @@ -557,24 +559,21 @@ JS::gcreason::Reason reason); bool shouldRepeatForDeadZone(JS::gcreason::Reason reason); void incrementalCollectSlice(SliceBudget& budget, JS::gcreason::Reason reason, - AutoTraceSession& session); + AutoGCSession& session); friend class AutoCallGCCallbacks; void maybeCallGCCallback(JSGCStatus status); - void changeToNonIncrementalGC(); void pushZealSelectedObjects(); void purgeRuntime(); - MOZ_MUST_USE bool beginMarkPhase(JS::gcreason::Reason reason, AutoTraceSession& session); - bool prepareZonesForCollection(JS::gcreason::Reason reason, bool* isFullOut, - AutoLockForExclusiveAccess& lock); + MOZ_MUST_USE bool beginMarkPhase(JS::gcreason::Reason reason, AutoGCSession& session); + bool prepareZonesForCollection(JS::gcreason::Reason reason, bool* isFullOut); bool shouldPreserveJITCode(JS::Realm* realm, int64_t currentTime, JS::gcreason::Reason reason, bool canAllocateMoreCode); - void traceRuntimeForMajorGC(JSTracer* trc, AutoTraceSession& session); - void traceRuntimeAtoms(JSTracer* trc, AutoLockForExclusiveAccess& lock); + void traceRuntimeForMajorGC(JSTracer* trc, AutoGCSession& session); + void traceRuntimeAtoms(JSTracer* trc, const AutoAccessAtomsZone& atomsAccess); void traceKeptAtoms(JSTracer* trc); - void traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark, - AutoTraceSession& session); + void traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark); void maybeDoCycleCollection(); void markCompartments(); IncrementalProgress drainMarkStack(SliceBudget& sliceBudget, gcstats::PhaseKind phase); @@ -586,7 +585,7 @@ void markAllWeakReferences(gcstats::PhaseKind phase); void markAllGrayReferences(gcstats::PhaseKind phase); - void beginSweepPhase(JS::gcreason::Reason reason, AutoTraceSession& session); + void beginSweepPhase(JS::gcreason::Reason reason, AutoGCSession& session); void groupZonesForSweeping(JS::gcreason::Reason reason); MOZ_MUST_USE bool findInterZoneEdges(); void getNextSweepGroup(); @@ -619,7 +618,7 @@ bool shouldCompact(); void beginCompactPhase(); IncrementalProgress compactPhase(JS::gcreason::Reason reason, SliceBudget& sliceBudget, - AutoTraceSession& session); + AutoGCSession& session); void endCompactPhase(); void sweepTypesAfterCompacting(Zone* zone); void sweepZoneAfterCompacting(Zone* zone); @@ -629,14 +628,14 @@ void updateCellPointers(Zone* zone, AllocKinds kinds, size_t bgTaskCount); void updateAllCellPointers(MovingTracer* trc, Zone* zone); void updateZonePointersToRelocatedCells(Zone* zone); - void updateRuntimePointersToRelocatedCells(AutoTraceSession& session); + void updateRuntimePointersToRelocatedCells(AutoGCSession& session); void protectAndHoldArenas(Arena* arenaList); void unprotectHeldRelocatedArenas(); void releaseRelocatedArenas(Arena* arenaList); void releaseRelocatedArenasWithoutUnlocking(Arena* arenaList, const AutoLockGC& lock); void finishCollection(); - void computeNonIncrementalMarkingForValidation(AutoTraceSession& session); + void computeNonIncrementalMarkingForValidation(AutoGCSession& session); void validateIncrementalMarking(); void finishMarkingValidation(); @@ -993,7 +992,6 @@ friend class js::GCHelperState; friend class MarkingValidator; - friend class AutoTraceSession; friend class AutoEnterIteration; }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Marking.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Marking.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Marking.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Marking.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -268,7 +268,7 @@ * thread during compacting GC and reading the contents of the thing by * IsThingPoisoned would be racy in this case. */ - MOZ_ASSERT_IF(JS::CurrentThreadIsHeapBusy() && + MOZ_ASSERT_IF(JS::RuntimeHeapIsBusy() && !zone->isGCCompacting() && !rt->gc.isBackgroundSweeping(), !IsThingPoisoned(thing) || !InFreeList(thing->asTenured().arena(), thing)); @@ -2563,7 +2563,7 @@ size_t GCMarker::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, - const AutoLockForExclusiveAccess& lock) const + const AutoAccessAtomsZone& access) const { size_t size = stack.sizeOfExcludingThis(mallocSizeOf); for (ZonesIter zone(runtime(), WithAtoms); !zone.done(); zone.next()) @@ -2575,7 +2575,7 @@ Zone* GCMarker::stackContainsCrossZonePointerTo(const Cell* target) const { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); Zone* targetZone = target->asTenured().zone(); @@ -3214,7 +3214,7 @@ MOZ_ASSERT_IF(!ThingIsPermanentAtomOrWellKnownSymbol(*thingp), CurrentThreadCanAccessRuntime(rt) || CurrentThreadCanAccessZone((*thingp)->zoneFromAnyThread()) || - (JS::CurrentThreadIsHeapCollecting() && rt->gc.state() == State::Sweep)); + (JS::RuntimeHeapIsCollecting() && rt->gc.state() == State::Sweep)); #endif } @@ -3299,7 +3299,7 @@ return false; if (IsInsideNursery(thing)) { - return JS::CurrentThreadIsHeapMinorCollecting() && + return JS::RuntimeHeapIsMinorCollecting() && !Nursery::getForwardedPointer(reinterpret_cast(thingp)); } @@ -3514,8 +3514,8 @@ JS_FRIEND_API(bool) JS::UnmarkGrayGCThingRecursively(JS::GCCellPtr thing) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); - MOZ_ASSERT(!JS::CurrentThreadIsHeapCycleCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCycleCollecting()); JSRuntime* rt = thing.asCell()->runtimeFromMainThread(); gcstats::AutoPhase outerPhase(rt->gc.stats(), gcstats::PhaseKind::BARRIER); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Nursery.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Nursery.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Nursery.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Nursery.cpp 2018-06-20 17:29:11.000000000 +0000 @@ -354,7 +354,7 @@ js::Nursery::allocate(size_t size) { MOZ_ASSERT(isEnabled()); - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(runtime())); MOZ_ASSERT_IF(currentChunk_ == currentStartChunk_, position() >= currentStartPosition_); MOZ_ASSERT(position() % CellAlignBytes == 0); @@ -772,7 +772,7 @@ } } - mozilla::Maybe session; + mozilla::Maybe session; for (ZonesIter zone(rt, SkipAtoms); !zone.done(); zone.next()) { if (shouldPretenure && zone->allocNurseryStrings && zone->tenuredStrings >= 30 * 1000) { if (!session.isSome()) @@ -846,7 +846,7 @@ js::Nursery::doCollection(JS::gcreason::Reason reason, TenureCountCache& tenureCounts) { JSRuntime* rt = runtime(); - AutoTraceSession session(rt, JS::HeapState::MinorCollecting); + AutoGCSession session(rt, JS::HeapState::MinorCollecting); AutoSetThreadIsPerformingGC performingGC; AutoStopVerifyingBarriers av(rt, false); AutoDisableProxyCheck disableStrictProxyChecking; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/PrivateIterators-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/PrivateIterators-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/PrivateIterators-inl.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/PrivateIterators-inl.h 2018-06-20 17:29:12.000000000 +0000 @@ -63,7 +63,7 @@ public: explicit GCZonesIter(JSRuntime* rt, ZoneSelector selector = WithAtoms) : zone(rt, selector) { - MOZ_ASSERT(JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(JS::RuntimeHeapIsBusy()); MOZ_ASSERT_IF(rt->gc.atomsZone->isCollectingFromAnyThread(), !rt->hasHelperThreadZones()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/PublicIterators.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/PublicIterators.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/PublicIterators.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/PublicIterators.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -51,7 +51,7 @@ IterateArenaCallback arenaCallback, IterateCellCallback cellCallback) { - AutoPrepareForTracing prop(cx); + AutoPrepareForTracing prep(cx); for (ZonesIter zone(cx->runtime(), WithAtoms); !zone.done(); zone.next()) { (*zoneCallback)(cx->runtime(), data, zone); @@ -67,7 +67,7 @@ IterateArenaCallback arenaCallback, IterateCellCallback cellCallback) { - AutoPrepareForTracing prop(cx); + AutoPrepareForTracing prep(cx); (*zoneCallback)(cx->runtime(), data, zone); IterateRealmsArenasCellsUnbarriered(cx, zone, data, @@ -120,7 +120,7 @@ void js::IterateGrayObjects(Zone* zone, GCThingCallback cellCallback, void* data) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); AutoPrepareForTracing prep(TlsContext.get()); ::IterateGrayObjects(zone, cellCallback, data); } @@ -129,7 +129,7 @@ js::IterateGrayObjectsUnderCC(Zone* zone, GCThingCallback cellCallback, void* data) { mozilla::DebugOnly rt = zone->runtimeFromMainThread(); - MOZ_ASSERT(JS::CurrentThreadIsHeapCycleCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsCycleCollecting()); MOZ_ASSERT(!rt->gc.isIncrementalGCInProgress()); ::IterateGrayObjects(zone, cellCallback, data); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/RootMarking.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/RootMarking.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/RootMarking.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/RootMarking.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -262,10 +262,9 @@ } void -js::gc::GCRuntime::traceRuntimeForMajorGC(JSTracer* trc, AutoTraceSession& session) +js::gc::GCRuntime::traceRuntimeForMajorGC(JSTracer* trc, AutoGCSession& session) { MOZ_ASSERT(!TlsContext.get()->suppressGC); - MOZ_ASSERT_IF(atomsZone->isCollecting(), session.maybeLock.isSome()); // FinishRoots will have asserted that every root that we do not expect // is gone, so we can simply skip traceRuntime here. @@ -274,14 +273,14 @@ gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK_ROOTS); if (atomsZone->isCollecting()) - traceRuntimeAtoms(trc, session.lock()); + traceRuntimeAtoms(trc, session.checkAtomsAccess()); traceKeptAtoms(trc); Compartment::traceIncomingCrossCompartmentEdgesForZoneGC(trc); - traceRuntimeCommon(trc, MarkRuntime, session); + traceRuntimeCommon(trc, MarkRuntime); } void -js::gc::GCRuntime::traceRuntimeForMinorGC(JSTracer* trc, AutoTraceSession& session) +js::gc::GCRuntime::traceRuntimeForMinorGC(JSTracer* trc, AutoGCSession& session) { MOZ_ASSERT(!TlsContext.get()->suppressGC); @@ -296,7 +295,7 @@ jit::JitRuntime::TraceJitcodeGlobalTableForMinorGC(trc); - traceRuntimeCommon(trc, TraceRuntime, session); + traceRuntimeCommon(trc, TraceRuntime); } void @@ -308,7 +307,7 @@ rt->gc.evictNursery(); AutoPrepareForTracing prep(rt->mainContextFromOwnThread()); gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP); - rt->gc.traceRuntime(trc, prep.session()); + rt->gc.traceRuntime(trc, prep); } void @@ -317,18 +316,19 @@ MOZ_ASSERT(!rt->isBeingDestroyed()); gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK_ROOTS); - traceRuntimeAtoms(trc, session.lock()); - traceRuntimeCommon(trc, TraceRuntime, session); + + traceRuntimeAtoms(trc, session); + traceRuntimeCommon(trc, TraceRuntime); } void -js::gc::GCRuntime::traceRuntimeAtoms(JSTracer* trc, AutoLockForExclusiveAccess& lock) +js::gc::GCRuntime::traceRuntimeAtoms(JSTracer* trc, const AutoAccessAtomsZone& access) { gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK_RUNTIME_DATA); TracePermanentAtoms(trc); - TraceAtoms(trc, lock); + TraceAtoms(trc, access); TraceWellKnownSymbols(trc); - jit::JitRuntime::Trace(trc, lock); + jit::JitRuntime::Trace(trc, access); } void @@ -344,8 +344,7 @@ } void -js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark, - AutoTraceSession& session) +js::gc::GCRuntime::traceRuntimeCommon(JSTracer* trc, TraceOrMarkRuntime traceOrMark) { { gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK_STACK); @@ -386,10 +385,10 @@ r->traceRoots(trc, traceOrMark); // Trace helper thread roots. - HelperThreadState().trace(trc, session); + HelperThreadState().trace(trc); // Trace the embedding's black and gray roots. - if (!JS::CurrentThreadIsHeapMinorCollecting()) { + if (!JS::RuntimeHeapIsMinorCollecting()) { gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::MARK_EMBEDDING); /* @@ -450,9 +449,9 @@ grayRootTracer = Callback(nullptr, nullptr); AssertNoRootsTracer trc(rt, TraceWeakMapKeysValues); - AutoPrepareForTracing prep(TlsContext.get()); + AutoTraceSession session(rt); gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP); - traceRuntime(&trc, prep.session()); + traceRuntime(&trc, session); // Restore the wrapper tracing so that we leak instead of leaving dangling // pointers. @@ -528,7 +527,7 @@ inline void BufferGrayRootsTracer::bufferRoot(T* thing) { - MOZ_ASSERT(JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(JS::RuntimeHeapIsBusy()); MOZ_ASSERT(thing); // Check if |thing| is corrupt by calling a method that touches the heap. MOZ_ASSERT(thing->getTraceKind() <= JS::TraceKind::Null); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/StoreBuffer.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/StoreBuffer.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/StoreBuffer.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/StoreBuffer.h 2018-06-20 17:29:11.000000000 +0000 @@ -406,7 +406,7 @@ template void unput(Buffer& buffer, const Edge& edge) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(runtime_)); if (!isEnabled()) return; @@ -416,7 +416,7 @@ template void put(Buffer& buffer, const Edge& edge) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(runtime_)); if (!isEnabled()) return; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Verifier.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Verifier.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Verifier.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Verifier.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -221,7 +221,7 @@ incrementalState = State::MarkRoots; /* Make all the roots be edges emanating from the root node. */ - traceRuntime(trc, prep.session()); + traceRuntime(trc, prep); VerifyNode* node; node = trc->curnode; @@ -655,7 +655,7 @@ void js::gc::CheckHeapAfterGC(JSRuntime* rt) { - AutoTraceSession session(rt, JS::HeapState::Tracing); + AutoTraceSession session(rt); CheckHeapTracer tracer(rt); if (tracer.init()) tracer.check(session); @@ -718,13 +718,13 @@ JS_FRIEND_API(bool) js::CheckGrayMarkingState(JSRuntime* rt) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(!rt->gc.isIncrementalGCInProgress()); if (!rt->gc.areGrayBitsValid()) return true; gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP); - AutoTraceSession session(rt, JS::HeapState::Tracing); + AutoTraceSession session(rt); CheckGrayMarkingTracer tracer(rt); if (!tracer.init()) return true; // Ignore failure diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/WeakMap.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/WeakMap.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/WeakMap.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/WeakMap.h 2018-06-20 17:29:12.000000000 +0000 @@ -200,7 +200,7 @@ } void trace(JSTracer* trc) override { - MOZ_ASSERT_IF(JS::CurrentThreadIsHeapBusy(), isInList()); + MOZ_ASSERT_IF(JS::RuntimeHeapIsBusy(), isInList()); TraceNullableEdge(trc, &memberOf, "WeakMap owner"); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Zone.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Zone.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Zone.cpp 2018-06-11 13:02:16.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Zone.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -61,12 +61,12 @@ data(this, nullptr), isSystem(this, false), #ifdef DEBUG - gcLastSweepGroupIndex(this, 0), + gcLastSweepGroupIndex(0), #endif jitZone_(this, nullptr), gcScheduled_(false), gcScheduledSaved_(false), - gcPreserveCode_(this, false), + gcPreserveCode_(false), keepShapeTables_(this, false), listNext_(NotOnList) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Zone.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Zone.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gc/Zone.h 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gc/Zone.h 2018-06-20 17:29:11.000000000 +0000 @@ -226,7 +226,7 @@ bool hasMarkedRealms(); - void scheduleGC() { MOZ_ASSERT(!CurrentThreadIsHeapBusy()); gcScheduled_ = true; } + void scheduleGC() { MOZ_ASSERT(!RuntimeHeapIsBusy()); gcScheduled_ = true; } void unscheduleGC() { gcScheduled_ = false; } bool isGCScheduled() { return gcScheduled_; } @@ -238,7 +238,7 @@ bool canCollect(); void changeGCState(GCState prev, GCState next) { - MOZ_ASSERT(CurrentThreadIsHeapBusy()); + MOZ_ASSERT(RuntimeHeapIsBusy()); MOZ_ASSERT(gcState() == prev); MOZ_ASSERT_IF(next != NoGC, canCollect()); gcState_ = next; @@ -250,7 +250,7 @@ } bool isCollectingFromAnyThread() const { - if (CurrentThreadIsHeapCollecting()) + if (RuntimeHeapIsCollecting()) return gcState_ != NoGC; else return needsIncrementalBarrier(); @@ -260,7 +260,7 @@ // tracer. bool requireGCTracer() const { JSRuntime* rt = runtimeFromAnyThread(); - return CurrentThreadIsHeapMajorCollecting() && !rt->gc.isHeapCompacting() && gcState_ != NoGC; + return RuntimeHeapIsMajorCollecting() && !rt->gc.isHeapCompacting() && gcState_ != NoGC; } bool shouldMarkInZone() const { @@ -583,7 +583,7 @@ js::ZoneData isSystem; #ifdef DEBUG - js::ZoneData gcLastSweepGroupIndex; + js::MainThreadData gcLastSweepGroupIndex; #endif static js::HashNumber UniqueIdToHash(uint64_t uid) { @@ -737,11 +737,11 @@ uint32_t detachedTypedObjects = 0; private: - js::ZoneData jitZone_; + js::ZoneOrGCTaskData jitZone_; js::MainThreadData gcScheduled_; js::MainThreadData gcScheduledSaved_; - js::ZoneData gcPreserveCode_; + js::MainThreadData gcPreserveCode_; js::ZoneData keepShapeTables_; // Allow zones to be linked into a list diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/gdb/gdb-tests.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/gdb/gdb-tests.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/gdb/gdb-tests.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/gdb/gdb-tests.cpp 2018-06-20 17:29:11.000000000 +0000 @@ -92,7 +92,7 @@ /* Populate the global object with the standard globals, like Object and Array. */ - checkBool(JS_InitStandardClasses(cx, global)); + checkBool(JS::InitRealmStandardClasses(cx)); argv++; while (*argv) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/irregexp/RegExpParser.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/irregexp/RegExpParser.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/irregexp/RegExpParser.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/irregexp/RegExpParser.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -1821,7 +1821,7 @@ break; case '{': { if (unicode_) - return ReportError(JSMSG_RAW_BRACE_IN_REGEP); + return ReportError(JSMSG_RAW_BRACE_IN_REGEXP); int dummy; if (ParseIntervalQuantifier(&dummy, &dummy)) return ReportError(JSMSG_NOTHING_TO_REPEAT); @@ -1839,9 +1839,9 @@ else if (unicode::IsTrailSurrogate(c)) builder->AddAtom(TrailSurrogateAtom(alloc, c)); else if (c == ']') - return ReportError(JSMSG_RAW_BRACKET_IN_REGEP); + return ReportError(JSMSG_RAW_BRACKET_IN_REGEXP); else if (c == '}') - return ReportError(JSMSG_RAW_BRACE_IN_REGEP); + return ReportError(JSMSG_RAW_BRACE_IN_REGEXP); else builder->AddCharacter(c); Advance(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/BaselineIC.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/BaselineIC.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/BaselineIC.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/BaselineIC.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -2350,9 +2350,7 @@ if (!ConstructFromStack(cx, callArgs)) return false; res.set(callArgs.rval()); - } else if ((op == JSOP_EVAL || op == JSOP_STRICTEVAL) && - frame->environmentChain()->global().valueIsEval(callee)) - { + } else if ((op == JSOP_EVAL || op == JSOP_STRICTEVAL) && cx->global()->valueIsEval(callee)) { if (!DirectEval(cx, callArgs.get(0), res)) return false; } else { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/CacheIR.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/CacheIR.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/CacheIR.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/CacheIR.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -1111,7 +1111,7 @@ // Take the unwrapped object's global, and wrap in a // this-compartment wrapper. This is what will be stored in the IC // keep the compartment alive. - RootedObject wrappedTargetGlobal(cx_, &unwrapped->global()); + RootedObject wrappedTargetGlobal(cx_, &unwrapped->deprecatedGlobal()); if (!cx_->compartment()->wrap(cx_, &wrappedTargetGlobal)) return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonBuilder.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonBuilder.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonBuilder.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonBuilder.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -1635,8 +1635,7 @@ } MOZ_ASSERT(*info().osrPc() == JSOP_LOOPENTRY); - // Skip over the LOOPENTRY to match. - return GetNextPc(info().osrPc()) == entryPc; + return info().osrPc() == entryPc; } AbortReasonOr @@ -1741,17 +1740,18 @@ setCurrent(header); pc = header->pc(); - initLoopEntry(); return Ok(); } -bool -IonBuilder::initLoopEntry() +AbortReasonOr +IonBuilder::jsop_loopentry() { + MOZ_ASSERT(*pc == JSOP_LOOPENTRY); + current->add(MInterruptCheck::New(alloc())); insertRecompileCheck(); - return true; + return Ok(); } AbortReasonOr @@ -1809,7 +1809,6 @@ case JSOP_THROW: case JSOP_GOTO: case JSOP_CONDSWITCH: - case JSOP_LOOPENTRY: case JSOP_TABLESWITCH: case JSOP_CASE: case JSOP_DEFAULT: @@ -2377,7 +2376,10 @@ } case JSOP_IMPORTMETA: - return jsop_importmeta(); + return jsop_importmeta(); + + case JSOP_LOOPENTRY: + return jsop_loopentry(); // ===== NOT Yet Implemented ===== // Read below! @@ -2506,7 +2508,6 @@ setCurrent(header); pc = header->pc(); - initLoopEntry(); return Ok(); } @@ -6635,7 +6636,8 @@ IonBuilder::newOsrPreheader(MBasicBlock* predecessor, jsbytecode* loopEntry, jsbytecode* beforeLoopEntry) { - MOZ_ASSERT(loopEntry == GetNextPc(info().osrPc())); + MOZ_ASSERT(JSOp(*loopEntry) == JSOP_LOOPENTRY); + MOZ_ASSERT(loopEntry == info().osrPc()); // Create two blocks: one for the OSR entry with no predecessors, one for // the preheader, which has the OSR entry block as a predecessor. The diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonBuilder.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonBuilder.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonBuilder.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonBuilder.h 2018-06-20 17:29:13.000000000 +0000 @@ -125,7 +125,6 @@ // Restarts processing of a loop if the type information at its header was // incomplete. AbortReasonOr restartLoop(const CFGBlock* header); - bool initLoopEntry(); // Please see the Big Honkin' Comment about how resume points work in // IonBuilder.cpp, near the definition for this function. @@ -509,6 +508,7 @@ AbortReasonOr jsop_label(); AbortReasonOr jsop_andor(JSOp op); AbortReasonOr jsop_dup2(); + AbortReasonOr jsop_loopentry(); AbortReasonOr jsop_loophead(jsbytecode* pc); AbortReasonOr jsop_compare(JSOp op); AbortReasonOr jsop_compare(JSOp op, MDefinition* left, MDefinition* right); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonControlFlow.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonControlFlow.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/IonControlFlow.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/IonControlFlow.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -933,7 +933,7 @@ jsbytecode* exitpc = GetNextPc(ifne); jsbytecode* continuepc = pc; - CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry)); + CFGBlock* header = CFGBlock::New(alloc(), loopEntry); CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, stackPhiCount); if (LoopEntryCanIonOsr(loopEntry)) @@ -1481,7 +1481,7 @@ MOZ_ASSERT(JSOp(*loopEntry) == JSOP_LOOPENTRY); - CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry)); + CFGBlock* header = CFGBlock::New(alloc(), loopEntry); CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, 0); if (LoopEntryCanIonOsr(loopEntry)) @@ -1549,7 +1549,7 @@ jsbytecode* loopEntry = GetNextPc(loopHead); - CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry)); + CFGBlock* header = CFGBlock::New(alloc(), loopEntry); CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, 0); if (LoopEntryCanIonOsr(loopEntry)) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/Ion.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/Ion.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/Ion.cpp 2018-06-11 13:02:17.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/Ion.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -582,16 +582,16 @@ } /* static */ void -JitRuntime::Trace(JSTracer* trc, AutoLockForExclusiveAccess& lock) +JitRuntime::Trace(JSTracer* trc, const AutoAccessAtomsZone& access) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMinorCollecting()); // Shared stubs are allocated in the atoms zone, so do not iterate // them after the atoms heap after it has been "finished." if (trc->runtime()->atomsAreFinished()) return; - Zone* zone = trc->runtime()->atomsZone(lock); + Zone* zone = trc->runtime()->atomsZone(access); for (auto i = zone->cellIter(); !i.done(); i.next()) { JitCode* code = i; TraceRoot(trc, &code, "wrapper"); @@ -778,7 +778,7 @@ } if (dataRelocTableBytes_) { // If we're moving objects, we need writable JIT code. - bool movingObjects = JS::CurrentThreadIsHeapMinorCollecting() || zone()->isGCCompacting(); + bool movingObjects = JS::RuntimeHeapIsMinorCollecting() || zone()->isGCCompacting(); MaybeAutoWritableJitCode awjc(this, movingObjects ? Reprotect : DontReprotect); uint8_t* start = code_ + dataRelocTableOffset(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitcodeMap.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitcodeMap.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitcodeMap.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitcodeMap.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -740,7 +740,7 @@ // Trace only entries that can directly contain nursery pointers. MOZ_ASSERT(trc->runtime()->geckoProfiler().enabled()); - MOZ_ASSERT(JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsMinorCollecting()); JSContext* cx = trc->runtime()->mainContextFromOwnThread(); AutoSuppressProfilerSampling suppressSampling(cx); @@ -790,7 +790,7 @@ // The approach above obviates the need for read barriers. The assumption // above is checked in JitcodeGlobalTable::lookupForSampler. - MOZ_ASSERT(!JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMinorCollecting()); AutoSuppressProfilerSampling suppressSampling(TlsContext.get()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitFrames.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitFrames.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitFrames.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitFrames.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -1340,7 +1340,7 @@ void UpdateJitActivationsForMinorGC(JSRuntime* rt) { - MOZ_ASSERT(JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsMinorCollecting()); JSContext* cx = rt->mainContextFromOwnThread(); for (JitActivationIterator activations(cx); !activations.done(); ++activations) { for (OnlyJSJitFrameIter iter(activations); !iter.done(); ++iter) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitRealm.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitRealm.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JitRealm.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JitRealm.h 2018-06-20 17:29:13.000000000 +0000 @@ -193,7 +193,7 @@ ~JitRuntime(); MOZ_MUST_USE bool initialize(JSContext* cx, js::AutoLockForExclusiveAccess& lock); - static void Trace(JSTracer* trc, js::AutoLockForExclusiveAccess& lock); + static void Trace(JSTracer* trc, const js::AutoAccessAtomsZone& access); static void TraceJitcodeGlobalTableForMinorGC(JSTracer* trc); static MOZ_MUST_USE bool MarkJitcodeGlobalTableIteratively(GCMarker* marker); static void SweepJitcodeGlobalTable(JSRuntime* rt); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JSJitFrameIter.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JSJitFrameIter.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/JSJitFrameIter.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/JSJitFrameIter.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -409,7 +409,7 @@ if (!TlsContext.get()->isProfilerSamplingEnabled()) return true; - if (JS::CurrentThreadIsHeapMinorCollecting()) + if (JS::RuntimeHeapIsMinorCollecting()) return true; JitRuntime* jitrt = rt->jitRuntime(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/VMFunctions.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/VMFunctions.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/VMFunctions.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/VMFunctions.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -750,9 +750,10 @@ PostWriteElementBarrier(JSRuntime* rt, JSObject* obj, int32_t index); void -PostGlobalWriteBarrier(JSRuntime* rt, JSObject* obj) +PostGlobalWriteBarrier(JSRuntime* rt, GlobalObject* obj) { - MOZ_ASSERT(obj->is()); + MOZ_ASSERT(obj->JSObject::is()); + if (!obj->realm()->globalWriteBarriered) { PostWriteBarrier(rt, obj); obj->realm()->globalWriteBarriered = 1; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/VMFunctions.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/VMFunctions.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit/VMFunctions.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit/VMFunctions.h 2018-06-20 17:29:12.000000000 +0000 @@ -751,7 +751,7 @@ void GetDynamicName(JSContext* cx, JSObject* scopeChain, JSString* str, Value* vp); void PostWriteBarrier(JSRuntime* rt, js::gc::Cell* cell); -void PostGlobalWriteBarrier(JSRuntime* rt, JSObject* obj); +void PostGlobalWriteBarrier(JSRuntime* rt, GlobalObject* obj); enum class IndexInBounds { Yes, Maybe }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/auto-regress/bug1468629.js firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/auto-regress/bug1468629.js --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/auto-regress/bug1468629.js 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/auto-regress/bug1468629.js 2018-06-20 17:29:11.000000000 +0000 @@ -0,0 +1,11 @@ +function lfEvalInCache(lfCode, lfIncremental = false, lfRunOnce = false) { + let ctx = {}; + let code = cacheEntry(lfCode); + ctx_save = Object.create(ctx, { saveIncrementalBytecode: { value: true } }); + try { evaluate(code, ctx_save); } catch(exc) {} + try { evaluate(code, Object.create(ctx_save, { loadBytecode: { value: true } })); } catch(exc) {} +} +lfEvalInCache(` + function q() {} + Object.freeze(this); +`, false, true); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/modules/bug-1462286.js firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/modules/bug-1462286.js --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/modules/bug-1462286.js 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/modules/bug-1462286.js 2018-06-20 17:29:13.000000000 +0000 @@ -0,0 +1,10 @@ +load(libdir + "dummyModuleResolveHook.js"); + +let a = moduleRepo['a'] = parseModule(` + export var { ... get } = { x: "foo" }; +`); + +let m = parseModule("import { get } from 'a'; export { get };"); +m.declarationInstantiation(); +m.evaluation() +assertEq(getModuleEnvironmentValue(m, "get").x, "foo"); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/wasm/binary.js firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/wasm/binary.js --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jit-test/tests/wasm/binary.js 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jit-test/tests/wasm/binary.js 2018-06-20 17:29:13.000000000 +0000 @@ -2,8 +2,7 @@ const { extractStackFrameFunction } = WasmHelpers; -const Module = WebAssembly.Module; -const CompileError = WebAssembly.CompileError; +const { Module, RuntimeError, CompileError } = WebAssembly; const magicError = /failed to match magic number/; const unknownSection = /expected custom section/; @@ -461,6 +460,15 @@ assertWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), [4, 1]])])), nameWarning); assertNoWarning(() => wasmEval(moduleWithSections([nameSection([moduleNameSubsection('hi'), [4, 1, 42]])]))); +// Provide a module name but no function names. +assertErrorMessage(() => wasmEval(moduleWithSections([ + v2vSigSection, + declSection([0]), + exportSection([{funcIndex: 0, name: "f"}]), + bodySection([funcBody({locals:[], body:[UnreachableCode]})]), + nameSection([moduleNameSubsection('hi')])]) +).f(), RuntimeError, /unreachable/); + // Diagnose nonstandard block signature types. for (var bad of [0xff, 0, 1, 0x3f]) assertErrorMessage(() => wasmEval(moduleWithSections([sigSection([v2vSig]), declSection([0]), bodySection([funcBody({locals:[], body:[BlockCode, bad, EndCode]})])])), CompileError, /invalid inline block type/); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi.cpp 2018-06-20 17:29:14.000000000 +0000 @@ -323,7 +323,7 @@ void AssertHeapIsIdle() { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); } } // namespace js @@ -331,7 +331,7 @@ static void AssertHeapIsIdleOrIterating() { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); } static void @@ -341,7 +341,7 @@ * We allow some functions to be called during a GC as long as the argument * is a flat string, since that will not cause allocation. */ - MOZ_ASSERT_IF(JS::CurrentThreadIsHeapBusy(), str->isFlat()); + MOZ_ASSERT_IF(JS::RuntimeHeapIsBusy(), str->isFlat()); } JS_PUBLIC_API(bool) @@ -946,19 +946,6 @@ return RemapAllWrappersForObject(cx, obj, obj); } -JS_PUBLIC_API(bool) -JS_InitStandardClasses(JSContext* cx, HandleObject obj) -{ - MOZ_ASSERT(!cx->zone()->isAtomsZone()); - AssertHeapIsIdle(); - CHECK_REQUEST(cx); - - assertSameCompartment(cx, obj); - - Rooted global(cx, &obj->global()); - return GlobalObject::initStandardClasses(cx, global); -} - typedef struct JSStdName { size_t atomOffset; /* offset of atom pointer in JSAtomState */ JSProtoKey key; @@ -1224,54 +1211,11 @@ } JS_PUBLIC_API(JSObject*) -JS_GetObjectPrototype(JSContext* cx, HandleObject forObj) -{ - CHECK_REQUEST(cx); - assertSameCompartment(cx, forObj); - Rooted global(cx, &forObj->global()); - return GlobalObject::getOrCreateObjectPrototype(cx, global); -} - -JS_PUBLIC_API(JSObject*) -JS_GetFunctionPrototype(JSContext* cx, HandleObject forObj) -{ - CHECK_REQUEST(cx); - assertSameCompartment(cx, forObj); - Rooted global(cx, &forObj->global()); - return GlobalObject::getOrCreateFunctionPrototype(cx, global); -} - -JS_PUBLIC_API(JSObject*) -JS_GetArrayPrototype(JSContext* cx, HandleObject forObj) -{ - CHECK_REQUEST(cx); - assertSameCompartment(cx, forObj); - Rooted global(cx, &forObj->global()); - return GlobalObject::getOrCreateArrayPrototype(cx, global); -} - -JS_PUBLIC_API(JSObject*) -JS_GetErrorPrototype(JSContext* cx) -{ - CHECK_REQUEST(cx); - Rooted global(cx, cx->global()); - return GlobalObject::getOrCreateCustomErrorPrototype(cx, global, JSEXN_ERR); -} - -JS_PUBLIC_API(JSObject*) -JS_GetIteratorPrototype(JSContext* cx) -{ - CHECK_REQUEST(cx); - Rooted global(cx, cx->global()); - return GlobalObject::getOrCreateIteratorPrototype(cx, global); -} - -JS_PUBLIC_API(JSObject*) JS_GetGlobalForObject(JSContext* cx, JSObject* obj) { AssertHeapIsIdle(); assertSameCompartment(cx, obj); - return &obj->global(); + return &obj->deprecatedGlobal(); } extern JS_PUBLIC_API(bool) @@ -1922,7 +1866,8 @@ JS_PUBLIC_API(void) JS_GlobalObjectTraceHook(JSTracer* trc, JSObject* global) { - MOZ_ASSERT(global->is()); + GlobalObject* globalObj = &global->as(); + Realm* globalRealm = globalObj->realm(); // Off thread parsing and compilation tasks create a dummy global which is // then merged back into the host realm. Since it used to be a global, it @@ -1932,14 +1877,14 @@ // Similarly, if we GC when creating the global, we may not have set that // global's realm's global pointer yet. In this case, the realm will not yet // contain anything that needs to be traced. - if (!global->isOwnGlobal(trc)) + if (globalRealm->unsafeUnbarrieredMaybeGlobal() != globalObj) return; // Trace the realm for any GC things that should only stick around if we // know the global is live. - global->realm()->traceGlobal(trc); + globalRealm->traceGlobal(trc); - if (JSTraceOp trace = global->realm()->creationOptions().getTrace()) + if (JSTraceOp trace = globalRealm->creationOptions().getTrace()) trace(trc, global); } @@ -4443,7 +4388,8 @@ cx->clearPendingException(); - char16_t* chars = JS::UTF8CharsToNewTwoByteCharsZ(cx, JS::UTF8Chars(utf8, length), &length).get(); + UniquePtr chars + { JS::UTF8CharsToNewTwoByteCharsZ(cx, JS::UTF8Chars(utf8, length), &length).get() }; if (!chars) return true; @@ -4462,7 +4408,7 @@ return false; frontend::Parser parser(cx, cx->tempLifoAlloc(), - options, chars, length, + options, chars.get(), length, /* foldConstants = */ true, usedNames, nullptr, nullptr, sourceObject, @@ -4479,7 +4425,6 @@ } JS::SetWarningReporter(cx, older); - js_free(chars); return result; } @@ -7149,7 +7094,7 @@ } for (auto&& note : *this) { - js::UniquePtr copied(CopyErrorNote(cx, note.get())); + UniquePtr copied = CopyErrorNote(cx, note.get()); if (!copied) return nullptr; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi.h 2018-06-20 17:29:12.000000000 +0000 @@ -496,13 +496,6 @@ static const unsigned JSFUN_FLAGS_MASK = 0x400; /* - * If set, will allow redefining a non-configurable property, but only on a - * non-DOM global. This is a temporary hack that will need to go away in bug - * 1105518. - */ -static const unsigned JSPROP_REDEFINE_NONCONFIGURABLE = 0x1000; - -/* * Resolve hooks and enumerate hooks must pass this flag when calling * JS_Define* APIs to reify lazily-defined properties. * @@ -1138,16 +1131,6 @@ JS_MarkCrossZoneIdValue(JSContext* cx, const JS::Value& value); /** - * Initialize standard JS class constructors, prototypes, and any top-level - * functions and constants associated with the standard classes (e.g. isNaN - * for Number). - * - * NB: This sets cx's global object to obj if it was null. - */ -extern JS_PUBLIC_API(bool) -JS_InitStandardClasses(JSContext* cx, JS::Handle obj); - -/** * Resolve id, which must contain either a string or an int, to a standard * class name in obj if possible, defining the class's constructor and/or * prototype and storing true in *resolved. If id does not name a standard @@ -1207,41 +1190,6 @@ extern JS_PUBLIC_API(JSProtoKey) JS_IdToProtoKey(JSContext* cx, JS::HandleId id); -/** - * Returns the original value of |Function.prototype| from the global object in - * which |forObj| was created. - */ -extern JS_PUBLIC_API(JSObject*) -JS_GetFunctionPrototype(JSContext* cx, JS::HandleObject forObj); - -/** - * Returns the original value of |Object.prototype| from the global object in - * which |forObj| was created. - */ -extern JS_PUBLIC_API(JSObject*) -JS_GetObjectPrototype(JSContext* cx, JS::HandleObject forObj); - -/** - * Returns the original value of |Array.prototype| from the global object in - * which |forObj| was created. - */ -extern JS_PUBLIC_API(JSObject*) -JS_GetArrayPrototype(JSContext* cx, JS::HandleObject forObj); - -/** - * Returns the original value of |Error.prototype| from the global - * object of the current compartment of cx. - */ -extern JS_PUBLIC_API(JSObject*) -JS_GetErrorPrototype(JSContext* cx); - -/** - * Returns the %IteratorPrototype% object that all built-in iterator prototype - * chains go through for the global object of the current compartment of cx. - */ -extern JS_PUBLIC_API(JSObject*) -JS_GetIteratorPrototype(JSContext* cx); - extern JS_PUBLIC_API(JSObject*) JS_GetGlobalForObject(JSContext* cx, JSObject* obj); @@ -2157,7 +2105,6 @@ JSPROP_IGNORE_VALUE | JSPROP_GETTER | JSPROP_SETTER | - JSPROP_REDEFINE_NONCONFIGURABLE | JSPROP_RESOLVING | SHADOWABLE)) == 0); MOZ_ASSERT(!hasAll(JSPROP_IGNORE_ENUMERATE | JSPROP_ENUMERATE)); @@ -2179,7 +2126,6 @@ MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_PERMANENT)); MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_READONLY)); MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_IGNORE_VALUE)); - MOZ_ASSERT_IF(has(JSPROP_RESOLVING), !has(JSPROP_REDEFINE_NONCONFIGURABLE)); #endif } @@ -2191,7 +2137,6 @@ JSPROP_READONLY | JSPROP_GETTER | JSPROP_SETTER | - JSPROP_REDEFINE_NONCONFIGURABLE | JSPROP_RESOLVING | SHADOWABLE)) == 0); MOZ_ASSERT_IF(isAccessorDescriptor(), has(JSPROP_GETTER) && has(JSPROP_SETTER)); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testDebugger.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testDebugger.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testDebugger.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testDebugger.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -20,7 +20,7 @@ CHECK(g); { JSAutoRealm ae(cx, g); - CHECK(JS_InitStandardClasses(cx, g)); + CHECK(JS::InitRealmStandardClasses(cx)); } JS::RootedObject gWrapper(cx, g); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testGetPropertyDescriptor.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testGetPropertyDescriptor.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testGetPropertyDescriptor.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testGetPropertyDescriptor.cpp 2018-06-20 17:29:14.000000000 +0000 @@ -39,7 +39,7 @@ CHECK_EQUAL(desc.object(), nullptr); CHECK(JS_GetPropertyDescriptor(cx, obj, "toString", &desc)); - JS::RootedObject objectProto(cx, JS_GetObjectPrototype(cx, obj)); + JS::RootedObject objectProto(cx, JS::GetRealmObjectPrototype(cx)); CHECK(objectProto); CHECK_EQUAL(desc.object(), objectProto); CHECK(desc.value().isObject()); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testMutedErrors.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testMutedErrors.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testMutedErrors.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testMutedErrors.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -47,7 +47,7 @@ JS::FireOnNewGlobalHook, globalOptions)); CHECK(global); JSAutoRealm ar(cx, global); - CHECK(JS_InitStandardClasses(cx, global)); + CHECK(JS::InitRealmStandardClasses(cx)); JS::CompileOptions options(cx); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testResolveRecursion.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testResolveRecursion.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/testResolveRecursion.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/testResolveRecursion.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -148,7 +148,7 @@ */ BEGIN_TEST(testResolveRecursion_InitStandardClasses) { - CHECK(JS_InitStandardClasses(cx, global)); + CHECK(JS::InitRealmStandardClasses(cx)); return true; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/tests.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/tests.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsapi-tests/tests.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsapi-tests/tests.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -92,7 +92,7 @@ // Populate the global object with the standard globals like Object and // Array. - if (!JS_InitStandardClasses(cx, newGlobal)) + if (!JS::InitRealmStandardClasses(cx)) return nullptr; global = newGlobal; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsdate.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsdate.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsdate.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsdate.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -2654,8 +2654,7 @@ /* Step 5. */ if (!IsCallable(toISO)) { - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, js::GetErrorMessage, nullptr, - JSMSG_BAD_TOISOSTRING_PROP); + JS_ReportErrorNumberASCII(cx, js::GetErrorMessage, nullptr, JSMSG_BAD_TOISOSTRING_PROP); return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsexn.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsexn.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsexn.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsexn.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -14,6 +14,7 @@ #include "mozilla/Sprintf.h" #include +#include #include "jsapi.h" #include "jsnum.h" @@ -23,6 +24,7 @@ #include "gc/FreeOp.h" #include "gc/Marking.h" #include "js/CharacterEncoding.h" +#include "js/UniquePtr.h" #include "js/Wrapper.h" #include "util/StringBuffer.h" #include "vm/ErrorObject.h" @@ -267,7 +269,7 @@ } template -static T* +static UniquePtr CopyErrorHelper(JSContext* cx, T* report) { /* @@ -298,7 +300,7 @@ if (!cursor) return nullptr; - T* copy = new (cursor) T(); + UniquePtr copy(new (cursor) T()); cursor += sizeof(T); if (report->message()) { @@ -313,13 +315,10 @@ cursor += filenameSize; } - if (!CopyExtraData(cx, &cursor, copy, report)) { - /* js_delete calls destructor for T and js_free for pod_calloc. */ - js_delete(copy); + if (!CopyExtraData(cx, &cursor, copy.get(), report)) return nullptr; - } - MOZ_ASSERT(cursor == (uint8_t*)copy + mallocSize); + MOZ_ASSERT(cursor == (uint8_t*)copy.get() + mallocSize); /* Copy non-pointer members. */ copy->lineno = report->lineno; @@ -329,13 +328,13 @@ return copy; } -JSErrorNotes::Note* +UniquePtr js::CopyErrorNote(JSContext* cx, JSErrorNotes::Note* note) { return CopyErrorHelper(cx, note); } -JSErrorReport* +UniquePtr js::CopyErrorReport(JSContext* cx, JSErrorReport* report) { return CopyErrorHelper(cx, report); @@ -686,12 +685,12 @@ if (!CaptureStack(cx, &stack)) return; - js::ScopedJSFreePtr report(CopyErrorReport(cx, reportp)); + UniquePtr report = CopyErrorReport(cx, reportp); if (!report) return; - RootedObject errObject(cx, ErrorObject::create(cx, exnType, stack, fileName, - lineNumber, columnNumber, &report, messageStr)); + RootedObject errObject(cx, ErrorObject::create(cx, exnType, stack, fileName, lineNumber, + columnNumber, std::move(report), messageStr)); if (!errObject) return; @@ -990,7 +989,7 @@ JSObject* js::CopyErrorObject(JSContext* cx, Handle err) { - js::ScopedJSFreePtr copyReport; + UniquePtr copyReport; if (JSErrorReport* errorReport = err->getErrorReport()) { copyReport = CopyErrorReport(cx, errorReport); if (!copyReport) @@ -1012,7 +1011,7 @@ // Create the Error object. return ErrorObject::create(cx, errorType, stack, fileName, - lineNumber, columnNumber, ©Report, message); + lineNumber, columnNumber, std::move(copyReport), message); } JS_PUBLIC_API(bool) @@ -1023,13 +1022,15 @@ assertSameCompartment(cx, stack, fileName, message); AssertObjectIsSavedFrameOrWrapper(cx, stack); - js::ScopedJSFreePtr rep; - if (report) + js::UniquePtr rep; + if (report) { rep = CopyErrorReport(cx, report); + if (!rep) + return false; + } - RootedObject obj(cx, - js::ErrorObject::create(cx, type, stack, fileName, - lineNumber, columnNumber, &rep, message)); + JSObject* obj = js::ErrorObject::create(cx, type, stack, fileName, lineNumber, columnNumber, + std::move(rep), message); if (!obj) return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsexn.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsexn.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsexn.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsexn.h 2018-06-20 17:29:13.000000000 +0000 @@ -14,15 +14,16 @@ #include "jsapi.h" #include "NamespaceImports.h" +#include "js/UniquePtr.h" #include "vm/JSContext.h" namespace js { class ErrorObject; -JSErrorNotes::Note* +UniquePtr CopyErrorNote(JSContext* cx, JSErrorNotes::Note* note); -JSErrorReport* +UniquePtr CopyErrorReport(JSContext* cx, JSErrorReport* report); JSString* diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsfriendapi.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsfriendapi.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsfriendapi.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsfriendapi.cpp 2018-06-20 17:29:13.000000000 +0000 @@ -385,7 +385,7 @@ JS_FRIEND_API(JSObject*) js::GetGlobalForObjectCrossCompartment(JSObject* obj) { - return &obj->global(); + return &obj->deprecatedGlobal(); } JS_FRIEND_API(JSObject*) @@ -418,8 +418,10 @@ JS_FRIEND_API(void) js::NotifyAnimationActivity(JSObject* obj) { + MOZ_ASSERT(obj->is()); + int64_t timeNow = PRMJ_Now(); - obj->realm()->lastAnimationTime = timeNow; + obj->as().realm()->lastAnimationTime = timeNow; obj->runtimeFromMainThread()->lastAnimationTime = timeNow; } @@ -533,11 +535,9 @@ } JS_FRIEND_API(bool) -js::GetOriginalEval(JSContext* cx, HandleObject scope, MutableHandleObject eval) +js::GetRealmOriginalEval(JSContext* cx, MutableHandleObject eval) { - assertSameCompartment(cx, scope); - Rooted global(cx, &scope->global()); - return GlobalObject::getOrCreateEval(cx, global, eval); + return GlobalObject::getOrCreateEval(cx, cx->global(), eval); } JS_FRIEND_API(void) @@ -1252,9 +1252,9 @@ fprintf(dtrc.output, "# Roots.\n"); { JSRuntime* rt = cx->runtime(); - js::gc::AutoPrepareForTracing prep(cx); + js::gc::AutoTraceSession session(rt); gcstats::AutoPhase ap(rt->gc.stats(), gcstats::PhaseKind::TRACE_HEAP); - rt->gc.traceRuntime(&dtrc, prep.session()); + rt->gc.traceRuntime(&dtrc, session); } fprintf(dtrc.output, "# Weak maps.\n"); @@ -1505,7 +1505,7 @@ js::ToWindowIfWindowProxy(JSObject* obj) { if (IsWindowProxy(obj)) - return &obj->global(); + return &obj->nonCCWGlobal(); return obj; } @@ -1554,7 +1554,7 @@ js::SetRealmValidAccessPtr(JSContext* cx, JS::HandleObject global, bool* accessp) { MOZ_ASSERT(global->is()); - global->realm()->setValidAccessPtr(accessp); + global->as().realm()->setValidAccessPtr(accessp); } JS_FRIEND_API(bool) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsfriendapi.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsfriendapi.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsfriendapi.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsfriendapi.h 2018-06-20 17:29:14.000000000 +0000 @@ -675,7 +675,7 @@ IsFunctionObject(JSObject* obj); JS_FRIEND_API(bool) -IsCrossCompartmentWrapper(JSObject* obj); +IsCrossCompartmentWrapper(const JSObject* obj); static MOZ_ALWAYS_INLINE JS::Compartment* GetObjectCompartment(JSObject* obj) @@ -743,8 +743,7 @@ GetStaticPrototype(JSObject* obj); JS_FRIEND_API(bool) -GetOriginalEval(JSContext* cx, JS::HandleObject scope, - JS::MutableHandleObject eval); +GetRealmOriginalEval(JSContext* cx, JS::MutableHandleObject eval); inline void* GetObjectPrivate(JSObject* obj) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/js.msg firefox-trunk-62.0~a1~hg20180620r423058/js/src/js.msg --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/js.msg 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/js.msg 2018-06-20 17:29:12.000000000 +0000 @@ -518,8 +518,8 @@ MSG_DEF(JSMSG_NOTHING_TO_REPEAT, 0, JSEXN_SYNTAXERR, "nothing to repeat") MSG_DEF(JSMSG_NUMBERS_OUT_OF_ORDER, 0, JSEXN_SYNTAXERR, "numbers out of order in {} quantifier.") MSG_DEF(JSMSG_RANGE_WITH_CLASS_ESCAPE, 0, JSEXN_SYNTAXERR, "character class escape cannot be used in class range in regular expression") -MSG_DEF(JSMSG_RAW_BRACE_IN_REGEP, 0, JSEXN_SYNTAXERR, "raw brace is not allowed in regular expression with unicode flag") -MSG_DEF(JSMSG_RAW_BRACKET_IN_REGEP, 0, JSEXN_SYNTAXERR, "raw bracket is not allowed in regular expression with unicode flag") +MSG_DEF(JSMSG_RAW_BRACE_IN_REGEXP, 0, JSEXN_SYNTAXERR, "raw brace is not allowed in regular expression with unicode flag") +MSG_DEF(JSMSG_RAW_BRACKET_IN_REGEXP, 0, JSEXN_SYNTAXERR, "raw bracket is not allowed in regular expression with unicode flag") MSG_DEF(JSMSG_TOO_MANY_PARENS, 0, JSEXN_INTERNALERR, "too many parentheses in regular expression") MSG_DEF(JSMSG_UNICODE_OVERFLOW, 1, JSEXN_SYNTAXERR, "Unicode codepoint must not be greater than 0x10FFFF in {0}") MSG_DEF(JSMSG_UNMATCHED_RIGHT_PAREN, 0, JSEXN_SYNTAXERR, "unmatched ) in regular expression") diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsnum.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsnum.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsnum.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsnum.cpp 2018-06-20 17:29:14.000000000 +0000 @@ -29,6 +29,9 @@ #include "js/Conversions.h" #include "util/DoubleToString.h" #include "util/StringBuffer.h" +#ifdef ENABLE_BIGINT +#include "vm/BigIntType.h" +#endif #include "vm/GlobalObject.h" #include "vm/JSAtom.h" #include "vm/JSContext.h" @@ -487,8 +490,14 @@ CallArgs args = CallArgsFromVp(argc, vp); if (args.length() > 0) { - if (!ToNumber(cx, args[0])) + // BigInt proposal section 6.2, steps 2a-c. + if (!ToNumeric(cx, args[0])) return false; +#ifdef ENABLE_BIGINT + if (args[0].isBigInt()) + args[0].setNumber(BigInt::numberValue(args[0].toBigInt())); +#endif + MOZ_ASSERT(args[0].isNumber()); } if (!args.isConstructing()) { @@ -1607,6 +1616,34 @@ return false; } +// BigInt proposal section 3.1.6 +bool +js::ToNumericSlow(JSContext* cx, MutableHandleValue vp) +{ + MOZ_ASSERT(!vp.isNumber()); +#ifdef ENABLE_BIGINT + MOZ_ASSERT(!vp.isBigInt()); +#endif + + // Step 1. + if (!vp.isPrimitive()) { + if (cx->helperThread()) + return false; + if (!ToPrimitive(cx, JSTYPE_NUMBER, vp)) + return false; + } + + // Step 2. +#ifdef ENABLE_BIGINT + if (vp.isBigInt()) { + return true; + } +#endif + + // Step 3. + return ToNumber(cx, vp); +} + /* * Convert a value to an int8_t, according to the WebIDL rules for byte * conversion. Return converted value in *out on success, false on failure. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsnum.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsnum.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jsnum.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jsnum.h 2018-06-20 17:29:12.000000000 +0000 @@ -171,6 +171,22 @@ return true; } +bool +ToNumericSlow(JSContext* cx, JS::MutableHandleValue vp); + +// BigInt proposal section 3.1.6 +MOZ_ALWAYS_INLINE MOZ_MUST_USE bool +ToNumeric(JSContext* cx, JS::MutableHandleValue vp) +{ + if (vp.isNumber()) + return true; +#ifdef ENABLE_BIGINT + if (vp.isBigInt()) + return true; +#endif + return ToNumericSlow(cx, vp); +} + MOZ_MUST_USE bool num_parseInt(JSContext* cx, unsigned argc, Value* vp); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/jspubtd.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/jspubtd.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/jspubtd.h 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/jspubtd.h 2018-06-20 17:29:13.000000000 +0000 @@ -118,43 +118,43 @@ }; JS_PUBLIC_API(HeapState) -CurrentThreadHeapState(); +RuntimeHeapState(); static inline bool -CurrentThreadIsHeapBusy() +RuntimeHeapIsBusy() { - return CurrentThreadHeapState() != HeapState::Idle; + return RuntimeHeapState() != HeapState::Idle; } static inline bool -CurrentThreadIsHeapTracing() +RuntimeHeapIsTracing() { - return CurrentThreadHeapState() == HeapState::Tracing; + return RuntimeHeapState() == HeapState::Tracing; } static inline bool -CurrentThreadIsHeapMajorCollecting() +RuntimeHeapIsMajorCollecting() { - return CurrentThreadHeapState() == HeapState::MajorCollecting; + return RuntimeHeapState() == HeapState::MajorCollecting; } static inline bool -CurrentThreadIsHeapMinorCollecting() +RuntimeHeapIsMinorCollecting() { - return CurrentThreadHeapState() == HeapState::MinorCollecting; + return RuntimeHeapState() == HeapState::MinorCollecting; } static inline bool -CurrentThreadIsHeapCollecting() +RuntimeHeapIsCollecting() { - HeapState state = CurrentThreadHeapState(); + HeapState state = RuntimeHeapState(); return state == HeapState::MajorCollecting || state == HeapState::MinorCollecting; } static inline bool -CurrentThreadIsHeapCycleCollecting() +RuntimeHeapIsCycleCollecting() { - return CurrentThreadHeapState() == HeapState::CycleCollecting; + return RuntimeHeapState() == HeapState::CycleCollecting; } // Decorates the Unlinking phase of CycleCollection so that accidental use @@ -162,6 +162,8 @@ class MOZ_STACK_CLASS JS_PUBLIC_API(AutoEnterCycleCollection) { #ifdef DEBUG + JSRuntime* runtime_; + public: explicit AutoEnterCycleCollection(JSRuntime* rt); ~AutoEnterCycleCollection(); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/proxy/CrossCompartmentWrapper.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/proxy/CrossCompartmentWrapper.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/proxy/CrossCompartmentWrapper.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/proxy/CrossCompartmentWrapper.cpp 2018-06-20 17:29:12.000000000 +0000 @@ -492,7 +492,7 @@ const CrossCompartmentWrapper CrossCompartmentWrapper::singleton(0u); bool -js::IsCrossCompartmentWrapper(JSObject* obj) +js::IsCrossCompartmentWrapper(const JSObject* obj) { return IsWrapper(obj) && !!(Wrapper::wrapperHandler(obj)->flags() & Wrapper::CROSS_COMPARTMENT); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/proxy/Wrapper.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/proxy/Wrapper.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/proxy/Wrapper.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/proxy/Wrapper.cpp 2018-06-20 17:29:14.000000000 +0000 @@ -330,7 +330,7 @@ } const Wrapper* -Wrapper::wrapperHandler(JSObject* wrapper) +Wrapper::wrapperHandler(const JSObject* wrapper) { MOZ_ASSERT(wrapper->is()); return static_cast(wrapper->as().handler()); @@ -375,7 +375,7 @@ JS_FRIEND_API(JSObject*) js::UncheckedUnwrap(JSObject* wrapped, bool stopAtWindowProxy, unsigned* flagsp) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(wrapped->runtimeFromAnyThread())); unsigned flags = 0; @@ -407,7 +407,7 @@ JS_FRIEND_API(JSObject*) js::UnwrapOneChecked(JSObject* obj, bool stopAtWindowProxy) { - MOZ_ASSERT(!JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(obj->runtimeFromAnyThread())); if (!obj->is() || diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/shell/js.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/shell/js.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/shell/js.cpp 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/shell/js.cpp 2018-06-20 17:29:14.000000000 +0000 @@ -1663,7 +1663,7 @@ if (!cx || cx->helperThread()) return; - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); JS::PrepareForFullGC(cx); cx->runtime()->gc.gc(GC_NORMAL, JS::gcreason::SHARED_MEMORY_LIMIT); @@ -3442,7 +3442,7 @@ { JSAutoRealm ar(cx, obj); - if (!lazy && !JS_InitStandardClasses(cx, obj)) + if (!lazy && !JS::InitRealmStandardClasses(cx)) return nullptr; RootedValue value(cx, BooleanValue(lazy)); @@ -3595,6 +3595,7 @@ sc->isWorker = true; JS_SetContextPrivate(cx, sc); + JS_SetGrayGCRootsTracer(cx, TraceGrayRoots, nullptr); SetWorkerContextOptions(cx); JS::SetBuildIdOp(cx, ShellBuildId); @@ -8282,7 +8283,7 @@ JSAutoRealm ar(cx, glob); #ifndef LAZY_STANDARD_CLASSES - if (!JS_InitStandardClasses(cx, glob)) + if (!JS::InitRealmStandardClasses(cx)) return nullptr; #endif diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/tests/jstests.list firefox-trunk-62.0~a1~hg20180620r423058/js/src/tests/jstests.list --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/tests/jstests.list 2018-06-11 13:02:18.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/tests/jstests.list 2018-06-20 17:29:13.000000000 +0000 @@ -46,11 +46,6 @@ skip-if(!this.hasOwnProperty("Atomics")) include test262/built-ins/Atomics/jstests.list skip-if(!this.hasOwnProperty("SharedArrayBuffer")) include test262/built-ins/SharedArrayBuffer/jstests.list -# flatMap and flatten are Nightly-only -skip-if(!Array.prototype.flatMap) include test262/built-ins/Array/prototype/flatMap/jstests.list -skip-if(!Array.prototype.flat) include test262/built-ins/Array/prototype/flat/jstests.list - - ##################################### # Test262 tests disabled on browser # ##################################### @@ -129,9 +124,6 @@ skip script test262/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-detached-buffer.js # https://bugzilla.mozilla.org/show_bug.cgi?id=1129202 -skip script test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-greater-than-last-index.js -skip script test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-lower-than-zero.js -skip script test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-minus-zero.js skip script test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-canonical-index.js skip script test262/built-ins/TypedArrayConstructors/internals/DefineOwnProperty/key-is-not-integer.js skip script test262/built-ins/TypedArrayConstructors/internals/Get/key-is-not-canonical-index.js @@ -139,10 +131,8 @@ skip script test262/built-ins/TypedArrayConstructors/internals/GetOwnProperty/key-is-not-canonical-index.js skip script test262/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-canonical-index.js skip script test262/built-ins/TypedArrayConstructors/internals/HasProperty/key-is-not-integer.js -skip script test262/built-ins/TypedArrayConstructors/internals/Set/key-is-minus-zero.js skip script test262/built-ins/TypedArrayConstructors/internals/Set/key-is-not-canonical-index.js skip script test262/built-ins/TypedArrayConstructors/internals/Set/key-is-not-integer.js -skip script test262/built-ins/TypedArrayConstructors/internals/Set/key-is-out-of-bounds.js skip script test262/built-ins/TypedArrayConstructors/internals/Set/tonumber-value-throws.js # https://bugzilla.mozilla.org/show_bug.cgi?id=1317405 diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/tests/non262/regress/regress-1466387-worker-grayroot.js firefox-trunk-62.0~a1~hg20180620r423058/js/src/tests/non262/regress/regress-1466387-worker-grayroot.js --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/tests/non262/regress/regress-1466387-worker-grayroot.js 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/tests/non262/regress/regress-1466387-worker-grayroot.js 2018-06-20 17:29:12.000000000 +0000 @@ -0,0 +1,28 @@ +var BUGNUMBER = 1466387; +var summary = 'grayRoot() testing on worker thread'; + +// Before bug 1466387, the gray root tracer was not set up on worker threads, +// but the grayRoot() function was still available. This resulted in a GC +// collecting the gray root, then a read barrier firing on the dead object. +// +// This is a crashtest. If it does not crash, it will throw a ReferenceError, +// but that's ok. + +print('BUGNUMBER: ' + BUGNUMBER); +print("STATUS: " + summary); + +if (typeof 'evalInWorder' == 'function') { + evalInWorker(` + var wm = new WeakMap(); + grayRoot().map = wm; + gczeal(4,10); + evaluate(\` + grayRoot().map = __v_1173; + if (!class i { constructor() { } } ()) { + (function __f_252( get , ) {})(); + } + \`); +`); +} + +this.reportCompare && reportCompare(true, true, summary); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/threading/ProtectedData.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/threading/ProtectedData.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/threading/ProtectedData.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/threading/ProtectedData.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -65,17 +65,19 @@ if (OnHelperThread()) return; - JSContext* cx = TlsContext.get(); + JSRuntime* runtime = TlsContext.get()->runtime(); if (zone->isAtomsZone()) { - // The atoms zone is protected by the exclusive access lock. - MOZ_ASSERT(cx->runtime()->currentThreadHasExclusiveAccess()); + // The atoms zone is protected by the exclusive access lock, but can be + // also accessed when off-thread parsing is blocked. + MOZ_ASSERT(runtime->currentThreadHasExclusiveAccess() || + (!runtime->isOffThreadParseRunning() && runtime->isOffThreadParsingBlocked())); } else if (zone->usedByHelperThread()) { // This may only be accessed by the helper thread using this zone. MOZ_ASSERT(zone->ownedByCurrentHelperThread()); } else { // The main thread is permitted access to all zones. These accesses // are threadsafe if the zone is not in use by a helper thread. - MOZ_ASSERT(CurrentThreadCanAccessRuntime(cx->runtime())); + MOZ_ASSERT(CurrentThreadCanAccessRuntime(runtime)); } } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/util/NativeStack.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/util/NativeStack.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/util/NativeStack.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/util/NativeStack.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -13,10 +13,24 @@ # if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # include # endif +# if defined(SOLARIS) || defined(AIX) +# include +# endif # if defined(ANDROID) && !defined(__aarch64__) # include # include # endif +# if defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__) +# include +# include +# include +# include +static pid_t +gettid() +{ + return syscall(__NR_gettid); +} +# endif #else # error "Unsupported platform" #endif @@ -34,8 +48,6 @@ #elif defined(SOLARIS) -#include - JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0); void* @@ -48,8 +60,6 @@ #elif defined(AIX) -#include - JS_STATIC_ASSERT(JS_STACK_GROWTH_DIRECTION < 0); void* @@ -61,6 +71,52 @@ context.uc_stack.ss_size; } +#elif defined(XP_LINUX) && !defined(ANDROID) && defined(__GLIBC__) +void* +js::GetNativeStackBaseImpl() +{ + + // On the main thread, get stack base from glibc's __libc_stack_end rather than pthread APIs + // to avoid filesystem calls /proc/self/maps. Non-main threads spawned with pthreads can read + // this information directly from their pthread struct, but the main thread must go parse + // /proc/self/maps to figure the mapped stack address space ranges. We want to avoid reading + // from /proc/ so that firefox can run in sandboxed environments where /proc may not be mounted + if (gettid() == getpid()) { + void** pLibcStackEnd = (void**)dlsym(RTLD_DEFAULT, "__libc_stack_end"); + + // If __libc_stack_end is not found, architecture specific frame pointer hopping will need + // to be implemented. + MOZ_RELEASE_ASSERT(pLibcStackEnd, "__libc_stack_end unavailable, unable to setup stack range for JS"); + void* stackBase = *pLibcStackEnd; + MOZ_RELEASE_ASSERT(stackBase, "invalid stack base, unable to setup stack range for JS"); + + // We don't need to fix stackBase, as it already roughly points to beginning of the stack + return stackBase; + } + + // Non-main threads have the required info stored in memory, so no filesystem calls are made. + pthread_t thread = pthread_self(); + pthread_attr_t sattr; + pthread_attr_init(&sattr); + pthread_getattr_np(thread, &sattr); + + // stackBase will be the *lowest* address on all architectures. + void* stackBase = nullptr; + size_t stackSize = 0; + int rc = pthread_attr_getstack(&sattr, &stackBase, &stackSize); + if (rc) { + MOZ_CRASH("call to pthread_attr_getstack failed, unable to setup stack range for JS"); + } + MOZ_RELEASE_ASSERT(stackBase, "invalid stack base, unable to setup stack range for JS"); + pthread_attr_destroy(&sattr); + +# if JS_STACK_GROWTH_DIRECTION > 0 + return stackBase; +# else + return static_cast(stackBase) + stackSize; +# endif +} + #else /* XP_UNIX */ void* diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BigIntType.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BigIntType.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BigIntType.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BigIntType.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -175,6 +175,18 @@ return nullptr; } +// ES 2019 draft 6.1.6 +double +BigInt::numberValue(BigInt* x) +{ + // mpz_get_d may cause a hardware overflow trap, so use + // mpz_get_d_2exp to get the fractional part and exponent + // separately. + signed long int exp; + double d = mpz_get_d_2exp(&exp, x->num_); + return ldexp(d, exp); +} + JSLinearString* BigInt::toString(JSContext* cx, BigInt* x, uint8_t radix) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BigIntType.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BigIntType.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BigIntType.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BigIntType.h 2018-06-20 17:29:20.000000000 +0000 @@ -69,6 +69,7 @@ static BigInt* copy(JSContext* cx, Handle x); + static double numberValue(BigInt* x); static JSLinearString* toString(JSContext* cx, BigInt* x, uint8_t radix); }; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BytecodeUtil.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BytecodeUtil.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/BytecodeUtil.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/BytecodeUtil.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -1149,7 +1149,7 @@ return true; } - if (JS::CurrentThreadIsHeapBusy() || !cx->isAllocAllowed()) { + if (JS::RuntimeHeapIsBusy() || !cx->isAllocAllowed()) { UniqueChars source = JS_smprintf(""); if (!source) { ReportOutOfMemory(cx); @@ -2187,10 +2187,9 @@ if (!ed.getOutput(&result)) return false; - if (!sp->put(result)) - return false; - - return true; + bool ok = sp->put(result); + js_free(result); + return ok; } #endif /* DEBUG */ @@ -2897,6 +2896,7 @@ { js::gc::AutoPrepareForTracing apft(cx); } + Rooted topScripts(cx, ScriptVector(cx)); for (ZonesIter zone(rt, SkipAtoms); !zone.done(); zone.next()) { for (auto script = zone->cellIter(); !script.done(); script.next()) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/CharacterEncoding.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/CharacterEncoding.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/CharacterEncoding.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/CharacterEncoding.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -230,8 +230,7 @@ { char buffer[10]; SprintfLiteral(buffer, "%u", offset); - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_MALFORMED_UTF8_CHAR, buffer); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_MALFORMED_UTF8_CHAR, buffer); } static void @@ -245,8 +244,7 @@ { char buffer[10]; SprintfLiteral(buffer, "0x%x", v + 0x10000); - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_UTF8_CHAR_TOO_LARGE, buffer); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_UTF8_CHAR_TOO_LARGE, buffer); } enum InflateUTF8Action { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Compartment.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Compartment.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Compartment.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Compartment.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -131,14 +131,22 @@ if (!str->asRope().copyLatin1CharsZ(cx, copiedChars)) return nullptr; - return NewString(cx, copiedChars.forget(), len); + auto* rawCopiedChars = copiedChars.forget(); + auto* result = NewString(cx, rawCopiedChars, len); + if (!result) + js_free(rawCopiedChars); + return result; } ScopedJSFreePtr copiedChars; if (!str->asRope().copyTwoByteCharsZ(cx, copiedChars)) return nullptr; - return NewStringDontDeflate(cx, copiedChars.forget(), len); + auto* rawCopiedChars = copiedChars.forget(); + auto* result = NewStringDontDeflate(cx, rawCopiedChars, len); + if (!result) + js_free(rawCopiedChars); + return result; } bool @@ -198,15 +206,15 @@ bool Compartment::getNonWrapperObjectForCurrentCompartment(JSContext* cx, MutableHandleObject obj) { - // Ensure that we have entered a compartment. + // Ensure that we have entered a realm. MOZ_ASSERT(cx->global()); // If we have a cross-compartment wrapper, make sure that the cx isn't - // associated with the self-hosting global. We don't want to create + // associated with the self-hosting zone. We don't want to create // wrappers for objects in other runtimes, which may be the case for the - // self-hosting global. - MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(cx->global())); - MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(&obj->global())); + // self-hosting zone. + MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(cx->zone())); + MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(obj->zone())); // The object is already in the right compartment. Normally same- // compartment returns the object itself, however, windows are always @@ -385,7 +393,7 @@ void Compartment::traceOutgoingCrossCompartmentWrappers(JSTracer* trc) { - MOZ_ASSERT(JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsMajorCollecting()); MOZ_ASSERT(!zone()->isCollectingFromAnyThread() || trc->runtime()->gc.isHeapCompacting()); for (NonStringWrapperEnum e(this); !e.empty(); e.popFront()) { @@ -406,7 +414,7 @@ Compartment::traceIncomingCrossCompartmentEdgesForZoneGC(JSTracer* trc) { gcstats::AutoPhase ap(trc->runtime()->gc.stats(), gcstats::PhaseKind::MARK_CCWS); - MOZ_ASSERT(JS::CurrentThreadIsHeapMajorCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsMajorCollecting()); for (CompartmentsIter c(trc->runtime()); !c.done(); c.next()) { if (!c->zone()->isCollecting()) c->traceOutgoingCrossCompartmentWrappers(trc); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Debugger.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Debugger.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Debugger.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Debugger.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -274,9 +274,8 @@ return false; if (!JSID_IS_ATOM(id) || !IsIdentifier(JSID_TO_ATOM(id))) { RootedValue val(cx, v); - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_UNEXPECTED_TYPE, - JSDVG_SEARCH_STACK, val, nullptr, "not an identifier", - nullptr); + ReportValueError(cx, JSMSG_UNEXPECTED_TYPE, JSDVG_SEARCH_STACK, val, nullptr, + "not an identifier"); return false; } return true; @@ -522,13 +521,11 @@ } if (obj->is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_WRAPPER_IN_WAY, - JSDVG_SEARCH_STACK, dbgobj, nullptr, - isWrapper, isWindowProxy); + ReportValueError(cx, JSMSG_DEBUG_WRAPPER_IN_WAY, JSDVG_SEARCH_STACK, dbgobj, nullptr, + isWrapper, isWindowProxy); } else { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, dbgobj, nullptr, - "a global object", nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, dbgobj, nullptr, + "a global object"); } return false; } @@ -3951,8 +3948,8 @@ /* Add the initial debuggees, if any. */ for (unsigned i = 0; i < args.length(); i++) { - Rooted - debuggee(cx, &args[i].toObject().as().private_().toObject().global()); + JSObject& wrappedObj = args[i].toObject().as().private_().toObject(); + Rooted debuggee(cx, &wrappedObj.deprecatedGlobal()); if (!debugger->addDebuggeeGlobal(cx, debuggee)) return false; } @@ -5361,9 +5358,8 @@ return nullptr; if (!GetScriptReferent(thisobj).is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, args.thisv(), nullptr, - refname, nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, args.thisv(), nullptr, + refname); return nullptr; } @@ -7007,9 +7003,8 @@ return nullptr; if (!GetSourceReferent(thisobj).is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, args.thisv(), nullptr, - refname, nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, args.thisv(), nullptr, + refname); return nullptr; } @@ -7092,9 +7087,8 @@ THIS_DEBUGSOURCE_REFERENT(cx, argc, vp, "(get binary)", args, obj, referent); if (!referent.is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, args.thisv(), nullptr, - "a wasm source", nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, args.thisv(), nullptr, + "a wasm source"); return false; } @@ -8097,9 +8091,8 @@ AbstractFramePtr referent = DebuggerFrame::getReferent(frame); if (!referent.hasScript()) { RootedValue frameobj(cx, ObjectValue(*frame)); - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, frameobj, nullptr, - "a script frame", nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, frameobj, nullptr, + "a script frame"); return false; } return true; @@ -9960,7 +9953,7 @@ RootedObject referent(cx, object->referent()); Debugger* dbg = object->owner(); - RootedObject global(cx, &referent->global()); + RootedObject global(cx, &referent->deprecatedGlobal()); return dbg->wrapDebuggeeObject(cx, global, result); } @@ -10707,13 +10700,11 @@ RootedValue dbgobj(cx, ObjectValue(*object)); if (referent->is()) { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_WRAPPER_IN_WAY, - JSDVG_SEARCH_STACK, dbgobj, nullptr, - isWrapper, isWindowProxy); + ReportValueError(cx, JSMSG_DEBUG_WRAPPER_IN_WAY, JSDVG_SEARCH_STACK, dbgobj, nullptr, + isWrapper, isWindowProxy); } else { - ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_DEBUG_BAD_REFERENT, - JSDVG_SEARCH_STACK, dbgobj, nullptr, - "a global object", nullptr); + ReportValueError(cx, JSMSG_DEBUG_BAD_REFERENT, JSDVG_SEARCH_STACK, dbgobj, nullptr, + "a global object"); } return false; } @@ -10821,7 +10812,7 @@ */ if (requireDebuggee) { Rooted env(cx, static_cast(nthisobj->getPrivate())); - if (!Debugger::fromChildJSObject(nthisobj)->observesGlobal(&env->global())) { + if (!Debugger::fromChildJSObject(nthisobj)->observesGlobal(&env->nonCCWGlobal())) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DEBUG_NOT_DEBUGGEE, "Debugger.Environment", "environment"); return nullptr; @@ -11171,7 +11162,7 @@ MOZ_ASSERT(referent()); MOZ_ASSERT(!referent()->is()); - return owner()->observesGlobal(&referent()->global()); + return owner()->observesGlobal(&referent()->nonCCWGlobal()); } bool diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/EnvironmentObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/EnvironmentObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/EnvironmentObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/EnvironmentObject.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -3329,7 +3329,7 @@ const char* redeclKind = nullptr; RootedId id(cx, NameToId(name)); RootedShape shape(cx); - if (varObj->is() && varObj->realm()->isInVarNames(name)) { + if (varObj->is() && varObj->as().realm()->isInVarNames(name)) { // ES 15.1.11 step 5.a redeclKind = "var"; } else if ((shape = lexicalEnv->lookup(cx, name))) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/EnvironmentObject-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/EnvironmentObject-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/EnvironmentObject-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/EnvironmentObject-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -78,7 +78,7 @@ return nullptr; MOZ_ASSERT_IF(is(), as().isInterpreted()); - return &global(); + return &nonCCWGlobal(); } #endif /* vm_EnvironmentObject_inl_h */ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/ErrorObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/ErrorObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/ErrorObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/ErrorObject.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -9,6 +9,8 @@ #include "mozilla/Range.h" +#include + #include "jsexn.h" #include "js/CallArgs.h" @@ -38,7 +40,7 @@ /* static */ bool js::ErrorObject::init(JSContext* cx, Handle obj, JSExnType type, - ScopedJSFreePtr* errorReport, HandleString fileName, + UniquePtr errorReport, HandleString fileName, HandleObject stack, uint32_t lineNumber, uint32_t columnNumber, HandleString message) { @@ -72,7 +74,7 @@ MOZ_ASSERT(JSEXN_ERR <= type && type < JSEXN_LIMIT); - JSErrorReport* report = errorReport ? errorReport->forget() : nullptr; + JSErrorReport* report = errorReport.release(); obj->initReservedSlot(EXNTYPE_SLOT, Int32Value(type)); obj->initReservedSlot(STACK_SLOT, ObjectOrNullValue(stack)); obj->setReservedSlot(ERROR_REPORT_SLOT, PrivateValue(report)); @@ -88,7 +90,7 @@ /* static */ ErrorObject* js::ErrorObject::create(JSContext* cx, JSExnType errorType, HandleObject stack, HandleString fileName, uint32_t lineNumber, uint32_t columnNumber, - ScopedJSFreePtr* report, HandleString message, + UniquePtr report, HandleString message, HandleObject protoArg /* = nullptr */) { AssertObjectIsSavedFrameOrWrapper(cx, stack); @@ -109,7 +111,7 @@ errObject = &obj->as(); } - if (!ErrorObject::init(cx, errObject, errorType, report, fileName, stack, + if (!ErrorObject::init(cx, errObject, errorType, std::move(report), fileName, stack, lineNumber, columnNumber, message)) { return nullptr; @@ -156,11 +158,11 @@ report.initOwnedMessage(utf8.release()); // Cache and return. - JSErrorReport* copy = CopyErrorReport(cx, &report); + UniquePtr copy = CopyErrorReport(cx, &report); if (!copy) return nullptr; - setReservedSlot(ERROR_REPORT_SLOT, PrivateValue(copy)); - return copy; + setReservedSlot(ERROR_REPORT_SLOT, PrivateValue(copy.get())); + return copy.release(); } static bool diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/ErrorObject.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/ErrorObject.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/ErrorObject.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/ErrorObject.h 2018-06-20 17:29:20.000000000 +0000 @@ -9,6 +9,7 @@ #include "mozilla/ArrayUtils.h" +#include "js/UniquePtr.h" #include "vm/NativeObject.h" #include "vm/SavedStacks.h" #include "vm/Shape.h" @@ -35,7 +36,7 @@ static bool init(JSContext* cx, Handle obj, JSExnType type, - ScopedJSFreePtr* errorReport, HandleString fileName, HandleObject stack, + UniquePtr errorReport, HandleString fileName, HandleObject stack, uint32_t lineNumber, uint32_t columnNumber, HandleString message); static const ClassSpec classSpecs[JSEXN_ERROR_LIMIT]; @@ -70,7 +71,7 @@ // property. static ErrorObject* create(JSContext* cx, JSExnType type, HandleObject stack, HandleString fileName, - uint32_t lineNumber, uint32_t columnNumber, ScopedJSFreePtr* report, + uint32_t lineNumber, uint32_t columnNumber, UniquePtr report, HandleString message, HandleObject proto = nullptr); /* diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/HelperThreads.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/HelperThreads.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/HelperThreads.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/HelperThreads.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -1591,9 +1591,7 @@ { AutoUnlockHelperThreadState parallelSection(lock); TimeStamp timeStart = TimeStamp::Now(); - TlsContext.get()->heapState = JS::HeapState::MajorCollecting; runTask(); - TlsContext.get()->heapState = JS::HeapState::Idle; duration_ = TimeSince(timeStart); } @@ -1854,7 +1852,7 @@ LeaveParseTaskZone(cx->runtime(), parseTask); // Move the parsed script and all its contents into the desired realm. - gc::MergeRealms(parseTask->parseGlobal->realm(), dest); + gc::MergeRealms(parseTask->parseGlobal->as().realm(), dest); } void @@ -2101,9 +2099,12 @@ currentTask.emplace(HelperThreadState().parseWorklist(locked).popCopy()); ParseTask* task = parseTask(); + JSRuntime* runtime = task->parseGlobal->runtimeFromAnyThread(); + runtime->incOffThreadParsesRunning(); + { AutoUnlockHelperThreadState unlock(locked); - AutoSetContextRuntime ascr(task->parseGlobal->runtimeFromAnyThread()); + AutoSetContextRuntime ascr(runtime); JSContext* cx = TlsContext.get(); @@ -2127,6 +2128,8 @@ // migrate it into the correct compartment. HelperThreadState().parseFinishedList(locked).insertBack(task); + runtime->decOffThreadParsesRunning(); + currentTask.reset(); // Notify the main thread in case it is waiting for the parse/emit to finish. @@ -2269,7 +2272,7 @@ } void -GlobalHelperThreadState::trace(JSTracer* trc, gc::AutoTraceSession& session) +GlobalHelperThreadState::trace(JSTracer* trc) { AutoLockHelperThreadState lock; for (auto builder : ionWorklist(lock)) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/HelperThreads.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/HelperThreads.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/HelperThreads.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/HelperThreads.h 2018-06-20 17:29:20.000000000 +0000 @@ -311,7 +311,7 @@ void mergeParseTaskRealm(JSContext* cx, ParseTask* parseTask, JS::Realm* dest); - void trace(JSTracer* trc, js::gc::AutoTraceSession& session); + void trace(JSTracer* trc); JSScript* finishScriptParseTask(JSContext* cx, JS::OffThreadToken* token); JSScript* finishScriptDecodeTask(JSContext* cx, JS::OffThreadToken* token); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Interpreter.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Interpreter.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Interpreter.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Interpreter.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -233,7 +233,7 @@ * before the global object. */ if (IsGlobalOp(JSOp(*pc)) && !fp->script()->hasNonSyntacticScope()) - envChain = &envChain->global().lexicalEnvironment(); + envChain = &cx->global()->lexicalEnvironment(); /* Kludge to allow (typeof foo == "undefined") tests. */ JSOp op2 = JSOp(pc[JSOP_GETNAME_LENGTH]); @@ -994,7 +994,7 @@ return false; } - ReportValueError2(cx, JSMSG_BAD_HERITAGE, -1, heritage, nullptr, "not an object or null"); + ReportValueError(cx, JSMSG_BAD_HERITAGE, -1, heritage, nullptr, "not an object or null"); return false; } @@ -3029,7 +3029,7 @@ "eval and stricteval must be the same size"); CallArgs args = CallArgsFromSp(GET_ARGC(REGS.pc), REGS.sp); - if (REGS.fp()->environmentChain()->global().valueIsEval(args.calleev())) { + if (cx->global()->valueIsEval(args.calleev())) { if (!DirectEval(cx, args.get(0), args.rval())) goto error; } else { @@ -4520,7 +4520,10 @@ if (!DefineDataProperty(cx, parent, name, rval, attrs)) return false; - return parent->is() ? parent->realm()->addToVarNames(cx, name) : true; + if (parent->is()) + return parent->as().realm()->addToVarNames(cx, name); + + return true; } /* @@ -4546,7 +4549,7 @@ // Careful: the presence of a shape, even one appearing to derive from // a variable declaration, doesn't mean it's in [[VarNames]]. - if (!parent->realm()->addToVarNames(cx, name)) + if (!parent->as().realm()->addToVarNames(cx, name)) return false; } @@ -4770,7 +4773,7 @@ if (status) { // Deleting a name from the global object removes it from [[VarNames]]. if (pobj == scope && scope->is()) - scope->realm()->removeFromVarNames(name); + scope->as().realm()->removeFromVarNames(name); } return true; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Interpreter-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Interpreter-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Interpreter-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Interpreter-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -439,7 +439,7 @@ } if (varobj->is()) { - if (!varobj->realm()->addToVarNames(cx, dn)) + if (!varobj->as().realm()->addToVarNames(cx, dn)) return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSAtom.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSAtom.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSAtom.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSAtom.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -255,14 +255,14 @@ } void -js::TraceAtoms(JSTracer* trc, AutoLockForExclusiveAccess& lock) +js::TraceAtoms(JSTracer* trc, const AutoAccessAtomsZone& access) { JSRuntime* rt = trc->runtime(); if (rt->atomsAreFinished()) return; - TracePinnedAtoms(trc, rt->atoms(lock)); + TracePinnedAtoms(trc, rt->atoms(access)); if (rt->atomsAddedWhileSweeping()) TracePinnedAtoms(trc, *rt->atomsAddedWhileSweeping()); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSAtom.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSAtom.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSAtom.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSAtom.h 2018-06-20 17:29:21.000000000 +0000 @@ -39,13 +39,13 @@ namespace js { -class AutoLockForExclusiveAccess; +class AutoAccessAtomsZone; /* * Atom tracing and garbage collection hooks. */ void -TraceAtoms(JSTracer* trc, AutoLockForExclusiveAccess& lock); +TraceAtoms(JSTracer* trc, const AutoAccessAtomsZone& atomsAccess); void TracePermanentAtoms(JSTracer* trc); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -895,36 +895,26 @@ ReportIsNotDefined(cx, id); } -bool -js::ReportIsNullOrUndefined(JSContext* cx, int spindex, HandleValue v, - HandleString fallback) +void +js::ReportIsNullOrUndefined(JSContext* cx, int spindex, HandleValue v) { - bool ok; + MOZ_ASSERT(v.isNullOrUndefined()); - UniqueChars bytes = DecompileValueGenerator(cx, spindex, v, fallback); + UniqueChars bytes = DecompileValueGenerator(cx, spindex, v, nullptr); if (!bytes) - return false; + return; - if (strcmp(bytes.get(), js_undefined_str) == 0 || - strcmp(bytes.get(), js_null_str) == 0) { - ok = JS_ReportErrorFlagsAndNumberLatin1(cx, JSREPORT_ERROR, - GetErrorMessage, nullptr, - JSMSG_NO_PROPERTIES, - bytes.get()); + if (strcmp(bytes.get(), js_undefined_str) == 0 || strcmp(bytes.get(), js_null_str) == 0) { + JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_NO_PROPERTIES, + bytes.get()); } else if (v.isUndefined()) { - ok = JS_ReportErrorFlagsAndNumberLatin1(cx, JSREPORT_ERROR, - GetErrorMessage, nullptr, - JSMSG_UNEXPECTED_TYPE, - bytes.get(), js_undefined_str); + JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_UNEXPECTED_TYPE, + bytes.get(), js_undefined_str); } else { MOZ_ASSERT(v.isNull()); - ok = JS_ReportErrorFlagsAndNumberLatin1(cx, JSREPORT_ERROR, - GetErrorMessage, nullptr, - JSMSG_UNEXPECTED_TYPE, - bytes.get(), js_null_str); + JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_UNEXPECTED_TYPE, + bytes.get(), js_null_str); } - - return ok; } void @@ -950,18 +940,14 @@ int spindex, HandleValue v, HandleString fallback, const char* arg1, const char* arg2) { - UniqueChars bytes; - bool ok; - MOZ_ASSERT(js_ErrorFormatString[errorNumber].argCount >= 1); MOZ_ASSERT(js_ErrorFormatString[errorNumber].argCount <= 3); - bytes = DecompileValueGenerator(cx, spindex, v, fallback); + UniqueChars bytes = DecompileValueGenerator(cx, spindex, v, fallback); if (!bytes) return false; - ok = JS_ReportErrorFlagsAndNumberLatin1(cx, flags, GetErrorMessage, nullptr, errorNumber, - bytes.get(), arg1, arg2); - return ok; + return JS_ReportErrorFlagsAndNumberLatin1(cx, flags, GetErrorMessage, nullptr, errorNumber, + bytes.get(), arg1, arg2); } JSObject* @@ -1242,7 +1228,6 @@ #endif autoFlushICache_(nullptr), dtoaState(nullptr), - heapState(JS::HeapState::Idle), suppressGC(0), #ifdef DEBUG ionCompiling(false), @@ -1550,7 +1535,7 @@ : cx(cxArg->helperThread() ? nullptr : cxArg) { if (cx) { - MOZ_ASSERT(cx->requestDepth || JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(cx->requestDepth || JS::RuntimeHeapIsBusy()); MOZ_ASSERT(CurrentThreadCanAccessRuntime(cx->runtime())); cx->checkRequestDepth++; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext.h 2018-06-20 17:29:21.000000000 +0000 @@ -34,6 +34,7 @@ } // namespace jit namespace gc { +class AutoCheckCanAccessAtomsDuringGC; class AutoSuppressNurseryCellAlloc; } @@ -264,14 +265,14 @@ inline js::Handle global() const; // Methods to access runtime data that must be protected by locks. - js::AtomSet& atoms(js::AutoLockForExclusiveAccess& lock) { - return runtime_->atoms(lock); + js::AtomSet& atoms(const js::AutoAccessAtomsZone& access) { + return runtime_->atoms(access); } - const JS::Zone* atomsZone(js::AutoLockForExclusiveAccess& lock) { - return runtime_->atomsZone(lock); + const JS::Zone* atomsZone(const js::AutoAccessAtomsZone& access) { + return runtime_->atomsZone(access); } - js::SymbolRegistry& symbolRegistry(js::AutoLockForExclusiveAccess& lock) { - return runtime_->symbolRegistry(lock); + js::SymbolRegistry& symbolRegistry(const js::AutoAccessAtomsZone& access) { + return runtime_->symbolRegistry(access); } js::ScriptDataTable& scriptDataTable(js::AutoLockScriptData& lock) { return runtime_->scriptDataTable(lock); @@ -444,9 +445,6 @@ // State used by util/DoubleToString.cpp. js::ThreadData dtoaState; - // Any GC activity occurring on this thread. - js::ThreadData heapState; - /* * When this flag is non-zero, any attempt to GC will be skipped. It is used * to suppress GC when reporting an OOM (see ReportOutOfMemory) and in @@ -543,6 +541,8 @@ js::ThreadData compactingDisabledCount; bool canCollectAtoms() const { + // TODO: We may be able to improve this by collecting if + // !isOffThreadParseRunning() (bug 1468422). return !runtime()->hasHelperThreadZones(); } @@ -1018,8 +1018,8 @@ /* * Report an attempt to access the property of a null or undefined value (v). */ -extern bool -ReportIsNullOrUndefined(JSContext* cx, int spindex, HandleValue v, HandleString fallback); +extern void +ReportIsNullOrUndefined(JSContext* cx, int spindex, HandleValue v); extern void ReportMissingArg(JSContext* cx, js::HandleValue v, unsigned arg); @@ -1034,17 +1034,12 @@ int spindex, HandleValue v, HandleString fallback, const char* arg1, const char* arg2); -#define ReportValueError(cx,errorNumber,spindex,v,fallback) \ - ((void)ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, \ - spindex, v, fallback, nullptr, nullptr)) - -#define ReportValueError2(cx,errorNumber,spindex,v,fallback,arg1) \ - ((void)ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, \ - spindex, v, fallback, arg1, nullptr)) - -#define ReportValueError3(cx,errorNumber,spindex,v,fallback,arg1,arg2) \ - ((void)ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, \ - spindex, v, fallback, arg1, arg2)) +inline void +ReportValueError(JSContext* cx, const unsigned errorNumber, int spindex, HandleValue v, + HandleString fallback, const char* arg1 = nullptr, const char* arg2 = nullptr) +{ + ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, arg2); +} JSObject* CreateErrorNotesArray(JSContext* cx, JSErrorReport* report); @@ -1178,6 +1173,22 @@ MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; +// A token used to prove you can safely access the atoms zone. This zone is +// accessed by the main thread and by off-thread parsing. There are two +// situations in which it is safe: +// +// - the current thread holds the exclusive access lock (off-thread parsing may +// be running and this must also take the lock for access) +// +// - the GC is running and is collecting the atoms zone (this cannot be started +// while off-thread parsing is happening) +class MOZ_STACK_CLASS AutoAccessAtomsZone +{ + public: + MOZ_IMPLICIT AutoAccessAtomsZone(const AutoLockForExclusiveAccess& lock) {} + MOZ_IMPLICIT AutoAccessAtomsZone(const gc::AutoCheckCanAccessAtomsDuringGC& canAccess) {} +}; + class MOZ_RAII AutoKeepAtoms { JSContext* cx; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSContext-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSContext-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -181,7 +181,7 @@ * depends on other objects not having been swept yet. */ #define START_ASSERT_SAME_COMPARTMENT() \ - if (cx->heapState != JS::HeapState::Idle) \ + if (JS::RuntimeHeapIsCollecting()) \ return; \ CompartmentChecker c(cx) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSFunction.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSFunction.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSFunction.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSFunction.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -116,8 +116,7 @@ void js::ThrowTypeErrorBehavior(JSContext* cx) { - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_THROW_TYPE_ERROR); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_THROW_TYPE_ERROR); } static bool @@ -311,8 +310,7 @@ MOZ_ASSERT(!callerFun->isBuiltin(), "non-builtin iterator returned a builtin?"); if (callerFun->strict()) { - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_CALLER_IS_STRICT); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CALLER_IS_STRICT); return false; } } @@ -380,8 +378,7 @@ MOZ_ASSERT(!callerFun->isBuiltin(), "non-builtin iterator returned a builtin?"); if (callerFun->strict()) { - JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_CALLER_IS_STRICT); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CALLER_IS_STRICT); return false; } @@ -1750,7 +1747,7 @@ { // Steps 1-5. // Block this call if security callbacks forbid it. - Rooted global(cx, &args.callee().global()); + Handle global = cx->global(); if (!GlobalObject::isRuntimeCodeGenEnabled(cx, global)) { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CSP_BLOCKED_FUNCTION); return false; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -2199,7 +2199,7 @@ static bool IsStandardPrototype(JSObject* obj, JSProtoKey key) { - Value v = obj->global().getPrototype(key); + Value v = obj->nonCCWGlobal().getPrototype(key); return v.isObject() && obj == &v.toObject(); } @@ -2241,7 +2241,7 @@ if (!obj->is() || !(obj->as().flags() & JSFunction::NATIVE_CTOR)) return JSProto_Null; - GlobalObject& global = obj->global(); + GlobalObject& global = obj->as().global(); for (size_t k = 0; k < JSProto_LIMIT; ++k) { JSProtoKey key = static_cast(k); if (global.getConstructor(key) == ObjectValue(*obj)) @@ -2624,33 +2624,6 @@ return true; } -/* static */ bool -JSObject::reportReadOnly(JSContext* cx, jsid id, unsigned report) -{ - RootedValue val(cx, IdToValue(id)); - return ReportValueErrorFlags(cx, report, JSMSG_READ_ONLY, - JSDVG_IGNORE_STACK, val, nullptr, - nullptr, nullptr); -} - -/* static */ bool -JSObject::reportNotConfigurable(JSContext* cx, jsid id, unsigned report) -{ - RootedValue val(cx, IdToValue(id)); - return ReportValueErrorFlags(cx, report, JSMSG_CANT_DELETE, - JSDVG_IGNORE_STACK, val, nullptr, - nullptr, nullptr); -} - -/* static */ bool -JSObject::reportNotExtensible(JSContext* cx, HandleObject obj, unsigned report) -{ - RootedValue val(cx, ObjectValue(*obj)); - return ReportValueErrorFlags(cx, report, JSMSG_OBJECT_NOT_EXTENSIBLE, - JSDVG_IGNORE_STACK, val, nullptr, - nullptr, nullptr); -} - bool js::GetPrototypeIfOrdinary(JSContext* cx, HandleObject obj, bool* isOrdinary, MutableHandleObject protop) @@ -3086,10 +3059,10 @@ } RootedValue val(cx, ObjectValue(*obj)); - ReportValueError2(cx, errorNumber, JSDVG_SEARCH_STACK, val, str, - hint == JSTYPE_UNDEFINED - ? "primitive type" - : hint == JSTYPE_STRING ? "string" : "number"); + ReportValueError(cx, errorNumber, JSDVG_SEARCH_STACK, val, str, + hint == JSTYPE_UNDEFINED + ? "primitive type" + : hint == JSTYPE_STRING ? "string" : "number"); return false; } @@ -3273,7 +3246,7 @@ /* * Invokes the ES5 ToObject algorithm on vp, returning the result. If vp might - * already be an object, use ToObject. reportCantConvert controls how null and + * already be an object, use ToObject. reportScanStack controls how null and * undefined errors are reported. * * Callers must handle the already-object case. @@ -3286,7 +3259,7 @@ if (val.isNullOrUndefined()) { if (reportScanStack) { - ReportIsNullOrUndefined(cx, JSDVG_SEARCH_STACK, val, nullptr); + ReportIsNullOrUndefined(cx, JSDVG_SEARCH_STACK, val); } else { JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_CANT_CONVERT_TO, val.isNull() ? "null" : "undefined", "object"); @@ -3559,9 +3532,14 @@ JSObject::dump(js::GenericPrinter& out) const { const JSObject* obj = this; - JSObject* globalObj = &global(); out.printf("object %p\n", obj); - out.printf(" global %p [%s]\n", globalObj, globalObj->getClass()->name); + + if (IsCrossCompartmentWrapper(this)) { + out.printf(" compartment %p\n", compartment()); + } else { + JSObject* globalObj = &nonCCWGlobal(); + out.printf(" global %p [%s]\n", globalObj, globalObj->getClass()->name); + } const Class* clasp = obj->getClass(); out.printf(" class %p %s\n", clasp, clasp->name); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject.h 2018-06-20 17:29:21.000000000 +0000 @@ -429,21 +429,12 @@ */ inline JSObject* enclosingEnvironment() const; - inline js::GlobalObject& global() const; + // Deprecated: call nonCCWGlobal or NativeObject::global() instead! + inline js::GlobalObject& deprecatedGlobal() const; - // In some rare cases the global object's compartment's global may not be - // the same global object. For this reason, we need to take extra care when - // tracing. - // - // These cases are: - // 1) The off-thread parsing task uses a dummy global since it cannot - // share with the actual global being used concurrently on the active - // thread. - // 2) A GC may occur when creating the GlobalObject, in which case the - // compartment global pointer may not yet be set. In this case there is - // nothing interesting to trace in the compartment. - inline bool isOwnGlobal(JSTracer*) const; - inline js::GlobalObject* globalForTracing(JSTracer*) const; + // Cross-compartment wrappers are not associated with a single realm/global, + // so this method asserts the object is not a CCW. + inline js::GlobalObject& nonCCWGlobal() const; /* * ES5 meta-object properties and operations. @@ -475,11 +466,6 @@ MOZ_ALWAYS_INLINE void finalize(js::FreeOp* fop); public: - static bool reportReadOnly(JSContext* cx, jsid id, unsigned report = JSREPORT_ERROR); - static bool reportNotConfigurable(JSContext* cx, jsid id, unsigned report = JSREPORT_ERROR); - static bool reportNotExtensible(JSContext* cx, js::HandleObject obj, - unsigned report = JSREPORT_ERROR); - static bool nonNativeSetProperty(JSContext* cx, js::HandleObject obj, js::HandleId id, js::HandleValue v, js::HandleValue receiver, JS::ObjectOpResult& result); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSObject-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSObject-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -391,8 +391,16 @@ } // namespace js inline js::GlobalObject& -JSObject::global() const +JSObject::deprecatedGlobal() const { + return *realm()->unsafeUnbarrieredMaybeGlobal(); +} + +inline js::GlobalObject& +JSObject::nonCCWGlobal() const +{ + MOZ_ASSERT(!js::IsCrossCompartmentWrapper(this)); + /* * The global is read-barriered so that it is kept live by access through * the Realm. When accessed through a JSObject, however, the global will be @@ -402,18 +410,6 @@ return *realm()->unsafeUnbarrieredMaybeGlobal(); } -inline js::GlobalObject* -JSObject::globalForTracing(JSTracer*) const -{ - return realm()->unsafeUnbarrieredMaybeGlobal(); -} - -inline bool -JSObject::isOwnGlobal(JSTracer* trc) const -{ - return globalForTracing(trc) == this; -} - inline bool JSObject::hasAllFlags(js::BaseShape::Flag flags) const { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSONParser.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSONParser.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/JSONParser.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/JSONParser.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -726,8 +726,10 @@ if (!elements) return false; } - if (!stack.append(elements)) + if (!stack.append(elements)) { + js_delete(elements); return false; + } token = advance(); if (token == ArrayClose) { @@ -748,8 +750,10 @@ if (!properties) return false; } - if (!stack.append(properties)) + if (!stack.append(properties)) { + js_delete(properties); return false; + } token = advanceAfterObjectOpen(); if (token == ObjectClose) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -1707,18 +1707,8 @@ return result.succeed(); } - // Non-standard hack: Allow redefining non-configurable properties if - // JSPROP_REDEFINE_NONCONFIGURABLE is set _and_ the object is a non-DOM - // global. The idea is that a DOM object can never have such a thing on - // its proto chain directly on the web, so we should be OK optimizing - // access to accessors found on such an object. Bug 1105518 contemplates - // removing this hack. - bool skipRedefineChecks = (desc.attributes() & JSPROP_REDEFINE_NONCONFIGURABLE) && - obj->is() && - !obj->getClass()->isDOMClass(); - // Step 4. - if (!IsConfigurable(shapeAttrs) && !skipRedefineChecks) { + if (!IsConfigurable(shapeAttrs)) { if (desc.hasConfigurable() && desc.configurable()) return result.fail(JSMSG_CANT_REDEFINE_PROP); if (desc.hasEnumerable() && desc.enumerable() != IsEnumerable(shapeAttrs)) @@ -1753,7 +1743,7 @@ } } else if (desc.isDataDescriptor() != IsDataDescriptor(shapeAttrs)) { // Step 6. - if (!IsConfigurable(shapeAttrs) && !skipRedefineChecks) + if (!IsConfigurable(shapeAttrs)) return result.fail(JSMSG_CANT_REDEFINE_PROP); // Fill in desc fields with default values (steps 6.b.i and 6.c.i). @@ -1763,7 +1753,7 @@ bool frozen = !IsConfigurable(shapeAttrs) && !IsWritable(shapeAttrs); // Step 7.a.i.1. - if (frozen && desc.hasWritable() && desc.writable() && !skipRedefineChecks) + if (frozen && desc.hasWritable() && desc.writable()) return result.fail(JSMSG_CANT_REDEFINE_PROP); if (frozen || !desc.hasValue()) { @@ -1780,13 +1770,13 @@ MOZ_ASSERT(!cx->helperThread()); if (!SameValue(cx, desc.value(), currentValue, &same)) return false; - if (!same && !skipRedefineChecks) + if (!same) return result.fail(JSMSG_CANT_REDEFINE_PROP); } } // Step 7.a.i.3. - if (frozen && !skipRedefineChecks) + if (frozen) return result.succeed(); // Fill in desc.[[Writable]]. @@ -1802,8 +1792,7 @@ if (desc.hasSetterObject()) { // Step 8.a.i. if (!IsConfigurable(shapeAttrs) && - desc.setterObject() != prop.shape()->setterObject() && - !skipRedefineChecks) + desc.setterObject() != prop.shape()->setterObject()) { return result.fail(JSMSG_CANT_REDEFINE_PROP); } @@ -1814,8 +1803,7 @@ if (desc.hasGetterObject()) { // Step 8.a.ii. if (!IsConfigurable(shapeAttrs) && - desc.getterObject() != prop.shape()->getterObject() && - !skipRedefineChecks) + desc.getterObject() != prop.shape()->getterObject()) { return result.fail(JSMSG_CANT_REDEFINE_PROP); } @@ -1933,7 +1921,7 @@ MOZ_ASSERT(index >= obj->as().length()); // We (wrongly) ignore out of range defines. - return result.succeed(); + return result.failSoft(JSMSG_BAD_INDEX); } } else if (obj->is()) { // If this method is called with either |length| or |@@iterator|, the @@ -2640,9 +2628,12 @@ // current behavior. (ES6 currently says to throw for this in // strict mode code, so we may eventually need to change.) uint32_t len = obj->as().length(); - if (index < len) + if (index < len) { TypedArrayObject::setElement(obj->as(), index, d); - return result.succeed(); + return result.succeed(); + } + + return result.failSoft(JSMSG_BAD_INDEX); } if (WouldDefinePastNonwritableLength(obj, index)) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject.h 2018-06-20 17:29:21.000000000 +0000 @@ -1472,6 +1472,11 @@ void sweepDictionaryListPointer(); void updateDictionaryListPointerAfterMinorGC(NativeObject* old); + // Native objects are never wrappers, so a native object always has a realm + // and global. + inline js::GlobalObject& global() const; + JS::Realm* realm() const { return JSObject::realm(); } + /* JIT Accessors */ static size_t offsetOfElements() { return offsetof(NativeObject, elements_); } static size_t offsetOfFixedElements() { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/NativeObject-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/NativeObject-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -669,6 +669,12 @@ return GetBackgroundAllocKind(kind); } +inline js::GlobalObject& +NativeObject::global() const +{ + return nonCCWGlobal(); +} + inline js::gc::AllocKind PlainObject::allocKindForTenure() const { @@ -961,8 +967,9 @@ { if (args.isConstructing()) return true; - return JS_ReportErrorFlagsAndNumberASCII(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_BUILTIN_CTOR_NO_NEW, builtinName); + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BUILTIN_CTOR_NO_NEW, + builtinName); + return false; } inline bool diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Realm.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Realm.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Realm.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Realm.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -282,7 +282,7 @@ savedStacks_.trace(trc); // Atoms are always tenured. - if (!JS::CurrentThreadIsHeapMinorCollecting()) + if (!JS::RuntimeHeapIsMinorCollecting()) varNames_.trace(trc); } @@ -308,7 +308,7 @@ "on-stack object pending metadata"); } - if (!JS::CurrentThreadIsHeapMinorCollecting()) { + if (!JS::RuntimeHeapIsMinorCollecting()) { // The global is never nursery allocated, so we don't need to // trace it when doing a minor collection. // @@ -343,7 +343,7 @@ // keys of the map to hold the JSScript alive. if (scriptCountsMap && trc->runtime()->profilingScripts && - !JS::CurrentThreadIsHeapMinorCollecting()) + !JS::RuntimeHeapIsMinorCollecting()) { MOZ_ASSERT_IF(!trc->runtime()->isBeingDestroyed(), collectCoverage()); for (ScriptCountsMap::Range r = scriptCountsMap->all(); !r.empty(); r.popFront()) { @@ -1049,6 +1049,15 @@ return realm->maybeGlobal(); } +JS_PUBLIC_API(bool) +JS::InitRealmStandardClasses(JSContext* cx) +{ + MOZ_ASSERT(!cx->zone()->isAtomsZone()); + AssertHeapIsIdle(); + CHECK_REQUEST(cx); + return GlobalObject::initStandardClasses(cx, cx->global()); +} + JS_PUBLIC_API(JSObject*) JS::GetRealmObjectPrototype(JSContext* cx) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/RegExpObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/RegExpObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/RegExpObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/RegExpObject.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -144,12 +144,12 @@ // Determine whether tracing is happening during normal marking. We need to // test all the following conditions, since: // - // 1. During TraceRuntime, CurrentThreadIsHeapBusy() is true, but the + // 1. During TraceRuntime, RuntimeHeapIsBusy() is true, but the // tracer might not be a marking tracer. // 2. When a write barrier executes, IsMarkingTracer is true, but - // CurrentThreadIsHeapBusy() will be false. + // RuntimeHeapIsBusy() will be false. - return JS::CurrentThreadIsHeapCollecting() && trc->isMarkingTracer(); + return JS::RuntimeHeapIsCollecting() && trc->isMarkingTracer(); } void @@ -1423,8 +1423,7 @@ UniqueChars utf8(JS::CharsToNewUTF8CharsZ(nullptr, range).c_str()); if (!utf8) return false; - JS_ReportErrorFlagsAndNumberUTF8(cx, JSREPORT_ERROR, GetErrorMessage, nullptr, - JSMSG_BAD_REGEXP_FLAG, utf8.get()); + JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_BAD_REGEXP_FLAG, utf8.get()); return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Runtime.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Runtime.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Runtime.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Runtime.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -132,6 +132,7 @@ activeThreadHasScriptDataAccess(false), #endif numActiveHelperThreadZones(0), + heapState_(JS::HeapState::Idle), numRealms(0), localeCallbacks(nullptr), defaultLocale(nullptr), @@ -165,6 +166,10 @@ jitSupportsSimd(false), offthreadIonCompilationEnabled_(true), parallelParsingEnabled_(true), +#ifdef DEBUG + offThreadParsesRunning_(0), + offThreadParsingBlocked_(false), +#endif autoWritableJitCodeActive_(false), oomCallback(nullptr), debuggerMallocSizeOf(ReturnZeroSize), @@ -255,7 +260,7 @@ void JSRuntime::destroyRuntime() { - MOZ_ASSERT(!JS::CurrentThreadIsHeapBusy()); + MOZ_ASSERT(!JS::RuntimeHeapIsBusy()); MOZ_ASSERT(childRuntimeCount == 0); MOZ_ASSERT(initialized_); @@ -726,7 +731,7 @@ { MOZ_ASSERT_IF(allocFunc != AllocFunction::Realloc, !reallocPtr); - if (JS::CurrentThreadIsHeapBusy()) + if (JS::RuntimeHeapIsBusy()) return nullptr; if (!oom::IsSimulatedOOMAllocation()) { @@ -777,7 +782,7 @@ bool JSRuntime::createAtomsAddedWhileSweepingTable() { - MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(!atomsAddedWhileSweeping_); atomsAddedWhileSweeping_ = js_new(); @@ -795,7 +800,7 @@ void JSRuntime::destroyAtomsAddedWhileSweepingTable() { - MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsCollecting()); MOZ_ASSERT(atomsAddedWhileSweeping_); js_delete(atomsAddedWhileSweeping_.ref()); @@ -807,6 +812,7 @@ { MOZ_ASSERT(!zone->usedByHelperThread()); MOZ_ASSERT(!zone->wasGCStarted()); + MOZ_ASSERT(!isOffThreadParsingBlocked()); zone->setUsedByHelperThread(); numActiveHelperThreadZones++; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Runtime.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Runtime.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Runtime.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Runtime.h 2018-06-20 17:29:21.000000000 +0000 @@ -61,6 +61,10 @@ class TraceLoggerThread; #endif +namespace gc { +class AutoHeapSession; +} + } // namespace js struct DtoaState; @@ -481,6 +485,9 @@ // Number of zones which may be operated on by helper threads. mozilla::Atomic numActiveHelperThreadZones; + // Any GC activity affecting the heap. + mozilla::Atomic heapState_; + friend class js::AutoLockForExclusiveAccess; friend class js::AutoLockScriptData; @@ -508,6 +515,10 @@ } #endif + JS::HeapState heapState() const { + return heapState_; + } + // How many realms there are across all zones. This number includes // off-thread context realms, so it isn't necessarily equal to the // number of realms visited by RealmsIter. @@ -695,15 +706,15 @@ private: // Set of all atoms other than those in permanentAtoms and staticStrings. // Reading or writing this set requires the calling thread to use - // AutoLockForExclusiveAccess. + // AutoAccessAtomsZone. js::ExclusiveAccessLockOrGCTaskData atoms_; // Set of all atoms added while the main atoms table is being swept. - js::ExclusiveAccessLockData atomsAddedWhileSweeping_; + js::ExclusiveAccessLockOrGCTaskData atomsAddedWhileSweeping_; // Set of all live symbols produced by Symbol.for(). All such symbols are - // allocated in the atomsZone. Reading or writing the symbol registry - // requires the calling thread to use AutoLockForExclusiveAccess. + // allocated in the atoms zone. Reading or writing the symbol registry + // requires the calling thread to use AutoAccessAtomsZone. js::ExclusiveAccessLockOrGCTaskData symbolRegistry_; public: @@ -712,11 +723,11 @@ bool atomsAreFinished() const { return !atoms_; } js::AtomSet* atomsForSweeping() { - MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsCollecting()); return atoms_; } - js::AtomSet& atoms(js::AutoLockForExclusiveAccess& lock) { + js::AtomSet& atoms(const js::AutoAccessAtomsZone& access) { MOZ_ASSERT(atoms_); return *atoms_; } @@ -731,10 +742,10 @@ return atomsAddedWhileSweeping_; } - const JS::Zone* atomsZone(const js::AutoLockForExclusiveAccess& lock) const { + const JS::Zone* atomsZone(const js::AutoAccessAtomsZone& access) const { return gc.atomsZone; } - JS::Zone* atomsZone(const js::AutoLockForExclusiveAccess& lock) { + JS::Zone* atomsZone(const js::AutoAccessAtomsZone& access) { return gc.atomsZone; } JS::Zone* unsafeAtomsZone() { @@ -747,7 +758,7 @@ bool activeGCInAtomsZone(); - js::SymbolRegistry& symbolRegistry(js::AutoLockForExclusiveAccess& lock) { + js::SymbolRegistry& symbolRegistry(const js::AutoAccessAtomsZone& access) { return symbolRegistry_.ref(); } js::SymbolRegistry& unsafeSymbolRegistry() { @@ -850,6 +861,11 @@ mozilla::Atomic offthreadIonCompilationEnabled_; mozilla::Atomic parallelParsingEnabled_; +#ifdef DEBUG + mozilla::Atomic offThreadParsesRunning_; + mozilla::Atomic offThreadParsingBlocked_; +#endif + js::MainThreadData autoWritableJitCodeActive_; public: @@ -869,6 +885,38 @@ return parallelParsingEnabled_; } +#ifdef DEBUG + + bool isOffThreadParseRunning() const { + return offThreadParsesRunning_; + } + + void incOffThreadParsesRunning() { + MOZ_ASSERT(!isOffThreadParsingBlocked()); + offThreadParsesRunning_++; + } + + void decOffThreadParsesRunning() { + MOZ_ASSERT(isOffThreadParseRunning()); + offThreadParsesRunning_--; + } + + bool isOffThreadParsingBlocked() const { + return offThreadParsingBlocked_; + } + void setOffThreadParsingBlocked(bool blocked) { + MOZ_ASSERT(offThreadParsingBlocked_ != blocked); + MOZ_ASSERT(!isOffThreadParseRunning()); + offThreadParsingBlocked_ = blocked; + } + +#else + + void incOffThreadParsesRunning() {} + void decOffThreadParsesRunning() {} + +#endif + void toggleAutoWritableJitCodeActive(bool b) { MOZ_ASSERT(autoWritableJitCodeActive_ != b, "AutoWritableJitCode should not be nested."); autoWritableJitCodeActive_ = b; @@ -914,7 +962,7 @@ } // For inherited heap state accessors. - friend class js::gc::AutoTraceSession; + friend class js::gc::AutoHeapSession; friend class JS::AutoEnterCycleCollection; private: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Scope.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Scope.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Scope.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Scope.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -6,6 +6,9 @@ #include "vm/Scope.h" +#include +#include + #include "builtin/ModuleObject.h" #include "gc/Allocator.h" #include "gc/FreeOp.h" @@ -143,32 +146,24 @@ { // Make sure the binding names are marked in the context's zone, if we are // copying data from another zone. - BindingName* names = nullptr; - uint32_t length = 0; - ConcreteScope::getDataNamesAndLength(data, &names, &length); + BindingName* names = data->trailingNames.start(); + uint32_t length = data->length; for (size_t i = 0; i < length; i++) { if (JSAtom* name = names[i].name()) cx->markAtom(name); } - size_t dataSize = ConcreteScope::sizeOfData(data->length); - size_t headerSize = sizeof(typename ConcreteScope::Data); - MOZ_ASSERT(dataSize >= headerSize); - size_t extraSize = dataSize - headerSize; - - uint8_t* copyBytes = cx->zone()->pod_malloc(dataSize); - if (!copyBytes) { + size_t size = SizeOfData(data->length); + void* bytes = cx->zone()->pod_malloc(size); + if (!bytes) { ReportOutOfMemory(cx); return nullptr; } - auto dataCopy = reinterpret_cast(copyBytes); - new (dataCopy) typename ConcreteScope::Data(*data); + auto* dataCopy = new (bytes) typename ConcreteScope::Data(*data); - uint8_t* extra = reinterpret_cast(data.get()) + headerSize; - uint8_t* extraCopy = copyBytes + headerSize; + std::uninitialized_copy_n(names, length, dataCopy->trailingNames.start()); - mozilla::PodCopy(extraCopy, extra, extraSize); return UniquePtr(dataCopy); } @@ -203,7 +198,8 @@ static UniquePtr NewEmptyScopeData(JSContext* cx, uint32_t length = 0) { - uint8_t* bytes = cx->zone()->pod_malloc(ConcreteScope::sizeOfData(length)); + size_t dataSize = SizeOfData(length); + uint8_t* bytes = cx->zone()->pod_malloc(dataSize); if (!bytes) ReportOutOfMemory(cx); auto data = reinterpret_cast(bytes); @@ -212,6 +208,9 @@ return UniquePtr(data); } +static constexpr size_t HasAtomMask = 1; +static constexpr size_t HasAtomShift = 1; + static XDRResult XDRBindingName(XDRState* xdr, BindingName* bindingName) { @@ -220,7 +219,9 @@ RootedAtom atom(cx, bindingName->name()); bool hasAtom = !!atom; - uint8_t u8 = uint8_t(hasAtom << 1) | uint8_t(bindingName->closedOver()); + uint8_t flags = bindingName->flagsForXDR(); + MOZ_ASSERT(((flags << HasAtomShift) >> HasAtomShift) == flags); + uint8_t u8 = (flags << HasAtomShift) | uint8_t(hasAtom); MOZ_TRY(xdr->codeUint8(&u8)); if (hasAtom) @@ -237,14 +238,13 @@ uint8_t u8; MOZ_TRY(xdr->codeUint8(&u8)); - bool closedOver = u8 & 1; - bool hasAtom = u8 >> 1; - + bool hasAtom = u8 & HasAtomMask; RootedAtom atom(cx); if (hasAtom) MOZ_TRY(XDRAtom(xdr, &atom)); - *bindingName = BindingName(atom, closedOver); + uint8_t flags = u8 >> HasAtomShift; + *bindingName = BindingName::fromXDR(atom, flags); return Ok(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Scope.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Scope.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Scope.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Scope.h 2018-06-20 17:29:21.000000000 +0000 @@ -8,8 +8,11 @@ #define vm_Scope_h #include "mozilla/Maybe.h" +#include "mozilla/TypeTraits.h" #include "mozilla/Variant.h" +#include + #include "jsutil.h" #include "gc/DeletePolicy.h" @@ -127,6 +130,25 @@ (isTopLevelFunction? TopLevelFunctionFlag : 0x0)) { } + private: + // For fromXDR. + BindingName(JSAtom* name, uint8_t flags) + : bits_(uintptr_t(name) | flags) + { + static_assert(FlagMask < alignof(JSAtom), + "Flags should fit into unused bits of JSAtom pointer"); + MOZ_ASSERT((flags & FlagMask) == flags); + } + + public: + static BindingName fromXDR(JSAtom* name, uint8_t flags) { + return BindingName(name, flags); + } + + uint8_t flagsForXDR() const { + return static_cast(bits_ & FlagMask); + } + JSAtom* name() const { return reinterpret_cast(bits_ & ~FlagMask); } @@ -404,6 +426,20 @@ void dump(); }; +/** Empty base class for scope Data classes to inherit from. */ +class BaseScopeData +{}; + +template +inline size_t +SizeOfData(uint32_t numBindings) +{ + static_assert(mozilla::IsBaseOf::value, + "Data must be the correct sort of data, i.e. it must " + "inherit from BaseScopeData"); + return sizeof(Data) + (numBindings ? numBindings - 1 : 0) * sizeof(BindingName); +} + // // A lexical scope that holds let and const bindings. There are 4 kinds of // LexicalScopes. @@ -433,7 +469,7 @@ public: // Data is public because it is created by the frontend. See // Parser::newLexicalScopeData. - struct Data + struct Data : BaseScopeData { // Bindings are sorted by kind in both frames and environments. // @@ -456,15 +492,6 @@ void trace(JSTracer* trc); }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static LexicalScope* create(JSContext* cx, ScopeKind kind, Handle data, uint32_t firstFrameSlot, HandleScope enclosing); @@ -539,7 +566,7 @@ public: // Data is public because it is created by the // frontend. See Parser::newFunctionScopeData. - struct Data + struct Data : BaseScopeData { // The canonical function of the scope, as during a scope walk we // often query properties of the JSFunction (e.g., is the function an @@ -582,15 +609,6 @@ Zone* zone() const; }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static FunctionScope* create(JSContext* cx, Handle data, bool hasParameterExprs, bool needsEnvironment, HandleFunction fun, HandleScope enclosing); @@ -667,7 +685,7 @@ public: // Data is public because it is created by the // frontend. See Parser::newVarScopeData. - struct Data + struct Data : BaseScopeData { // All bindings are vars. uint32_t length = 0; @@ -686,15 +704,6 @@ void trace(JSTracer* trc); }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static VarScope* create(JSContext* cx, ScopeKind kind, Handle data, uint32_t firstFrameSlot, bool needsEnvironment, HandleScope enclosing); @@ -760,7 +769,7 @@ public: // Data is public because it is created by the frontend. See // Parser::newGlobalScopeData. - struct Data + struct Data : BaseScopeData { // Bindings are sorted by kind. // `vars` includes top-level functions which is distinguished by a bit @@ -783,15 +792,6 @@ void trace(JSTracer* trc); }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static GlobalScope* create(JSContext* cx, ScopeKind kind, Handle data); static GlobalScope* createEmpty(JSContext* cx, ScopeKind kind) { @@ -865,7 +865,7 @@ public: // Data is public because it is created by the frontend. See // Parser::newEvalScopeData. - struct Data + struct Data : BaseScopeData { // All bindings in an eval script are 'var' bindings. The implicit // lexical scope around the eval is present regardless of strictness @@ -891,15 +891,6 @@ void trace(JSTracer* trc); }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static EvalScope* create(JSContext* cx, ScopeKind kind, Handle data, HandleScope enclosing); @@ -970,7 +961,7 @@ public: // Data is public because it is created by the frontend. See // Parser::newModuleScopeData. - struct Data + struct Data : BaseScopeData { // The module of the scope. GCPtr module = {}; @@ -1001,15 +992,6 @@ Zone* zone() const; }; - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - - static void getDataNamesAndLength(Data* data, BindingName** names, uint32_t* length) { - *names = data->trailingNames.start(); - *length = data->length; - } - static ModuleScope* create(JSContext* cx, Handle data, Handle module, HandleScope enclosing); @@ -1046,7 +1028,7 @@ static const ScopeKind classScopeKind_ = ScopeKind::WasmInstance; public: - struct Data + struct Data : BaseScopeData { uint32_t memoriesStart = 0; uint32_t globalsStart = 0; @@ -1066,10 +1048,6 @@ static WasmInstanceScope* create(JSContext* cx, WasmInstanceObject* instance); - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - private: Data& data() { return *reinterpret_cast(data_); @@ -1109,7 +1087,7 @@ static const ScopeKind classScopeKind_ = ScopeKind::WasmFunction; public: - struct Data + struct Data : BaseScopeData { uint32_t length = 0; uint32_t nextFrameSlot = 0; @@ -1125,10 +1103,6 @@ static WasmFunctionScope* create(JSContext* cx, HandleScope enclosing, uint32_t funcIndex); - static size_t sizeOfData(uint32_t length) { - return sizeof(Data) + (length ? length - 1 : 0) * sizeof(BindingName); - } - private: Data& data() { return *reinterpret_cast(data_); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SelfHosting.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SelfHosting.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SelfHosting.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SelfHosting.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -650,7 +650,7 @@ if (strict && !result.checkStrict(cx, obj, id)) return false; - args.rval().setBoolean(bool(result)); + args.rval().setBoolean(result.reallyOk()); return true; } @@ -2906,8 +2906,8 @@ if (nameMissing) { RootedValue value(cx, IdToValue(id)); - return ReportValueErrorFlags(cx, JSREPORT_ERROR, JSMSG_NO_SUCH_SELF_HOSTED_PROP, - JSDVG_IGNORE_STACK, value, nullptr, nullptr, nullptr); + ReportValueError(cx, JSMSG_NO_SUCH_SELF_HOSTED_PROP, JSDVG_IGNORE_STACK, value, nullptr); + return false; } #endif // DEBUG diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Shape.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Shape.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Shape.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Shape.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -2021,7 +2021,7 @@ #endif static bool -IsOriginalProto(GlobalObject* global, JSProtoKey key, JSObject& proto) +IsOriginalProto(GlobalObject* global, JSProtoKey key, NativeObject& proto) { if (global->getPrototype(key) != ObjectValue(proto)) return false; @@ -2051,9 +2051,9 @@ static JSProtoKey GetInitialShapeProtoKey(TaggedProto proto, JSContext* cx) { - if (proto.isObject() && proto.toObject()->hasStaticPrototype()) { + if (proto.isObject() && proto.toObject()->isNative()) { GlobalObject* global = cx->global(); - JSObject& obj = *proto.toObject(); + NativeObject& obj = proto.toObject()->as(); MOZ_ASSERT(global == &obj.global()); if (IsOriginalProto(global, JSProto_Object, obj)) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Stack-inl.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Stack-inl.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/Stack-inl.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/Stack-inl.h 2018-06-20 17:29:21.000000000 +0000 @@ -24,6 +24,7 @@ #include "jit/BaselineFrame-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" +#include "vm/NativeObject-inl.h" namespace js { @@ -36,7 +37,7 @@ inline GlobalObject& InterpreterFrame::global() const { - return environmentChain()->global(); + return script()->global(); } inline JSObject& diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SymbolType.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SymbolType.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SymbolType.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SymbolType.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -20,9 +20,9 @@ Symbol* Symbol::newInternal(JSContext* cx, JS::SymbolCode code, uint32_t hash, JSAtom* description, - AutoLockForExclusiveAccess& lock) + const AutoAccessAtomsZone& access) { - MOZ_ASSERT(cx->zone() == cx->atomsZone(lock)); + MOZ_ASSERT(cx->zone() == cx->atomsZone(access)); // Following js::AtomizeString, we grudgingly forgo last-ditch GC here. Symbol* p = Allocate(cx); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SymbolType.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SymbolType.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/SymbolType.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/SymbolType.h 2018-06-20 17:29:21.000000000 +0000 @@ -25,7 +25,7 @@ #include "vm/StringType.h" namespace js { -class AutoLockForExclusiveAccess; +class AutoAccessAtomsZone; } // namespace js namespace JS { @@ -60,7 +60,7 @@ static Symbol* newInternal(JSContext* cx, SymbolCode code, js::HashNumber hash, - JSAtom* description, js::AutoLockForExclusiveAccess& lock); + JSAtom* description, const js::AutoAccessAtomsZone& access); public: static Symbol* new_(JSContext* cx, SymbolCode code, JSString* description); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/TypedArrayObject.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/TypedArrayObject.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/TypedArrayObject.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/TypedArrayObject.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -2228,8 +2228,11 @@ // Steps iv-v. // We (wrongly) ignore out of range defines with a value. uint32_t length = obj->as().length(); - if (index >= length) - return result.succeed(); + if (index >= length) { + if (obj->as().hasDetachedBuffer()) + return result.failSoft(JSMSG_TYPED_ARRAY_DETACHED); + return result.failSoft(JSMSG_BAD_INDEX); + } // Step vi. if (desc.isAccessorDescriptor()) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/TypeInference.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/TypeInference.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/vm/TypeInference.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/vm/TypeInference.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -3557,7 +3557,7 @@ // the realm's global is dead, we don't do anything as the group's // Class is not going to change in that case. JSObject* obj = *ptr; - GlobalObject* global = obj->realm()->unsafeUnbarrieredMaybeGlobal(); + GlobalObject* global = obj->as().realm()->unsafeUnbarrieredMaybeGlobal(); if (global && !obj->isSingleton()) { JSObject* objectProto = global->maybeGetPrototype(JSProto_Object); obj->setGroup(objectProto->groupRaw()); @@ -4145,7 +4145,7 @@ /* static */ void TypeNewScript::writeBarrierPre(TypeNewScript* newScript) { - if (JS::CurrentThreadIsHeapCollecting()) + if (JS::RuntimeHeapIsCollecting()) return; JS::Zone* zone = newScript->function()->zoneFromAnyThread(); @@ -4185,7 +4185,7 @@ checkMagic(); // ConstraintTypeSets only hold strong references during minor collections. - MOZ_ASSERT(JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(JS::RuntimeHeapIsMinorCollecting()); unsigned objectCount = baseObjectCount(); if (objectCount >= 2) { @@ -4263,7 +4263,7 @@ // IsAboutToBeFinalized doesn't work right on tenured objects when called // during a minor collection. - MOZ_ASSERT(!JS::CurrentThreadIsHeapMinorCollecting()); + MOZ_ASSERT(!JS::RuntimeHeapIsMinorCollecting()); } void diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/AsmJS.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/AsmJS.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/AsmJS.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/AsmJS.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -1384,7 +1384,7 @@ // // ModuleValidator is marked as rooted in the rooting analysis. Don't add // non-JSAtom pointers, or this will break! -class MOZ_STACK_CLASS ModuleValidator +class MOZ_STACK_CLASS JS_HAZ_ROOTED ModuleValidator { public: class Func diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmModule.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmModule.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmModule.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmModule.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -1269,7 +1269,7 @@ const ShareableBytes* maybeBytecode = nullptr; if (cx->realm()->isDebuggee() || metadata().debugEnabled || - !metadata().funcNames.empty()) + !metadata().funcNames.empty() || !!metadata().moduleName) { maybeBytecode = bytecode_.get(); } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmTypes.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmTypes.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmTypes.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmTypes.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -24,6 +24,7 @@ #include "wasm/WasmSerialize.h" #include "vm/JSObject-inl.h" +#include "vm/NativeObject-inl.h" using namespace js; using namespace js::jit; @@ -46,11 +47,19 @@ # endif #endif -// Another sanity check. +// More sanity checks. static_assert(MaxMemoryInitialPages <= ArrayBufferObject::MaxBufferByteLength / PageSize, "Memory sizing constraint"); +// All plausible targets must be able to do at least IEEE754 double +// loads/stores, hence the lower limit of 8. Some Intel processors support +// AVX-512 loads/stores, hence the upper limit of 64. +static_assert(MaxMemoryAccessSize >= 8, "MaxMemoryAccessSize too low"); +static_assert(MaxMemoryAccessSize <= 64, "MaxMemoryAccessSize too high"); +static_assert((MaxMemoryAccessSize & (MaxMemoryAccessSize-1)) == 0, + "MaxMemoryAccessSize is not a power of two"); + void Val::writePayload(uint8_t* dst) const { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmTypes.h firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmTypes.h --- firefox-trunk-62.0~a1~hg20180611r422292/js/src/wasm/WasmTypes.h 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/src/wasm/WasmTypes.h 2018-06-20 17:29:21.000000000 +0000 @@ -653,6 +653,7 @@ ValType type() const { return type_; } bool isSimd() const { return IsSimdType(type()); } + static constexpr size_t sizeofLargestValue() { return sizeof(u); } uint32_t i32() const { MOZ_ASSERT(type_ == ValType::I32); return u.i32_; } uint64_t i64() const { MOZ_ASSERT(type_ == ValType::I64); return u.i64_; } @@ -1993,7 +1994,7 @@ // catch the overflow. MaxMemoryAccessSize is a conservative approximation of // the maximum guard space needed to catch all unaligned overflows. -static const unsigned MaxMemoryAccessSize = sizeof(Val); +static const unsigned MaxMemoryAccessSize = Val::sizeofLargestValue(); #ifdef WASM_HUGE_MEMORY diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/loader/ScriptPreloader.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/loader/ScriptPreloader.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/loader/ScriptPreloader.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/loader/ScriptPreloader.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -32,8 +32,9 @@ #include "nsXULAppAPI.h" #include "xpcpublic.h" -#define DELAYED_STARTUP_TOPIC "browser-delayed-startup-finished" +#define STARTUP_COMPLETE_TOPIC "browser-delayed-startup-finished" #define DOC_ELEM_INSERTED_TOPIC "document-element-inserted" +#define CACHE_WRITE_TOPIC "browser-idle-startup-tasks-finished" #define CLEANUP_TOPIC "xpcom-shutdown" #define SHUTDOWN_TOPIC "quit-application-granted" #define CACHE_INVALIDATE_TOPIC "startupcache-invalidate" @@ -231,8 +232,9 @@ if (XRE_IsParentProcess()) { // In the parent process, we want to freeze the script cache as soon - // as delayed startup for the first browser window has completed. - obs->AddObserver(this, DELAYED_STARTUP_TOPIC, false); + // as idle tasks for the first browser window have completed. + obs->AddObserver(this, STARTUP_COMPLETE_TOPIC, false); + obs->AddObserver(this, CACHE_WRITE_TOPIC, false); } else { // In the child process, we need to freeze the script cache before any // untrusted code has been executed. The insertion of the first DOM @@ -338,12 +340,16 @@ ScriptPreloader::Observe(nsISupports* subject, const char* topic, const char16_t* data) { nsCOMPtr obs = services::GetObserverService(); - if (!strcmp(topic, DELAYED_STARTUP_TOPIC)) { - obs->RemoveObserver(this, DELAYED_STARTUP_TOPIC); + if (!strcmp(topic, STARTUP_COMPLETE_TOPIC)) { + obs->RemoveObserver(this, STARTUP_COMPLETE_TOPIC); MOZ_ASSERT(XRE_IsParentProcess()); mStartupFinished = true; + } else if (!strcmp(topic, CACHE_WRITE_TOPIC)) { + obs->RemoveObserver(this, CACHE_WRITE_TOPIC); + MOZ_ASSERT(mStartupFinished); + MOZ_ASSERT(XRE_IsParentProcess()); if (mChildCache) { Unused << NS_NewNamedThread("SaveScripts", diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/nsXPConnect.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/nsXPConnect.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/nsXPConnect.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/nsXPConnect.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -73,7 +73,9 @@ { XPCJSContext::InitTLS(); +#ifdef MOZ_GECKO_PROFILER JS::SetProfilingThreadCallbacks(profiler_register_thread, profiler_unregister_thread); +#endif XPCJSContext* xpccx = XPCJSContext::NewXPCJSContext(nullptr); if (!xpccx) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/Sandbox.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/Sandbox.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/Sandbox.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/Sandbox.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -1134,7 +1134,7 @@ // Ensure |Object.prototype| is instantiated before prototype- // splicing below. - if (!JS_GetObjectPrototype(cx, sandbox)) + if (!JS::GetRealmObjectPrototype(cx)) return NS_ERROR_XPC_UNEXPECTED; if (options.proto) { diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/XPCWrappedNative.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/XPCWrappedNative.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/XPCWrappedNative.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/XPCWrappedNative.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -191,7 +191,7 @@ JSAutoRealm ar(cx, global); // If requested, initialize the standard classes on the global. - if (initStandardClasses && ! JS_InitStandardClasses(cx, global)) + if (initStandardClasses && !JS::InitRealmStandardClasses(cx)) return NS_ERROR_FAILURE; // Make a proto. @@ -627,13 +627,9 @@ jsclazz->getResolve() && jsclazz->hasFinalize(), "bad class"); - // XXXbz JS_GetObjectPrototype wants an object, even though it then asserts - // that this object is same-compartment with cx, which means it could just - // use the cx global... - RootedObject global(cx, CurrentGlobalOrNull(cx)); RootedObject protoJSObject(cx, HasProto() ? GetProto()->GetJSProtoObject() : - JS_GetObjectPrototype(cx, global)); + JS::GetRealmObjectPrototype(cx)); if (!protoJSObject) { return false; } diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/XPCWrappedNativeProto.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/XPCWrappedNativeProto.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/src/XPCWrappedNativeProto.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/src/XPCWrappedNativeProto.cpp 2018-06-20 17:29:21.000000000 +0000 @@ -55,8 +55,7 @@ AutoJSContext cx; mScriptable = scriptable; - JS::RootedObject global(cx, mScope->GetGlobalJSObject()); - JS::RootedObject proto(cx, JS_GetObjectPrototype(cx, global)); + JS::RootedObject proto(cx, JS::GetRealmObjectPrototype(cx)); mJSProtoObject = JS_NewObjectWithUniqueType(cx, js::Jsvalify(&XPC_WN_Proto_JSClass), proto); diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/tests/chrome/test_xrayToJS.xul firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/tests/chrome/test_xrayToJS.xul --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/tests/chrome/test_xrayToJS.xul 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/tests/chrome/test_xrayToJS.xul 2018-06-20 17:29:21.000000000 +0000 @@ -201,10 +201,7 @@ "pop", "shift", "unshift", "splice", "concat", "slice", "lastIndexOf", "indexOf", "includes", "forEach", "map", "reduce", "reduceRight", "filter", "some", "every", "find", "findIndex", "copyWithin", "fill", Symbol.iterator, Symbol.unscopables, "entries", "keys", - "values", "constructor"]; - if (isNightlyBuild) { - gPrototypeProperties['Array'].push("flat", "flatMap"); - } + "values", "constructor", "flat", "flatMap"]; gConstructorProperties['Array'] = constructorProps(["join", "reverse", "sort", "push", "pop", "shift", "unshift", "splice", "concat", "slice", "isArray", diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/tests/unit/xpcshell.ini firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/tests/unit/xpcshell.ini --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/tests/unit/xpcshell.ini 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/tests/unit/xpcshell.ini 2018-06-20 17:29:21.000000000 +0000 @@ -130,6 +130,7 @@ head = head_watchdog.js [test_watchdog_default.js] head = head_watchdog.js +skip-if = (verify && debug && os == 'android') [test_watchdog_hibernate.js] head = head_watchdog.js [test_weak_keys.js] diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/wrappers/XrayWrapper.cpp firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/wrappers/XrayWrapper.cpp --- firefox-trunk-62.0~a1~hg20180611r422292/js/xpconnect/wrappers/XrayWrapper.cpp 2018-06-11 13:02:25.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/js/xpconnect/wrappers/XrayWrapper.cpp 2018-06-20 17:29:20.000000000 +0000 @@ -1267,23 +1267,51 @@ RootedObject oldHead(cx, srcChain); while (oldHead) { + // If movingIntoXrayCompartment is true, then our new reflector is in a + // compartment that used to have an Xray-with-expandos to the old reflector + // and we should copy the expandos to the new reflector directly. + bool movingIntoXrayCompartment; + + // exclusiveWrapper is only used if movingIntoXrayCompartment ends up true. RootedObject exclusiveWrapper(cx); RootedObject wrapperHolder(cx, JS_GetReservedSlot(oldHead, JSSLOT_EXPANDO_EXCLUSIVE_WRAPPER_HOLDER) .toObjectOrNull()); if (wrapperHolder) { - // The global containing this wrapper holder has an xray for |src| - // with expandos. Create an xray in the global for |dst| which - // will be associated with a clone of |src|'s expando object. - JSAutoRealm ar(cx, UncheckedUnwrap(wrapperHolder)); - exclusiveWrapper = dst; - if (!JS_WrapObject(cx, &exclusiveWrapper)) + RootedObject unwrappedHolder(cx, UncheckedUnwrap(wrapperHolder)); + // unwrappedHolder is the compartment of the relevant Xray, so check + // whether that matches the compartment of cx (which matches the + // compartment of dst). + movingIntoXrayCompartment = + js::IsObjectInContextCompartment(unwrappedHolder, cx); + + if (!movingIntoXrayCompartment) { + // The global containing this wrapper holder has an xray for |src| + // with expandos. Create an xray in the global for |dst| which + // will be associated with a clone of |src|'s expando object. + JSAutoRealm ar(cx, unwrappedHolder); + exclusiveWrapper = dst; + if (!JS_WrapObject(cx, &exclusiveWrapper)) + return false; + } + } else { + JSAutoRealm ar(cx, oldHead); + movingIntoXrayCompartment = + expandoObjectMatchesConsumer(cx, oldHead, ObjectPrincipal(dst)); + } + + if (movingIntoXrayCompartment) { + // Just copy properties directly onto dst. + if (!JS_CopyPropertiesFrom(cx, dst, oldHead)) + return false; + } else { + // Create a new expando object in the compartment of dst to replace + // oldHead. + RootedObject newHead(cx, attachExpandoObject(cx, dst, exclusiveWrapper, + GetExpandoObjectPrincipal(oldHead))); + if (!JS_CopyPropertiesFrom(cx, newHead, oldHead)) return false; } - RootedObject newHead(cx, attachExpandoObject(cx, dst, exclusiveWrapper, - GetExpandoObjectPrincipal(oldHead))); - if (!JS_CopyPropertiesFrom(cx, newHead, oldHead)) - return false; oldHead = JS_GetReservedSlot(oldHead, JSSLOT_EXPANDO_NEXT).toObjectOrNull(); } return true; @@ -1438,7 +1466,7 @@ found = true; } else if (id == GetJSIDByIndex(cx, XPCJSContext::IDX_EVAL)) { RootedObject eval(cx); - if (!js::GetOriginalEval(cx, target, &eval)) + if (!js::GetRealmOriginalEval(cx, &eval)) return false; desc.value().set(ObjectValue(*eval)); found = true; diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/browser/preferences/main.ftl 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (makwongo) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Yeny i mung -title.normal=Yab dirica me mung? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/engineManager.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=Por lok mapire tek -duplicateEngineMsg=I yero lok mapire tek ma latic kwede kombedi obedo "%S". Tim ber iyer mukene. -duplicateBookmarkMsg=I yero lok mapire tek ma kombedi alama buk tye ka tic kwede. Tim ber iyer mukene. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/newTab.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/newTab.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=Kakube maloyo -newtab.userTopSites.heading=Kakube ni maloyo - -newtab.pin=Mwon kakube man kama tye iye kombedi ni -newtab.unpin=Wa kakube man -newtab.block=Kwany kakube man diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=Purugram magi kitwero tic kwedgi me timo %S. - -handleProtocol=%S kakube -handleWebFeeds=Lok me kakube -handleFile=%S gin manonge iye - -descriptionWebApp=Puruguram me kakube man tye iye: -descriptionLocalApp=Puruguram man tye i kabedo: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/clearSiteData.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/clearSiteData.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/clearSiteData.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/clearSiteData.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (clearSiteDataWithEstimates.label, clearCacheWithEstimates.label): -# The parameters in parentheses in these strings describe disk usage -# in the format (size unit), e.g. "Cookies and Site Data (24 KB)" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -clearSiteDataWithEstimates.label = Angija ki Data me kakube (%1$S %2$S) -clearCacheWithEstimates.label = Jami me kakube ma kigwoko (%1$S %2$S) - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = Ter me lamak jami pa %S - -containers.blue.label = Buluu -containers.turquoise.label = Turquoise -containers.green.label = Girin -containers.yellow.label = Yelo -containers.orange.label = Oreny -containers.red.label = Kwar -containers.pink.label = Ping -containers.purple.label = Papul - -containers.fingerprint.label = Keto cing -containers.briefcase.label = Kicaa -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Dollar sign -containers.cart.label = Kikabo me wil -containers.circle.label = Alama -containers.vacation.label = Yweyo -containers.gift.label = Mic -containers.food.label = Dek -containers.fruit.label = Nyig yat -containers.pet.label = Lee -containers.tree.label = Yat -containers.chill.label = Ngico diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/client/webConsole.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/aboutdevtools.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/aboutdevtools.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/aboutdevtools.dtd 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/aboutdevtools.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Cik me Mung man."> - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/aboutdevtools.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/aboutdevtools.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/aboutdevtools.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/aboutdevtools.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE These strings are used in the about:devtools page. - -# LOCALIZATION NOTE (features.learnMore): The text of the learn more link displayed below -# each feature section of about:devtools. Each section presents a quick description of a -# DevTools panel/feature. The learn more link points to the associated MDN page. -features.learnMore=Nong ngec mapol - - -features.console.desc=Gwok peki me CSS, JavaScript, ber bedo ki netwak. - -features.debugger.title=Gin nongo bal - -features.network.title=Netwak -features.network.desc=Nen kwac me netwak ma twero dwoko dwiro onyo gengo kakube mamegi. - - - - - - -# LOCALIZATION NOTE (newsletter.error.common): error text displayed when the newsletter -# subscription failed. The argument will be replaced with request's status code and status -# text (e.g. "404 - Not Found") -newsletter.error.common=Kwac me coone pe olare (%S). - -# LOCALIZATION NOTE (newsletter.error.unknown): error text displayed when the newsletter -# subscription failed for an unexpected reason. -newsletter.error.unknown=Bal mape ki byeko otime. - -# LOCALIZATION NOTE (newsletter.error.timeout): error text displayed when the newsletter -# subscription timed out. -newsletter.error.timeout=Kare me kwac me coone otum woko. - -# LOCALIZATION NOTE (welcome.message): Message displayed when devtools are enabled. -# %S will be replaced with the shortcut to toggle the DevTools toolbox. -welcome.message=Ityeko cako Gitic pa Ludiro maber! Me cako, lim jami ayera pa Ludiro me Kakube onyo yab gitic ne ki %S. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/key-shortcuts.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/key-shortcuts.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/key-shortcuts.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/key-shortcuts.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (toogleToolbox.commandkey): -# Key pressed to open a toolbox with the default panel selected - -# LOCALIZATION NOTE (toogleToolboxF12.commandkey): -# Alternative key pressed to open a toolbox with the default panel selected -toggleToolboxF12.commandkey=VK_F12 - -# LOCALIZATION NOTE (toogleToolbar.commandkey): -# Key pressed to open the Developer Toolbar (a.k.a gcli) -toggleToolbar.commandkey=VK_F2 - -# LOCALIZATION NOTE (webide.commandkey): -# Key pressed to open the Web IDE window -webide.commandkey=VK_F8 - -# LOCALIZATION NOTE (browserToolbox.commandkey): -# Key pressed to open the Browser Toolbox, used for debugging Firefox itself - -# LOCALIZATION NOTE (browserConsole.commandkey): -# Key pressed to open the Browser Console, used for debugging Firefox itself - -# LOCALIZATION NOTE (responsiveDesignMode.commandkey): -# Key pressed to toggle on the Responsive Design Mode - -# LOCALIZATION NOTE (scratchpad.commandkey): -# Key pressed to open the Scratchpad in its own window -scratchpad.commandkey=VK_F4 - -# LOCALIZATION NOTE (inspector.commandkey): -# Key pressed to open a toolbox with the inspector panel selected - -# LOCALIZATION NOTE (webconsole.commandkey): -# Key pressed to open a toolbox with the web console panel selected - -# LOCALIZATION NOTE (debugger.commandkey): -# Key pressed to open a toolbox with the debugger panel selected - -# LOCALIZATION NOTE (netmonitor.commandkey): -# Key pressed to open a toolbox with the network monitor panel selected - -# LOCALIZATION NOTE (styleeditor.commandkey): -# Key pressed to open a toolbox with the style editor panel selected -styleeditor.commandkey=VK_F7 - -# LOCALIZATION NOTE (performance.commandkey): -# Key pressed to open a toolbox with the performance panel selected -performance.commandkey=VK_F5 - -# LOCALIZATION NOTE (storage.commandkey): -# Key pressed to open a toolbox with the storage panel selected -storage.commandkey=VK_F9 - -# LOCALIZATION NOTE (dom.commandkey): -# Key pressed to open a toolbox with the DOM panel selected diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/startup.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/startup.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/devtools/shim/startup.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/devtools/shim/startup.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (enableDevTools.label): -# Label for the menu item displayed in Tools > Developer Tools when DevTools are disabled. -enableDevTools.label=Cak Gitic pa Ludiro… diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=Pe kiyero mo diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:15.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=Pi %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=Kabedo: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ach/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:14.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ach/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (addonUpdateHeader) -# %S will be replace with the localized name of the application -addonUpdateTitle=Ngec manyen me %S - -# LOCALIZATION NOTE (addonUpdateMessage) -# %S will be replace with the localized name of the application -addonUpdateMessage=%S tye ka keto ngec manyen i lamed mamegi… - -addonUpdateCancelMessage=Pud tye kaketo ngec manyen. Imito kuro? - -# LOCALIZATION NOTE (addonUpdateCancelButton) -# %S will be replace with the localized name of the application -addonUpdateCancelButton=Juk keto ngec manyen ka i cak %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Private blaaiery -title.normal=Open 'n private venster? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/engineManager.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=Dupliseer sleutelwoord -duplicateEngineMsg=U het 'n sleutelwoord gekies wat tans deur "%S" gebruik word. Kies 'n ander een. -duplicateBookmarkMsg=U het 'n sleutelwoord gekies wat tans deur 'n boekmerk gebruik word. Kies 'n ander een. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/newTab.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/newTab.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=Topwerwe -newtab.userTopSites.heading=Topwerwe - -newtab.pin=Steek dié werf vas by sy huidige posisie -newtab.unpin=Maak dié werf los -newtab.block=Verwyder dié werf diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=Die volgende toepassings kan gebruik word vir %S. - -handleProtocol=%S-skakels -handleWebFeeds=Webvoere -handleFile=%S-inhoud - -descriptionWebApp=Hierdie webtoepassing word gehuisves by: -descriptionLocalApp=Hierdie toepassing is geleë te: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -# 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/. - -containers.updateContainerTitle = Voorkeure vir konteks “%S” - -containers.blue.label = Blou -containers.turquoise.label = Turkoois -containers.green.label = Groen -containers.yellow.label = Geel -containers.orange.label = Oranje -containers.red.label = Rooi -containers.pink.label = Pienk -containers.purple.label = Pers - -containers.fingerprint.label = Vingerafdruk -containers.briefcase.label = Tas -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Dollarteken -containers.cart.label = Inkopietrollie -containers.circle.label = Kol diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/devtools/client/webConsole.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=Geen gekies nie diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=Deur %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=Ligging: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/af/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:22.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/af/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -# 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/. - -mismatchCheckNow=Kontroleer nou -mismatchCheckNowAccesskey=K -mismatchDontCheck=Moenie kontroleer nie -mismatchDontCheckAccesskey=M -installButtonText=Installeer nou -installButtonTextAccesskey=I -nextButtonText=Volgende > -nextButtonTextAccesskey=N -cancelButtonText=Kanselleer -cancelButtonTextAccesskey=K -statusPrefix=Klaar met ondersoek van %S -downloadingPrefix=Laai tans af: %S -installingPrefix=Installeer: %S -closeButton=Sluit -installErrors=%S kon nie die bywerkings vir die volgende byvoegings installeer nie: -checkingErrors=%S kon nie vir die bywerkings vir die volgende byvoegings kontroleer nie: -installErrorItemFormat=%S (%S) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/browser/preferences/main.ftl 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (per defecto) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Navegación privada -title.normal=Quiere ubrir una finestra privada? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/engineManager.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=Duplicar a parola clau -duplicateEngineMsg=Ha trigau una parola clau que ya emplega "%S". Trigue-ne unatra. -duplicateBookmarkMsg=Ha trigau una parola clau que ya emplega unatro marcapachinas. Trigue-ne unatra. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/newTab.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/newTab.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=Puestos destacaus -newtab.userTopSites.heading=Los suyos puestos destacaus - -newtab.pin=Clavar iste puesto web en a suya posición actual -newtab.unpin=Desclavar iste puesto web -newtab.block=Sacar iste puesto web diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=Ye posible fer servir as aplicacions siguients ta chestionar %S. - -handleProtocol=vinclos %S -handleWebFeeds=Canals web -handleFile=conteniu %S - -descriptionWebApp=Ista aplicación web s'alocha en: -descriptionLocalApp=Ista aplicación se troba en: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/clearSiteData.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/clearSiteData.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/clearSiteData.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/clearSiteData.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (clearSiteDataWithEstimates.label, clearCacheWithEstimates.label): -# The parameters in parentheses in these strings describe disk usage -# in the format (size unit), e.g. "Cookies and Site Data (24 KB)" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -clearSiteDataWithEstimates.label = Cookies y datos de puestos web (%1$S %2$S) -clearCacheWithEstimates.label = Conteniu web en caché (%1$S %2$S) - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = %S Preferencias de contenedor - -containers.blue.label = Azul -containers.turquoise.label = Turquesa -containers.green.label = Verde -containers.yellow.label = Amariello -containers.orange.label = Narancha -containers.red.label = Royo -containers.pink.label = Rosa -containers.purple.label = Morau - -containers.fingerprint.label = Ditalada -containers.briefcase.label = Cartera -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Signo de dolar -containers.cart.label = Carret d'a crompa -containers.circle.label = Punto -containers.vacation.label = Vacanzas -containers.gift.label = Regalo -containers.food.label = Minchar -containers.fruit.label = Fruita -containers.pet.label = Animal -containers.tree.label = Arbol -containers.chill.label = Relax diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/client/webConsole.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/aboutdevtools.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/aboutdevtools.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/aboutdevtools.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/aboutdevtools.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Politica de Privacidat."> - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/aboutdevtools.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/aboutdevtools.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/aboutdevtools.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/aboutdevtools.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE These strings are used in the about:devtools page. - -# LOCALIZATION NOTE (features.learnMore): The text of the learn more link displayed below -# each feature section of about:devtools. Each section presents a quick description of a -# DevTools panel/feature. The learn more link points to the associated MDN page. -features.learnMore=Saber-ne mas - -features.inspector.title=Inspector -features.inspector.desc=Inspeccionar y refinar lo codigo pa construyir layouts perfectament definius. - -features.console.title=Consola -features.console.desc=Seguir CSS, Javascripot, seguranza y problemas de ret. - -features.debugger.title=Depurador -features.debugger.desc=Un potent depurador de JavaScript con soporte pa lo tuyo framework. - -features.network.title=Ret -features.network.desc=Monitoriar las requestas de ret que pueden enlentir u blocar lo tuyo puesto. - -features.storage.title=Almagazenamiento -features.storage.desc=Anyader, modificar y eliminar caché, cookies, bases de datos y datos de sesión. - -features.responsive.title=Modo de disenyo adaptable -features.responsive.desc=Comprebar puestos sobre dispositivos emulaus en o tuyo navegador. - -features.visualediting.title=Edición visual -features.visualediting.desc=Achuste fino d'as animacion, l'aliniamiento y lo repleno. - -features.performance.title=Rendimiento -features.performance.desc=Desblocar cuellos de botella, achiliza procesos y optimiza los components. - -features.memory.title=Memoria -features.memory.desc=Trobar fugas de memoria y fer que la tuya aplicación siga liuchera. - -# LOCALIZATION NOTE (newsletter.error.common): error text displayed when the newsletter -# subscription failed. The argument will be replaced with request's status code and status -# text (e.g. "404 - Not Found") -newsletter.error.common=Fallo de demanda de subscripción (%S). - -# LOCALIZATION NOTE (newsletter.error.unknown): error text displayed when the newsletter -# subscription failed for an unexpected reason. -newsletter.error.unknown=Ha ocurriu una error no esperada. - -# LOCALIZATION NOTE (newsletter.error.timeout): error text displayed when the newsletter -# subscription timed out. -newsletter.error.timeout=La demanda de conducción ha caducau. - -# LOCALIZATION NOTE (welcome.message): Message displayed when devtools are enabled. -# %S will be replaced with the shortcut to toggle the DevTools toolbox. -welcome.message=Has activau las Ferramientas de desenvolvedor! Pa empecipiar, explora lo menú d'o desenvolvedor web u ubre las ferramientas ocn %S. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/key-shortcuts.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/key-shortcuts.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/key-shortcuts.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/key-shortcuts.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (toogleToolbox.commandkey): -# Key pressed to open a toolbox with the default panel selected -toggleToolbox.commandkey=I - -# LOCALIZATION NOTE (toogleToolboxF12.commandkey): -# Alternative key pressed to open a toolbox with the default panel selected -toggleToolboxF12.commandkey=VK_F12 - -# LOCALIZATION NOTE (toogleToolbar.commandkey): -# Key pressed to open the Developer Toolbar (a.k.a gcli) -toggleToolbar.commandkey=VK_F2 - -# LOCALIZATION NOTE (webide.commandkey): -# Key pressed to open the Web IDE window -webide.commandkey=VK_F8 - -# LOCALIZATION NOTE (browserToolbox.commandkey): -# Key pressed to open the Browser Toolbox, used for debugging Firefox itself -browserToolbox.commandkey=I - -# LOCALIZATION NOTE (browserConsole.commandkey): -# Key pressed to open the Browser Console, used for debugging Firefox itself -browserConsole.commandkey=J - -# LOCALIZATION NOTE (responsiveDesignMode.commandkey): -# Key pressed to toggle on the Responsive Design Mode -responsiveDesignMode.commandkey=M - -# LOCALIZATION NOTE (scratchpad.commandkey): -# Key pressed to open the Scratchpad in its own window -scratchpad.commandkey=VK_F4 - -# LOCALIZATION NOTE (inspector.commandkey): -# Key pressed to open a toolbox with the inspector panel selected -inspector.commandkey=C - -# LOCALIZATION NOTE (webconsole.commandkey): -# Key pressed to open a toolbox with the web console panel selected -webconsole.commandkey=K - -# LOCALIZATION NOTE (debugger.commandkey): -# Key pressed to open a toolbox with the debugger panel selected -debugger.commandkey=S - -# LOCALIZATION NOTE (netmonitor.commandkey): -# Key pressed to open a toolbox with the network monitor panel selected -netmonitor.commandkey=E - -# LOCALIZATION NOTE (styleeditor.commandkey): -# Key pressed to open a toolbox with the style editor panel selected -styleeditor.commandkey=VK_F7 - -# LOCALIZATION NOTE (performance.commandkey): -# Key pressed to open a toolbox with the performance panel selected -performance.commandkey=VK_F5 - -# LOCALIZATION NOTE (storage.commandkey): -# Key pressed to open a toolbox with the storage panel selected -storage.commandkey=VK_F9 - -# LOCALIZATION NOTE (dom.commandkey): -# Key pressed to open a toolbox with the DOM panel selected -dom.commandkey=W diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/startup.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/startup.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/devtools/shim/startup.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/devtools/shim/startup.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (enableDevTools.label): -# Label for the menu item displayed in Tools > Developer Tools when DevTools are disabled. -enableDevTools.label=Activar las ferramientas de desenvolvimiento… -enableDevTools.accesskey=A diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=Denguna trigada diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=Por %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=Ubicación: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/an/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:31.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/an/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (addonUpdateHeader) -# %S will be replace with the localized name of the application -addonUpdateTitle=Actualización de %S - -# LOCALIZATION NOTE (addonUpdateMessage) -# %S will be replace with the localized name of the application -addonUpdateMessage=%S ye esviellando las tuyas extensions… - -addonUpdateCancelMessage=Seguimos esviellando. Quiers aguardar? - -# LOCALIZATION NOTE (addonUpdateCancelButton) -# %S will be replace with the localized name of the application -addonUpdateCancelButton=Aturar l'actualización y lanzar %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/main.ftl 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (المبدئية) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/permissions.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/permissions.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/permissions.ftl 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/permissions.ftl 2018-06-20 17:30:47.000000000 +0000 @@ -83,6 +83,13 @@ .style = { permissions-window.style } permissions-exceptions-addons-desc = يمكنك تحديد أي مواقع يسمح لها بتنصيب إضافات. اكتب العنوان الكامل للموقع الذي تريد السماح له و اضغط اسمح. +## Exceptions - Autoplay Media + +permissions-exceptions-autoplay-media-window = + .title = مواقع الوِب المسموح لها - التشغيل التلقائي + .style = { permissions-window.style } +permissions-exceptions-autoplay-media-desc = يمكنك تحديد المواقع المسموح لها تشغيل عناصر الوسائط تلقائيا. اكتب عنوان الموقع الذي تريد السماح له ثم انقر ”اسمح“. + ## Site Permissions - Notifications permissions-site-notification-window = diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/preferences.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/preferences.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/preferences.ftl 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/preferences.ftl 2018-06-20 17:30:47.000000000 +0000 @@ -588,6 +588,9 @@ history-remember-option = .label = تذكر تأريخ تصفحي و تنزيلاتي .accesskey = ص +history-remember-browser-option = + .label = تذكر تأريخ التصفح و التنزيل + .accesskey = ت history-remember-search-option = .label = تذكّر تأريخ النماذج والبحث .accesskey = ث @@ -703,6 +706,12 @@ permissions-notification-pause = .label = ألبِث التنبيهات حتى يُعاد تشغيل { -brand-short-name } .accesskey = ث +permissions-block-autoplay-media = + .label = امنع المواقع من تشغيل الوسائط المحتوية على صوت تلقائيا + .accesskey = م +permissions-block-autoplay-media-exceptions = + .label = الاستثناءات… + .accesskey = س permissions-block-popups = .label = احجب النوافذ المنبثقة .accesskey = ذ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/syncDisconnect.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/syncDisconnect.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/browser/preferences/syncDisconnect.ftl 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/browser/preferences/syncDisconnect.ftl 2018-06-20 17:30:47.000000000 +0000 @@ -0,0 +1,29 @@ +# 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/. + +sync-disconnect-dialog = + .title = أأقطع اتصال { -sync-brand-short-name }؟ + .style = width: 36em; min-height: 35em; +sync-disconnect-heading = أتريد أيضا إزالة بيانات التصفح في هذا الحاسوب؟ اعلم رجاءً بأن بياناتك في { -sync-brand-name } ستبقى في حسابك أكنت تريد الإزالة أم لا. +sync-disconnect-remove-sync-caption = أزِل بيانات { -sync-brand-name } +sync-disconnect-remove-sync-data = العلامات والتأريخ وكلمات السر وغيرها. +sync-disconnect-remove-other-caption = أزِل بقية البيانات الخاصية +sync-disconnect-remove-other-data = الكعكات والخبيئة وبيانات المواقع بلا اتصال وغيرها. +# Shown while the disconnect is in progress +sync-disconnect-disconnecting = يقطع الاتصال… +sync-disconnect-cancel = + .label = ألغِ + .accesskey = ل + +## Disconnect confirm Button +## +## The 2 labels which may be shown on the single "Disconnect" button, depending +## on the state of the checkboxes. + +sync-disconnect-confirm-disconnect-delete = + .label = اقطع الاتصال واحذف + .accesskey = ق +sync-disconnect-confirm-disconnect = + .label = اقطع الاتصال فحسب + .accesskey = ق diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=التصفح الخاص -title.normal=أأفتح نافذة خاصة؟ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/activity-stream/newtab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/activity-stream/newtab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/activity-stream/newtab.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/activity-stream/newtab.properties 2018-06-20 17:30:47.000000000 +0000 @@ -171,7 +171,31 @@ section_menu_action_collapse_section=اطوِ القسم section_menu_action_expand_section=وسّع القسم section_menu_action_manage_section=أدِر القسم +section_menu_action_manage_webext=أدِر الامتداد section_menu_action_add_topsite=أضف موقعًا شائعًا section_menu_action_move_up=انقل لأعلى section_menu_action_move_down=انقل لأسفل section_menu_action_privacy_notice=تنويه الخصوصية + +# LOCALIZATION NOTE (firstrun_*). These strings are displayed only once, on the +# firstrun of the browser, they give an introduction to Firefox and Sync. +firstrun_title=خذ معك فَيَرفُكس أينما ذهبت +firstrun_content=تشارك العلامات، وتأريخ التصفح، وكلمات السر وباقي الإعدادات على جميع أجهزتك. +firstrun_learn_more_link=اطّلع على المزيد عن حسابات فَيَرفُكس + +# LOCALIZATION NOTE (firstrun_form_header and firstrun_form_sub_header): +# firstrun_form_sub_header is a continuation of firstrun_form_header, they are one sentence. +# firstrun_form_header is displayed more boldly as the call to action. +firstrun_form_header=أدخِل بريدك الإلكتروني +firstrun_form_sub_header=لمواصلة استخدام «تزامُن فَيَرفُكس» + +firstrun_email_input_placeholder=البريد الإلكتروني + +# LOCALIZATION NOTE (firstrun_extra_legal_links): {terms} is equal to firstrun_terms_of_service, and +# {privacy} is equal to firstrun_privacy_notice. {terms} and {privacy} are clickable links. +firstrun_extra_legal_links=بمواصلة هذه العملية أنت توافق على {terms} و{privacy}. +firstrun_terms_of_service=بنود الخدمة +firstrun_privacy_notice=تنويه الخصوصية + +firstrun_continue_to_login=تابِع +firstrun_skip_login=تجاوز هذه الخطوة diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/browser.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/browser.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/browser.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/browser.dtd 2018-06-20 17:30:47.000000000 +0000 @@ -35,6 +35,9 @@ + + + + + @@ -431,6 +438,8 @@ + + - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/newTab.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=المواقع الأكثر زيارة -newtab.userTopSites.heading=مواقعك الأكثر زيارة - -newtab.pin=ثبّت هذا الموقع في مكانه الحالي -newtab.unpin=افصل الموقع -newtab.block=احذف الموقع diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=يمكن استخدام التطبيق التالي لمعالجة %S. - -handleProtocol=روابط %S -handleWebFeeds=تلقيمات وب -handleFile=محتوى %S - -descriptionWebApp=برنامج الوِب مستضاف في: -descriptionLocalApp=التطبيق موجود في: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/clearSiteData.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/clearSiteData.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/clearSiteData.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/clearSiteData.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (clearSiteDataWithEstimates.label, clearCacheWithEstimates.label): -# The parameters in parentheses in these strings describe disk usage -# in the format (size unit), e.g. "Cookies and Site Data (24 KB)" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -clearSiteDataWithEstimates.label = الكعكات وبيانات المواقع (%1$S ‏%2$S) -clearCacheWithEstimates.label = محتوى الوب المخبّأ (%1$S ‏%2$S) - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = تفضيلات الحاوية %S - -containers.blue.label = أزرق -containers.turquoise.label = تركوازي -containers.green.label = أخضر -containers.yellow.label = أصفر -containers.orange.label = برتقالي -containers.red.label = أحمر -containers.pink.label = وردي -containers.purple.label = أرجواني - -containers.fingerprint.label = بصمة -containers.briefcase.label = حقيبة -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = علامة الدولار -containers.cart.label = عربة تسوق -containers.circle.label = نقطة -containers.vacation.label = عطلة -containers.gift.label = هدية -containers.food.label = طعام -containers.fruit.label = فاكهة -containers.pet.label = حيوان أليف -containers.tree.label = شجرة -containers.chill.label = راحة diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/sanitize.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/sanitize.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/chrome/browser/sanitize.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/chrome/browser/sanitize.dtd 2018-06-20 17:30:47.000000000 +0000 @@ -8,23 +8,15 @@ The column width should be set at half of the dialog width. --> - - - - - + + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/pdfviewer/viewer.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/pdfviewer/viewer.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/browser/pdfviewer/viewer.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/browser/pdfviewer/viewer.properties 2018-06-20 17:30:47.000000000 +0000 @@ -65,6 +65,20 @@ cursor_hand_tool.title=فعّل أداة اليد cursor_hand_tool_label=أداة اليد +scroll_vertical.title=استخدم التمرير الرأسي +scroll_vertical_label=التمرير الرأسي +scroll_horizontal.title=استخدم التمرير الأفقي +scroll_horizontal_label=التمرير الأفقي +scroll_wrapped.title=استخدم التمرير الملتف +scroll_wrapped_label=التمرير الملتف + +spread_none.title=لا تدمج هوامش الصفحات مع بعضها البعض +spread_none_label=بلا هوامش +spread_odd.title=ادمج هوامش الصفحات الفردية +spread_odd_label=هوامش الصفحات الفردية +spread_even.title=ادمج هوامش الصفحات الزوجية +spread_even_label=هوامش الصفحات الزوجية + # Document properties dialog box document_properties.title=خصائص المستند… document_properties_label=خصائص المستند… diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/devtools/client/webConsole.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/aboutStudies.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/aboutStudies.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/aboutStudies.properties 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/aboutStudies.properties 2018-06-20 17:30:48.000000000 +0000 @@ -0,0 +1,23 @@ +# 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/. + + +# LOCALIZATION NOTE (title): keep "Shield" in English. See +# https://wiki.mozilla.org/Firefox/Shield/Shield_Studies for more information +title = دراسات شيلد +removeButton = أزِل + +# LOCALIZATION NOTE (activeStatus): Displayed for an active study +activeStatus = نشطة + +# LOCALIZATION NOTE (completeStatus): Displayed for a study that is already complete +completeStatus = انتهت + +updateButtonWin = خيارات التحديث +updateButtonUnix = تفضيلات التحديث +learnMore = اطّلع على المزيد +noStudies = لم تشارك في أي من الدراسات. +disabledList = هذه قائمة الدراسات التي شاركت فيها. لن تجرى أي دراسات جديدة. +# LOCALIZATION NOTE (enabledList): %S is brandShortName (e.g. Firefox) +enabledList = ما هذا؟ قد ينصّب %S بعض الدراسات و يشغّلها من وقت لآخر. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/aboutSupport.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/aboutSupport.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/aboutSupport.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/aboutSupport.properties 2018-06-20 17:30:48.000000000 +0000 @@ -101,8 +101,8 @@ gpuProcessKillButton = أنهِ سيرورة وحدة معالجة الرسوميات gpuDeviceResetButton = أطلِق عملية إعادة الجهاز إلى حالته المبدئية usesTiling = يستخدم البلاطات +contentUsesTiling = يستخدم البلاطات (المحتوى) offMainThreadPaintEnabled = الرسم خارج الخيط الرئيسي مفعل - offMainThreadPaintWorkerCount = عدد عمال الرسم خارج الخيط الرئيسي audioBackend = سند الصوت @@ -160,3 +160,8 @@ disabledByDefault = معطّل مبدئيًا enabledByUser = فعّله المستخدم disabledByUser = عطّله المستخدم + +# LOCALIZATION NOTE Strings representing the status of the Enterprise Policies engine. +policies.inactive = غير نشط +policies.active = نشط +policies.error = خطأ diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=لا شيء مختار diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/languageNames.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/languageNames.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/languageNames.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/languageNames.properties 2018-06-20 17:30:48.000000000 +0000 @@ -32,6 +32,7 @@ ch = الشامورو co = الكورسكيّة cr = الكري +crh = التّتريّة القرمية cs = التّشيكيّة csb = الكاشوبية cu = السلافيّة الكنسيّة diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/extensions.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/extensions.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/extensions.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/extensions.properties 2018-06-20 17:30:48.000000000 +0000 @@ -55,6 +55,8 @@ notification.uninstall=سوف يُلغى تنصيب %1$S بعد أن تعيد تشغيل %2$S. #LOCALIZATION NOTE (notification.upgrade) %1$S is the add-on name, %2$S is brand name notification.upgrade=سوف تُحدَّث %1$S بعد أن تعيد تشغيل %2$S. +#LOCALIZATION NOTE (notification.restartless-uninstall) %1$S is the add-on name +notification.restartless-uninstall=سيُزال %1$S بعد أن تغلق هذا اللسان. #LOCALIZATION NOTE (notification.downloadError) %1$S is the add-on name. notification.downloadError=حصل خطأ عند تنزيل %1$S. notification.downloadError.retry=حاول مجددًا @@ -113,6 +115,8 @@ details.notification.uninstall=سوف يُلغى تنصيب %1$S بعد أن تعيد تشغيل %2$S. #LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name details.notification.upgrade=سوف تُحدَّث %1$S بعد أن تعيد تشغيل %2$S. +#LOCALIZATION NOTE (details.notification.restartless-uninstall) %1$S is the add-on name. +details.notification.restartless-uninstall=سيُزال %1$S بعد أن تغلق هذا اللسان. #LOCALIZATION NOTE (details.notification.gmpPending) %1$S is the add-on name details.notification.gmpPending=سينصّب %1$S حالًا. @@ -164,20 +168,6 @@ disableAddonTooltip=عطّل هذه الإضافة disableAddonRestartRequiredTooltip=عطّل هذه الإضافة (إعادة التشغيل مطلوبة) -#LOCALIZATION NOTE (showAllSearchResults): Semicolon-separated list of plural forms. -# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals -# #1 is the total number of search results -showAllSearchResults=شاهد نتيجة واحدة;شاهد نتيجتين;شاهد #1 نتائج;شاهد #1 نتيجة;شاهد #1 نتيجة;شاهد و لا نتيجة - -#LOCALIZATION NOTE (addon.purchase.label) displayed on a button in the list -# view, %S is the price of the add-on including currency symbol -addon.purchase.label=اشترِ بسعر %S… -addon.purchase.tooltip=زُر معرض الإضافات لشراء هذه الإضافة -#LOCALIZATION NOTE (cmd.purchaseAddon.label) displayed on a button in the detail -# view, %S is the price of the add-on including currency symbol -cmd.purchaseAddon.label=اشترِ بسعر %S… -cmd.purchaseAddon.accesskey=ش - #LOCALIZATION NOTE (eulaHeader) %S is name of the add-on asking the user to agree to the EULA eulaHeader=يطلب منك %S أن توافق على اتفاقية ترخيص المستخدم التالية قبل أن تستطيع متابعة تنصيب: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=‏%1$S ‏%2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=صنعها %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=المسار: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ar/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:39.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ar/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (addonUpdateHeader) -# %S will be replace with the localized name of the application -addonUpdateTitle=تحديث %S - -# LOCALIZATION NOTE (addonUpdateMessage) -# %S will be replace with the localized name of the application -addonUpdateMessage=يُحدّث %S امتداداتك… - -addonUpdateCancelMessage=ما زال التحديث جارٍ. هل تريد الانتظار؟ - -# LOCALIZATION NOTE (addonUpdateCancelButton) -# %S will be replace with the localized name of the application -addonUpdateCancelButton=أوقف التحديث و افتح %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -# 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/. - -title.normal=এটা ব্যক্তিগত উইন্ডো খোলিব নে? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/engineManager.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=দ্বৈত কিৱাৰ্ড -duplicateEngineMsg=আপুনি "%S"এ বৰ্ত্তমানে ব্যৱহাৰ কৰা কিৱাৰ্ড নিৰ্বাচন কৰিছে। অনুগ্ৰহ কৰি অন্য এটা নিৰ্বাচন কৰক। -duplicateBookmarkMsg=এটা পত্ৰচিহ্নৰ দ্বাৰা ব্যৱহৃত কিৱাৰ্ড আপুনি নিৰ্বাচন কৰিছে। অনুগ্ৰহ কৰি অন্য এটা নিৰ্বাচন কৰক। diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/newTab.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/newTab.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# 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/. - - -newtab.pin=এই ছাইটক তাৰ বৰ্তমান অৱস্থানত পিন কৰক -newtab.unpin=এই ছাইট আনপিন কৰক -newtab.block=এই ছাইট আতৰাওক diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=%S ৰ পৰিচালনাৰ বাবে নিম্নলিখিত এপ্লিকেচন ব্যৱহাৰ কৰা হ'ব। - -handleProtocol=%S সংযোগ -handleWebFeeds=ৱেব ফীড -handleFile=%S সমল - -descriptionWebApp=এই ৱেব এপ্লিকেচন চিহ্নিত স্থানত হস্টেড আছে: -descriptionLocalApp=এই এপ্লিকেচন চিহ্নিত স্থানত অৱস্থিত আছে: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/devtools/client/webConsole.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=একো নিৰ্বাচন কৰা হোৱা নাই diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=%S দ্বাৰা -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=অৱস্থান: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/as/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:46.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/as/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -# 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/. - -mismatchCheckNow=এতিয়া পৰীক্ষা কৰক -mismatchCheckNowAccesskey=C -mismatchDontCheck=পৰীক্ষা নকৰিব -mismatchDontCheckAccesskey=D -installButtonText=এতিয়া ইনস্টল কৰক -installButtonTextAccesskey=I -nextButtonText=পৰৱৰ্তী > -nextButtonTextAccesskey=N -cancelButtonText=বাতিল কৰক -cancelButtonTextAccesskey=C -statusPrefix=%S পৰীক্ষা কৰা অন্ত হ'ল -downloadingPrefix=ডাউনল'ড কৰা হৈছে: %S -installingPrefix=ইনস্টল কৰা হৈছে: %S -closeButton=বন্ধ কৰক -installErrors=%S এ নিম্নলিখিত এড-অনৰ বাবে উন্নয়ন ইনস্টল কৰিব নোৱাৰিলে: -checkingErrors=%S এ নিম্নলিখিত এড-অনৰ বাবে উন্নয়ন পৰীক্ষা কৰিব নোৱাৰিলে: -installErrorItemFormat=%S (%S) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/browser/preferences/main.ftl 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (por defeutu) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Restolar en privao -title.normal=¿Abrir una ventana privada? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/engineManager.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=Pallabra clave duplicada -duplicateEngineMsg=Esbillesti una pallabra clave qu'anguaño s'usa por «%S». Esbilla otra, por favor. -duplicateBookmarkMsg=Esbillesti una pallabra clave qu'anguaño s'usa nun marcador. Esbilla otra, por favor. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/newTab.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/newTab.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -# 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/. - - -newtab.pin=Fixar esti sitiu na so posición actual -newtab.unpin=Soltar esti sitiu -newtab.block=Desaniciar esti sitiu diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=Les aplicaciones de darréu puen usase pa remanar %S. - -handleProtocol=%S enllaces -handleWebFeeds=Canales web -handleFile=%S conteníu - -descriptionWebApp=Esta aplicación web ta allugada en: -descriptionLocalApp=Esta aplicación ta en: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = Preferencies del contenedor %S - -containers.blue.label = Azul -containers.turquoise.label = Turquesa -containers.green.label = Verde -containers.yellow.label = Mariellu -containers.orange.label = Naranxa -containers.red.label = Bermeyu -containers.pink.label = Rosa -containers.purple.label = Moráu - -containers.fingerprint.label = Buelga -containers.briefcase.label = Cartera -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Símbolu del dólar -containers.cart.label = Carru de merca -containers.circle.label = Puntu diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/devtools/client/webConsole.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/devtools/shim/key-shortcuts.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/devtools/shim/key-shortcuts.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/devtools/shim/key-shortcuts.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/devtools/shim/key-shortcuts.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (toogleToolbox.commandkey): -# Key pressed to open a toolbox with the default panel selected - -# LOCALIZATION NOTE (toogleToolboxF12.commandkey): -# Alternative key pressed to open a toolbox with the default panel selected - -# LOCALIZATION NOTE (toogleToolbar.commandkey): -# Key pressed to open the Developer Toolbar (a.k.a gcli) - -# LOCALIZATION NOTE (webide.commandkey): -# Key pressed to open the Web IDE window - -# LOCALIZATION NOTE (browserToolbox.commandkey): -# Key pressed to open the Browser Toolbox, used for debugging Firefox itself - -# LOCALIZATION NOTE (browserConsole.commandkey): -# Key pressed to open the Browser Console, used for debugging Firefox itself - -# LOCALIZATION NOTE (responsiveDesignMode.commandkey): -# Key pressed to toggle on the Responsive Design Mode - -# LOCALIZATION NOTE (scratchpad.commandkey): -# Key pressed to open the Scratchpad in its own window -scratchpad.commandkey=VK_F4 - -# LOCALIZATION NOTE (inspector.commandkey): -# Key pressed to open a toolbox with the inspector panel selected - -# LOCALIZATION NOTE (webconsole.commandkey): -# Key pressed to open a toolbox with the web console panel selected - -# LOCALIZATION NOTE (debugger.commandkey): -# Key pressed to open a toolbox with the debugger panel selected - -# LOCALIZATION NOTE (netmonitor.commandkey): -# Key pressed to open a toolbox with the network monitor panel selected - -# LOCALIZATION NOTE (styleeditor.commandkey): -# Key pressed to open a toolbox with the style editor panel selected - -# LOCALIZATION NOTE (performance.commandkey): -# Key pressed to open a toolbox with the performance panel selected - -# LOCALIZATION NOTE (storage.commandkey): -# Key pressed to open a toolbox with the storage panel selected - -# LOCALIZATION NOTE (dom.commandkey): -# Key pressed to open a toolbox with the DOM panel selected diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/global/filefield.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=Nun hai esbilla diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=Por %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=Allugamientu: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/ast/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:03:53.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/ast/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (addonUpdateHeader) -# %S will be replace with the localized name of the application -addonUpdateTitle=Anovamientu de %S - -# LOCALIZATION NOTE (addonUpdateMessage) -# %S will be replace with the localized name of the application -addonUpdateMessage=%S ta anovando les estensiones… - -addonUpdateCancelMessage=Anovando entá. ¿Quies esperar? - -# LOCALIZATION NOTE (addonUpdateCancelButton) -# %S will be replace with the localized name of the application -addonUpdateCancelButton=Parar anovamientu y llanzar %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/main.ftl 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (standart) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/permissions.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/permissions.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/permissions.ftl 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/permissions.ftl 2018-06-20 17:31:17.000000000 +0000 @@ -82,6 +82,12 @@ .style = { permissions-window.style } permissions-exceptions-addons-desc = Hansı saytların əlavə yükləyə biləcəyini seçə bilərsiniz. İcaz vermək istədiyiniz saytın tam ünvanını yazdıqdan sonra "İcazə ver"-ə klikləyin. +## Exceptions - Autoplay Media + +permissions-exceptions-autoplay-media-window = + .title = İcazə verilən saytlar - Avto Oxutma + .style = { permissions-window.style } + ## Site Permissions - Notifications permissions-site-notification-window = diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/preferences.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/preferences.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/browser/preferences/preferences.ftl 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/browser/preferences/preferences.ftl 2018-06-20 17:31:17.000000000 +0000 @@ -697,6 +697,12 @@ permissions-notification-pause = .label = { -brand-short-name } yenidən başladılana qədər bildirişləri dayandır .accesskey = n +permissions-block-autoplay-media = + .label = Saytların səsli medianı avtomatik oxutmalarını əngəllə + .accesskey = B +permissions-block-autoplay-media-exceptions = + .label = İstisnalar… + .accesskey = E permissions-block-popups = .label = Peyda olan pəncərələri blokla .accesskey = b diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Məxfi Səyahət -title.normal=Məxfi pəncərə açılsın? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/browser.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/browser.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/browser.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/browser.dtd 2018-06-20 17:31:17.000000000 +0000 @@ -57,6 +57,8 @@ + + @@ -904,6 +906,7 @@ + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/browser.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/browser.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/browser.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/browser.properties 2018-06-20 17:31:17.000000000 +0000 @@ -569,6 +569,11 @@ trackingProtection.intro.step1of3=1 / 3 trackingProtection.intro.nextButton.label=Sonrakı +trackingProtection.toggle.enable.tooltip=İzlənmə Qorumasını aktivləşdir +trackingProtection.toggle.disable.tooltip=İzlənmə Qorumasını söndür +trackingProtection.toggle.enable.pbmode.tooltip=İzlənmə Qoruması Məxfi Səyahətdə aktivləşdir +trackingProtection.toggle.disable.pbmode.tooltip=İzlənmə Qoruması Məxfi Səyahətdə söndür + trackingProtection.icon.activeTooltip=İzləmə cəhdi əngəlləndi trackingProtection.icon.disabledTooltip=İzləmə məzmunu aşkar edildi @@ -576,6 +581,7 @@ editBookmarkPanel.pageBookmarkedTitle=Səhifə Əlfəcinləndi editBookmarkPanel.pageBookmarkedDescription=%S sizin üçün bu səhifəni həmişə xatırlayacaq. editBookmarkPanel.bookmarkedRemovedTitle=Əlfəcin Silindi +editBookmarkPanel.newBookmarkTitle=Yeni Əlfəcin editBookmarkPanel.editBookmarkTitle=Bu Əlfəcini Redaktə et editBookmarkPanel.cancel.label=Ləğv et diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/engineManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/engineManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/engineManager.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/engineManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -duplicateTitle=Təkrarlanan Açar Söz -duplicateEngineMsg=Hazırda “%S” tərəfindən istifadə olunan bir açar söz seçdiniz. Lütfən başqa birini seçin. -duplicateBookmarkMsg=Hazırda bir əlfəcin tərəfindən istifadə olunan açar söz seçdiniz. Lütfən başqa birini seçin. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/newTab.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/newTab.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/newTab.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/newTab.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/newTab.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=Çox istifadə olunan saytlar -newtab.userTopSites.heading=Sizin çox istifadə etdiyiniz saytlar - -newtab.pin=Bu saytı mövcud yerinə bağla -newtab.unpin=Bu saytı çıxart -newtab.block=Bu saytı sil diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=%S aşağıdakı proqramlarla istifadə edilə bilər. - -handleProtocol=%S bağlantıları -handleWebFeeds=Web Axınlar -handleFile=%S məzmunu - -descriptionWebApp=Bu proqramın saxlanıldığı yer: -descriptionLocalApp=Bu proqramın olduğu ünvan: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/clearSiteData.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/clearSiteData.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/clearSiteData.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/clearSiteData.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (clearSiteDataWithEstimates.label, clearCacheWithEstimates.label): -# The parameters in parentheses in these strings describe disk usage -# in the format (size unit), e.g. "Cookies and Site Data (24 KB)" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -clearSiteDataWithEstimates.label = Çərəzlər və Sayt Məlumatları (%1$S %2$S) -clearCacheWithEstimates.label = Keşdə Saxlanmış Web Məzmunlar (%1$S %2$S) - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = %S Konteyneri Nizamlamaları - -containers.blue.label = Göy -containers.turquoise.label = Firuzəyi -containers.green.label = Yaşıl -containers.yellow.label = Sarı -containers.orange.label = Narıncı -containers.red.label = Qırmızı -containers.pink.label = Çəhrayı -containers.purple.label = Bənövşəyi - -containers.fingerprint.label = Barmaq izi -containers.briefcase.label = Portfel -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Dollar işarəsi -containers.cart.label = Alış-veriş çantası -containers.circle.label = Nöqtə -containers.vacation.label = Məzuniyyət -containers.gift.label = Hədiyyə -containers.food.label = Qida -containers.fruit.label = Meyvə -containers.pet.label = Evcil heyvan -containers.tree.label = Ağac -containers.chill.label = İstirahət diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/client/webConsole.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/client/webConsole.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/client/webConsole.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/client/webConsole.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/shim/aboutdevtools.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/shim/aboutdevtools.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/shim/aboutdevtools.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/shim/aboutdevtools.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/shim/aboutdevtools.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/shim/aboutdevtools.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/devtools/shim/aboutdevtools.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/devtools/shim/aboutdevtools.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE These strings are used in the about:devtools page. - -# LOCALIZATION NOTE (features.learnMore): The text of the learn more link displayed below -# each feature section of about:devtools. Each section presents a quick description of a -# DevTools panel/feature. The learn more link points to the associated MDN page. -features.learnMore=Ətraflı öyrən - - - - - - - - - - -# LOCALIZATION NOTE (newsletter.error.common): error text displayed when the newsletter -# subscription failed. The argument will be replaced with request's status code and status -# text (e.g. "404 - Not Found") - -# LOCALIZATION NOTE (newsletter.error.unknown): error text displayed when the newsletter -# subscription failed for an unexpected reason. - -# LOCALIZATION NOTE (newsletter.error.timeout): error text displayed when the newsletter -# subscription timed out. - -# LOCALIZATION NOTE (welcome.message): Message displayed when devtools are enabled. -# %S will be replaced with the shortcut to toggle the DevTools toolbox. diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/dom/chrome/dom/dom.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/dom/chrome/dom/dom.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/dom/chrome/dom/dom.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/dom/chrome/dom/dom.properties 2018-06-20 17:31:17.000000000 +0000 @@ -366,3 +366,4 @@ IDBOpenDBOptions_StorageTypeWarning=indexedDB.open-ə göndərilən seçimlərdə ‘storage’ atributunun vaxtı çıxıb və tezliklə dəstəklənməyəcək. Daimi yaddaş üçün lütfən əvəzinə navigator.storage.persist() işlədin. # LOCALIZATION NOTE: Do not translate "getPropertyCSSValue" and "getPropertyValue". GetPropertyCSSValueWarning=getPropertyCSSValue istifadəsi köhnəlib, əvəzinə getPropertyValue işlədin. +DOMQuadBoundsAttrWarning=DOMQuad.bounds köhnəlib, əvəzinə DOMQuad.getBounds() işlədin diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/dom/chrome/security/csp.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/dom/chrome/security/csp.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/dom/chrome/security/csp.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/dom/chrome/security/csp.properties 2018-06-20 17:31:17.000000000 +0000 @@ -87,6 +87,11 @@ ignoringReportOnlyDirective = Ancaq-raport siyasətli ‘%1$S’ çatdırmada sandbox direktivi nəzərə alınmır # LOCALIZATION NOTE (deprecatedReferrerDirective): # %1$S is the value of the deprecated Referrer Directive. +deprecatedReferrerDirective = Referrer direktivi ‘%1$S’ köhnəlib. Lütfən Referrer-Policy başlığı işlədin. +# LOCALIZATION NOTE (IgnoringSrcBecauseOfDirective): +# %1$S is the name of the src that is ignored. +# %2$S is the name of the directive that causes the src to be ignored. +IgnoringSrcBecauseOfDirective=‘%2$S’ direktivi ilə ‘%1$S’ rədd edildi. # CSP Errors: # LOCALIZATION NOTE (couldntParseInvalidSource): @@ -104,9 +109,10 @@ # LOCALIZATION NOTE (duplicateDirective): # %1$S is the name of the duplicate directive duplicateDirective = %1$S direktivinin nüsxəsi aşkarlandı. İlki xaricində hamısı görməzdən gəlinəcək. -# LOCALIZATION NOTE (deprecatedDirective): -# %1$S is the name of the deprecated directive, %2$S is the name of the replacement. -deprecatedDirective = '%1$S' direktivi artıq dəstəklənmir. Lütfən əvəzinə '%2$S' direktivini işlədin. +# LOCALIZATION NOTE (deprecatedChildSrcDirective): +# %1$S is the value of the deprecated directive. +# Do not localize: worker-src, frame-src +deprecatedChildSrcDirective = ‘%1$S’ direktivi köhnəlib. Lütfən worker idarəsi üçün ‘worker-src’, frame idarəsi üçün də ‘frame-src’ istifadə edin. # LOCALIZATION NOTE (couldntParseInvalidSandboxFlag): # %1$S is the option that could not be understood couldntParseInvalidSandboxFlag = Xətalı ‘%1$S’ sandbox bayrağı emal edilə bilmədi diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/global/filefield.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/global/filefield.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/global/filefield.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/global/filefield.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -# 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/. - -#### Change Action - -downloadHelperNoneSelected=Heçnə seçilməyib diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/global/viewSource.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/global/viewSource.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/global/viewSource.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/global/viewSource.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/about.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/about.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/about.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/about.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.dtd 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.properties 2018-06-11 13:04:02.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/newaddon.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -#LOCALIZATION NOTE (name) %1$S is the add-on name, %2$S is the add-on version -name=%1$S %2$S -#LOCALIZATION NOTE (author) %S is the author of the add-on -author=Müəllif: %S -#LOCALIZATION NOTE (location) %S is the path the add-on is installed in -location=Ünvan: %S diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/update.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/update.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/az/toolkit/chrome/mozapps/extensions/update.properties 2018-06-11 13:04:01.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/az/toolkit/chrome/mozapps/extensions/update.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (addonUpdateHeader) -# %S will be replace with the localized name of the application -addonUpdateTitle=%S Yeniləməsi - -# LOCALIZATION NOTE (addonUpdateMessage) -# %S will be replace with the localized name of the application -addonUpdateMessage=%S uzantılarınızı yeniləyir… - -addonUpdateCancelMessage=Hələ də yenilənir. Gözləmək istərdiniz? - -# LOCALIZATION NOTE (addonUpdateCancelButton) -# %S will be replace with the localized name of the application -addonUpdateCancelButton=Yeniləməyi dayandır və %S tətbiqini başlat diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/main.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/main.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/main.ftl 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/main.ftl 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -// Variables: -// $num - default value of the `dom.ipc.processCount` pref. -default-content-process-count - .label = { $num } (прадвызначана) diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/permissions.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/permissions.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/permissions.ftl 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/permissions.ftl 2018-06-20 17:31:30.000000000 +0000 @@ -83,6 +83,13 @@ .style = { permissions-window.style } permissions-exceptions-addons-desc = Вы можаце вызначыць, якім вэб-сайтам дазволена ўсталёўваць дадаткі. Набярыце дакладны адрас сайта, якому вы хочаце гэта дазволіць, і пстрыкніце Дазволіць. +## Exceptions - Autoplay Media + +permissions-exceptions-autoplay-media-window = + .title = Дазволеныя вэб-сайты - Аўтапрайграванне + .style = { permissions-window.style } +permissions-exceptions-autoplay-media-desc = Вы можаце пазначыць, якім вэб-сайтам дазволена прайграваць медыя-элементы аўтаматычна. Упішыце дакладны адрас сайта, якому вы дазваляеце, і націсніце Дазволіць. + ## Site Permissions - Notifications permissions-site-notification-window = diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/preferences.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/preferences.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/preferences.ftl 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/preferences.ftl 2018-06-20 17:31:30.000000000 +0000 @@ -582,6 +582,9 @@ history-remember-option = .label = Памятаць гісторыю маіх аглядання і сцягванняў .accesskey = а +history-remember-browser-option = + .label = Памятаць гісторыю аглядання і сцягванняў + .accesskey = П history-remember-search-option = .label = Памятаць гісторыю пошуку і запаўнення формаў .accesskey = ш @@ -697,6 +700,12 @@ permissions-notification-pause = .label = Прыпыніць апавяшчэнні да перазапуску { -brand-short-name } .accesskey = а +permissions-block-autoplay-media = + .label = Забараніць вэб-сайтам аўтаматычна прайграваць медыя з гукам + .accesskey = З +permissions-block-autoplay-media-exceptions = + .label = Выключэнні… + .accesskey = к permissions-block-popups = .label = Блакаваць выплыўныя вокны .accesskey = Б diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/syncDisconnect.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/syncDisconnect.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/browser/preferences/syncDisconnect.ftl 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/browser/preferences/syncDisconnect.ftl 2018-06-20 17:31:30.000000000 +0000 @@ -0,0 +1,29 @@ +# 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/. + +sync-disconnect-dialog = + .title = Адлучыць { -sync-brand-short-name }? + .style = width: 36em; min-height: 35em; +sync-disconnect-heading = Выдаліць таксама даныя аглядання з гэтага камп'ютара? Вашы даныя { -sync-brand-name } застануцца ў вашым уліковым запісе. +sync-disconnect-remove-sync-caption = Выдаліць даныя { -sync-brand-name } +sync-disconnect-remove-sync-data = Закладкі, гісторыя, паролі і іншае. +sync-disconnect-remove-other-caption = Выдаляць іншыя прыватныя даныя +sync-disconnect-remove-other-data = Файлы кукаў, кэшу, пазасеткавыя даныя вэб-сайтаў і г.д. +# Shown while the disconnect is in progress +sync-disconnect-disconnecting = Адлучэнне… +sync-disconnect-cancel = + .label = Скасаваць + .accesskey = С + +## Disconnect confirm Button +## +## The 2 labels which may be shown on the single "Disconnect" button, depending +## on the state of the checkboxes. + +sync-disconnect-confirm-disconnect-delete = + .label = Адлучыць і выдаліць + .accesskey = д +sync-disconnect-confirm-disconnect = + .label = Толькі адлучыць + .accesskey = Т diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/aboutPrivateBrowsing.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/aboutPrivateBrowsing.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/aboutPrivateBrowsing.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/aboutPrivateBrowsing.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -# 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/. - -title.head=Прыватнае агляданне -title.normal=Адчыніць прыватнае акно? diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/activity-stream/newtab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/activity-stream/newtab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/activity-stream/newtab.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/activity-stream/newtab.properties 2018-06-20 17:31:30.000000000 +0000 @@ -91,7 +91,6 @@ # what is shown for the homepage, new windows, and new tabs. prefs_home_header=Хатні экран Firefox prefs_home_description=Выберыце пажаданае змесціва для хатняга экрана Firefox. -prefs_restore_defaults_button=Аднавіць прадвызначэнні # LOCALIZATION NOTE (prefs_section_rows_option): This is a semi-colon list of # plural forms used in a drop down of multiple row options (1 row, 2 rows). # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals @@ -107,25 +106,14 @@ prefs_highlights_options_pocket_label=Захаваныя ў Pocket старонкі prefs_snippets_description=Абнаўленні ад Mozilla і Firefox settings_pane_button_label=Наладзіць вашу старонку новай карткі -settings_pane_header=Налады новай карткі -settings_pane_body2=Выберыце тое, што вы бачыце на гэтай старонцы. -settings_pane_search_header=Пошук -settings_pane_search_body=Пошук у Сеціве з вашай новай карткі. settings_pane_topsites_header=Папулярныя сайты -settings_pane_topsites_body=Доступ да сайтаў, якія вы часцей наведваеце. -settings_pane_topsites_options_showmore=Паказваць два шэрагі settings_pane_highlights_header=Выбранае -settings_pane_highlights_body2=Знайдзіце зваротны шлях да цікавых рэчаў, якія вы нядаўна наведалі або дадалі ў закладкі. settings_pane_highlights_options_bookmarks=Закладкі -settings_pane_highlights_options_visited=Наведаныя сайты # LOCALIZATION NOTE(settings_pane_snippets_header): For the "Snippets" feature # traditionally on about:home. Alternative translation options: "Small Note" or # something that expresses the idea of "a small message, shortened from # something else, and non-essential but also not entirely trivial and useless." settings_pane_snippets_header=Урыўкі -settings_pane_snippets_body=Чытайце кароткія і радасныя навіны ад Mozilla аб Firefox, інтэрнэт-культуру і выпадковыя мемы. -settings_pane_done_button=Гатова -settings_pane_topstories_options_sponsored=Паказаць артыкулы ад спонсараў # LOCALIZATION NOTE (edit_topsites_*): This is shown in the Edit Top Sites modal # dialog. @@ -155,9 +143,6 @@ # LOCALIZATION NOTE (pocket_read_even_more): This is shown as a link at the # end of the list of popular topic links. pocket_read_even_more=Іншыя навіны -# LOCALIZATION NOTE (pocket_description): This is shown in the settings pane -# to provide more information about Pocket. -pocket_description=Адкрыйце для сябе высакаякасны кантэнт, які вы маглі б прапусціць, з дапамогай Pocket, які стаў часткай Mozilla. highlights_empty_state=Пачніце агляданне, і мы пакажам вам тут некаторыя з найлепшых артыкулаў, відэаролікаў і іншых старонак, якія вы нядаўна наведалі або дадалі ў закладкі. # LOCALIZATION NOTE (topstories_empty_state): When there are no recommendations, @@ -186,7 +171,31 @@ section_menu_action_collapse_section=Згарнуць раздзел section_menu_action_expand_section=Разгарнуць раздзел section_menu_action_manage_section=Наладзіць раздзел +section_menu_action_manage_webext=Кіраваць пашырэннем section_menu_action_add_topsite=Дадаць папулярны сайт section_menu_action_move_up=Пасунуць вышэй section_menu_action_move_down=Пасунуць ніжэй section_menu_action_privacy_notice=Паведамленне аб прыватнасці + +# LOCALIZATION NOTE (firstrun_*). These strings are displayed only once, on the +# firstrun of the browser, they give an introduction to Firefox and Sync. +firstrun_title=Вазьміце Firefox з сабой +firstrun_content=Атрымайце доступ да вашых закладак, гісторыі, пароляў і іншых налад на ўсіх вашых прыладах. +firstrun_learn_more_link=Даведайцеся больш пра ўліковыя запісы Firefox + +# LOCALIZATION NOTE (firstrun_form_header and firstrun_form_sub_header): +# firstrun_form_sub_header is a continuation of firstrun_form_header, they are one sentence. +# firstrun_form_header is displayed more boldly as the call to action. +firstrun_form_header=Увядзіце сваю электронную пошту +firstrun_form_sub_header=каб прадоўжыць з Firefox Sync. + +firstrun_email_input_placeholder=Эл.пошта + +# LOCALIZATION NOTE (firstrun_extra_legal_links): {terms} is equal to firstrun_terms_of_service, and +# {privacy} is equal to firstrun_privacy_notice. {terms} and {privacy} are clickable links. +firstrun_extra_legal_links=Працягваючы, вы згаджаецеся з {terms} і {privacy}. +firstrun_terms_of_service=умовамі абслугоўвання +firstrun_privacy_notice=паведамленнем аб прыватнасці + +firstrun_continue_to_login=Працягнуць +firstrun_skip_login=Прапусціць гэты крок diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/browser.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/browser.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/browser.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/browser.dtd 2018-06-20 17:31:30.000000000 +0000 @@ -35,6 +35,9 @@ + + + + + @@ -431,6 +438,8 @@ + + - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/newTab.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/newTab.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/newTab.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/newTab.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -# 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/. - -newtab.defaultTopSites.heading=Папулярныя сайты -newtab.userTopSites.heading=Вашы папулярныя сайты - -newtab.pin=Прышпіліць сайт на цяперашняе месца -newtab.unpin=Адшпіліць сайт -newtab.block=Выдаліць гэты сайт diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/places/moveBookmarks.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/places/moveBookmarks.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/places/moveBookmarks.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/places/moveBookmarks.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/advanced.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/advanced.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/advanced.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/advanced.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applicationManager.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applicationManager.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applicationManager.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applicationManager.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applicationManager.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applicationManager.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applicationManager.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applicationManager.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE -# in descriptionApplications, %S will be replaced by one of the 3 following strings -descriptionApplications=Наступныя праграмы могуць ўжывацца, каб апрацоўваць %S. - -handleProtocol=Спасылкі %S -handleWebFeeds=Вэб-каналы -handleFile=Змесціва %S - -descriptionWebApp=Гэта праграма ўтрымліваецца тут: -descriptionLocalApp=Гэта праграма знаходзіцца тут: diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applications.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applications.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/applications.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/applications.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/blocklists.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/blocklists.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/blocklists.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/blocklists.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/clearSiteData.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/clearSiteData.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/clearSiteData.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/clearSiteData.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/clearSiteData.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/clearSiteData.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/clearSiteData.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/clearSiteData.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -# 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/. - -# LOCALIZATION NOTE (clearSiteDataWithEstimates.label, clearCacheWithEstimates.label): -# The parameters in parentheses in these strings describe disk usage -# in the format (size unit), e.g. "Cookies and Site Data (24 KB)" -# %1$S = size -# %2$S = unit (MB, KB, etc.) -clearSiteDataWithEstimates.label = Кукі і дадзеныя сайтаў (%1$S %2$S) -clearCacheWithEstimates.label = Кэшаванае сеціўнае змесціва (%1$S %2$S) - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/colors.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/colors.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/colors.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/colors.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/connection.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/connection.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/connection.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/connection.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/containers.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/containers.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/containers.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/containers.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/containers.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/containers.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/containers.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/containers.properties 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -# 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/. - -containers.labelMinWidth = 4rem -containers.updateContainerTitle = Налады кантэйнера %S - -containers.blue.label = Блакітны -containers.turquoise.label = Бірузовы -containers.green.label = Зялёны -containers.yellow.label = Жоўты -containers.orange.label = Аранжавы -containers.red.label = Чырвоны -containers.pink.label = Ружовы -containers.purple.label = Фіялетавы - -containers.fingerprint.label = Адбітак пальца -containers.briefcase.label = Партфель -# LOCALIZATION NOTE (containers.dollar.label) -# String represents a money sign but currently uses a dollar sign so don't change to local currency -# See Bug 1291672 -containers.dollar.label = Знак долара -containers.cart.label = Кошык -containers.circle.label = Кропка -containers.vacation.label = Адпачынак -containers.gift.label = Падарунак -containers.food.label = Ежа -containers.fruit.label = Садавіна -containers.pet.label = Жывёліна -containers.tree.label = Дрэва -containers.chill.label = Прастуда diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/content.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/content.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/content.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/content.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/cookies.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/cookies.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/cookies.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/cookies.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/fonts.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/fonts.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/fonts.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/fonts.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/languages.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/languages.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/languages.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/languages.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/main.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/main.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/main.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/main.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/permissions.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/permissions.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/permissions.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/permissions.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/preferences.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/preferences.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/preferences.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/preferences.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/privacy.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/privacy.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/privacy.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/privacy.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/search.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/search.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/search.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/search.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/selectBookmark.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/selectBookmark.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/selectBookmark.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/selectBookmark.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/siteDataSettings.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/siteDataSettings.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/siteDataSettings.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/siteDataSettings.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/sync.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/sync.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/sync.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/sync.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/tabs.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/tabs.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/tabs.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/tabs.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/translation.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/translation.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/preferences/translation.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/preferences/translation.dtd 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/sanitize.dtd firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/sanitize.dtd --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/chrome/browser/sanitize.dtd 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/chrome/browser/sanitize.dtd 2018-06-20 17:31:30.000000000 +0000 @@ -8,23 +8,15 @@ The column width should be set at half of the dialog width. --> - - - - - + + diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/pdfviewer/viewer.properties firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/pdfviewer/viewer.properties --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/browser/pdfviewer/viewer.properties 2018-06-11 13:04:09.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/browser/pdfviewer/viewer.properties 2018-06-20 17:31:30.000000000 +0000 @@ -65,6 +65,20 @@ cursor_hand_tool.title=Уключыць ручную прыладу cursor_hand_tool_label=Ручная прылада +scroll_vertical.title=Ужываць вертыкальную пракрутку +scroll_vertical_label=Вертыкальная пракрутка +scroll_horizontal.title=Ужываць гарызантальную пракрутку +scroll_horizontal_label=Гарызантальная пракрутка +scroll_wrapped.title=Ужываць маштабавальную пракрутку +scroll_wrapped_label=Маштабавальная пракрутка + +spread_none.title=Не выкарыстоўваць разгорнутыя старонкі +spread_none_label=Без разгорнутых старонак +spread_odd.title=Разгорнутыя старонкі пачынаючы з няцотных нумароў +spread_odd_label=Няцотныя старонкі злева +spread_even.title=Разгорнутыя старонкі пачынаючы з цотных нумароў +spread_even_label=Цотныя старонкі злева + # Document properties dialog box document_properties.title=Уласцівасці дакумента… document_properties_label=Уласцівасці дакумента… diff -Nru firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/devtools/client/application.ftl firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/devtools/client/application.ftl --- firefox-trunk-62.0~a1~hg20180611r422292/l10n/be/devtools/client/application.ftl 1970-01-01 00:00:00.000000000 +0000 +++ firefox-trunk-62.0~a1~hg20180620r423058/l10n/be/devtools/client/application.ftl 2018-06-20 17:31:30.000000000 +0000 @@ -0,0 +1,63 @@ +# 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/. + + +### These strings are used inside the Application panel which is available +### by setting the preference `devtools-application-enabled` to true. + + +### The correct localization of this file might be to keep it in English, or another +### language commonly spoken among web developers. You want to make that choice consistent +### across the developer tools. A good criteria is the language in which you'd find the +### best documentation on web development on the web. + +# Header for the list of Service Workers displayed in the application panel for the current page. +serviceworker-list-header = Service Workers +# Text displayed next to the list of Service Workers to encourage users to check out +# about:debugging to see all registered Service Workers. +serviceworker-list-aboutdebugging = Адкрыць about:debugging для Service Workers з іншых даменаў +# Text for the button to unregister a Service Worker. Displayed for active Service Workers. +serviceworker-worker-unregister = Скасаваць рэгістрацыю +# Text for the debug link displayed for an already started Service Worker. Clicking on the +# link opens a new devtools toolbox for this service worker. The title attribute is only +# displayed when the link is disabled. +serviceworker-worker-debug = Адладка + .title = Можна адладжваць толькі запушчаныя service workers +# Text for the start link displayed for a registered but not running Service Worker. +# Clicking on the link will attempt to start the service worker. +serviceworker-worker-start = Запусціць +# Text displayed for the updated time of the service worker. The