diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index a50c1f811a11..951825193205 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -1522,14 +1522,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(FragmentOrElement) -void -FragmentOrElement::MarkUserData(void* aObject, nsAtom* aKey, void* aChild, - void* aData) -{ - uint32_t* gen = static_cast(aData); - xpc_MarkInCCGeneration(static_cast(aChild), *gen); -} - void FragmentOrElement::MarkNodeChildren(nsINode* aNode) { diff --git a/dom/base/FragmentOrElement.h b/dom/base/FragmentOrElement.h index 9b62d18d9218..323d0eed7a4d 100644 --- a/dom/base/FragmentOrElement.h +++ b/dom/base/FragmentOrElement.h @@ -207,8 +207,6 @@ public: static void RemoveBlackMarkedNode(nsINode* aNode); static void MarkNodeChildren(nsINode* aNode); static void InitCCCallbacks(); - static void MarkUserData(void* aObject, nsAtom* aKey, void* aChild, - void *aData); /** * Is the HTML local name a void element? diff --git a/dom/base/crashtests/324871-1.html b/dom/base/crashtests/324871-1.html deleted file mode 100644 index 21aa46230fbe..000000000000 --- a/dom/base/crashtests/324871-1.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - -
- - \ No newline at end of file diff --git a/dom/base/crashtests/822691.html b/dom/base/crashtests/822691.html deleted file mode 100644 index 8bc8eb831b45..000000000000 --- a/dom/base/crashtests/822691.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/dom/base/crashtests/crashtests.list b/dom/base/crashtests/crashtests.list index 196745f02da1..04aa7fc06412 100644 --- a/dom/base/crashtests/crashtests.list +++ b/dom/base/crashtests/crashtests.list @@ -8,7 +8,6 @@ load 244933-1.html load 275912-1.html load 293388-1.html load 308120-1.xul -load 324871-1.html load 325730-1.html load 326618-1.html load 326646-1.html @@ -163,7 +162,6 @@ load 815477.html load 815500.html load 816253.html load 819014.html -load 822691.html load 822723.html load 824719.html load 827190.html diff --git a/dom/locales/en-US/chrome/dom/dom.properties b/dom/locales/en-US/chrome/dom/dom.properties index d8a9fd0b2f28..9b27c91cc1e8 100644 --- a/dom/locales/en-US/chrome/dom/dom.properties +++ b/dom/locales/en-US/chrome/dom/dom.properties @@ -158,8 +158,6 @@ PrefixedFullscreenAPIWarning=Prefixed Fullscreen API is deprecated. Please use u NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect. # LOCALIZATION NOTE: Do not translate "LenientThis" and "this" LenientThisWarning=Ignoring get or set of property that has [LenientThis] because the “this” object is incorrect. -# LOCALIZATION NOTE: Do not translate "getUserData", "setUserData", "WeakMap", or "element.dataset". -GetSetUserDataWarning=Use of getUserData() or setUserData() is deprecated. Use WeakMap or element.dataset instead. # LOCALIZATION NOTE: Do not translate "mozGetAsFile" or "toBlob" MozGetAsFileWarning=The non-standard mozGetAsFile method is deprecated and will soon be removed. Use the standard toBlob method instead. # LOCALIZATION NOTE: Do not translate "captureEvents()" or "addEventListener()" diff --git a/dom/smil/crashtests/641388-1.html b/dom/smil/crashtests/641388-1.html index 4d1f0ea048a6..25c941dedb32 100644 --- a/dom/smil/crashtests/641388-1.html +++ b/dom/smil/crashtests/641388-1.html @@ -53,7 +53,6 @@ try{o62=o13.ownerDocument.getElementById('ifr17516').contentDocument.getElementB try{tmp.id = 'ifr2522';}catch(e){} try{o101=o15.ownerDocument.getElementById('ifr2522').contentDocument.getElementById('element3');;}catch(e){} try{o101.appendChild(o24);}catch(e){} -try{o109=o35.setUserData('key',null,function (o,k,d,s,ds) { gc(); });;}catch(e){} try{o112=document.createElementNS('http://www.w3.org/1999/xhtml', 'script');;}catch(e){} try{o124=document.createElementNS('http://www.w3.org/1998/Math/MathML','root');;}catch(e){} try{o125=document.createElementNS('http://www.w3.org/2000/svg','font-face');;}catch(e){} diff --git a/dom/smil/nsSMILParserUtils.cpp b/dom/smil/nsSMILParserUtils.cpp index b108fc757c61..57b3af9e391c 100644 --- a/dom/smil/nsSMILParserUtils.cpp +++ b/dom/smil/nsSMILParserUtils.cpp @@ -37,7 +37,7 @@ SkipWhitespace(RangedPtr& aIter, const RangedPtr& aEnd) { while (aIter != aEnd) { - if (!IsSVGWhitespace(*aIter)) { + if (!nsContentUtils::IsHTMLWhitespace(*aIter)) { return true; } ++aIter; @@ -279,7 +279,7 @@ MoveToNextToken(RangedPtr& aIter, bool isCurrentCharEscaped = false; - while (aIter != aEnd && !IsSVGWhitespace(*aIter)) { + while (aIter != aEnd && !nsContentUtils::IsHTMLWhitespace(*aIter)) { if (isCurrentCharEscaped) { isCurrentCharEscaped = false; } else { @@ -443,7 +443,7 @@ nsSMILParserUtils::TrimWhitespace(const nsAString& aString) aString.EndReading(end); // Skip whitespace characters at the beginning - while (start != end && IsSVGWhitespace(*start)) { + while (start != end && nsContentUtils::IsHTMLWhitespace(*start)) { ++start; } @@ -451,7 +451,7 @@ nsSMILParserUtils::TrimWhitespace(const nsAString& aString) while (end != start) { --end; - if (!IsSVGWhitespace(*end)) { + if (!nsContentUtils::IsHTMLWhitespace(*end)) { // Step back to the last non-whitespace character. ++end; @@ -466,10 +466,11 @@ bool nsSMILParserUtils::ParseKeySplines(const nsAString& aSpec, FallibleTArray& aKeySplines) { - nsCharSeparatedTokenizerTemplate controlPointTokenizer(aSpec, ';'); + nsCharSeparatedTokenizerTemplate + controlPointTokenizer(aSpec, ';'); while (controlPointTokenizer.hasMoreTokens()) { - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(controlPointTokenizer.nextToken(), ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); @@ -500,7 +501,8 @@ nsSMILParserUtils::ParseSemicolonDelimitedProgressList(const nsAString& aSpec, bool aNonDecreasing, FallibleTArray& aArray) { - nsCharSeparatedTokenizerTemplate tokenizer(aSpec, ';'); + nsCharSeparatedTokenizerTemplate + tokenizer(aSpec, ';'); double previousValue = -1.0; @@ -579,7 +581,8 @@ bool nsSMILParserUtils::ParseValuesGeneric(const nsAString& aSpec, GenericValueParser& aParser) { - nsCharSeparatedTokenizerTemplate tokenizer(aSpec, ';'); + nsCharSeparatedTokenizerTemplate + tokenizer(aSpec, ';'); if (!tokenizer.hasMoreTokens()) { // Empty list return false; } @@ -665,7 +668,7 @@ nsSMILParserUtils::CheckForNegativeNumber(const nsAString& aStr) RangedPtr end(SVGContentUtils::GetEndRangedPtr(aStr)); // Skip initial whitespace - while (iter != end && IsSVGWhitespace(*iter)) { + while (iter != end && nsContentUtils::IsHTMLWhitespace(*iter)) { ++iter; } diff --git a/dom/svg/SVGContentUtils.h b/dom/svg/SVGContentUtils.h index 8ec309daf6f8..55ba291bdd8d 100644 --- a/dom/svg/SVGContentUtils.h +++ b/dom/svg/SVGContentUtils.h @@ -68,20 +68,6 @@ enum SVGTransformTypes { eChildToUserSpace }; -inline bool -IsSVGWhitespace(char aChar) -{ - return aChar == '\x20' || aChar == '\x9' || - aChar == '\xD' || aChar == '\xA'; -} - -inline bool -IsSVGWhitespace(char16_t aChar) -{ - return aChar == char16_t('\x20') || aChar == char16_t('\x9') || - aChar == char16_t('\xD') || aChar == char16_t('\xA'); -} - /** * Functions generally used by SVG Content classes. Functions here * should not generally depend on layout methods/classes e.g. nsSVGUtils diff --git a/dom/svg/SVGLengthList.cpp b/dom/svg/SVGLengthList.cpp index 0c5b7752e535..769fc09fb432 100644 --- a/dom/svg/SVGLengthList.cpp +++ b/dom/svg/SVGLengthList.cpp @@ -45,7 +45,7 @@ SVGLengthList::SetValueFromString(const nsAString& aValue) { SVGLengthList temp; - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); while (tokenizer.hasMoreTokens()) { diff --git a/dom/svg/SVGMotionSMILPathUtils.cpp b/dom/svg/SVGMotionSMILPathUtils.cpp index 1ef1782f0196..f2badd224fc0 100644 --- a/dom/svg/SVGMotionSMILPathUtils.cpp +++ b/dom/svg/SVGMotionSMILPathUtils.cpp @@ -94,7 +94,7 @@ SVGMotionSMILPathUtils::PathGenerator:: ParseCoordinatePair(const nsAString& aCoordPairStr, float& aXVal, float& aYVal) { - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aCoordPairStr, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); diff --git a/dom/svg/SVGNumberList.cpp b/dom/svg/SVGNumberList.cpp index bd30fd3f8467..20c82e3bb19a 100644 --- a/dom/svg/SVGNumberList.cpp +++ b/dom/svg/SVGNumberList.cpp @@ -48,7 +48,7 @@ SVGNumberList::SetValueFromString(const nsAString& aValue) { SVGNumberList temp; - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); while (tokenizer.hasMoreTokens()) { diff --git a/dom/svg/SVGPointList.cpp b/dom/svg/SVGPointList.cpp index c41a109c2920..5c44f2462588 100644 --- a/dom/svg/SVGPointList.cpp +++ b/dom/svg/SVGPointList.cpp @@ -54,7 +54,7 @@ SVGPointList::SetValueFromString(const nsAString& aValue) SVGPointList temp; - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); while (tokenizer.hasMoreTokens()) { diff --git a/dom/svg/SVGPreserveAspectRatio.cpp b/dom/svg/SVGPreserveAspectRatio.cpp index d0ca1afd5693..a0b47731bd70 100644 --- a/dom/svg/SVGPreserveAspectRatio.cpp +++ b/dom/svg/SVGPreserveAspectRatio.cpp @@ -7,6 +7,7 @@ #include "SVGPreserveAspectRatio.h" #include "mozilla/dom/SVGPreserveAspectRatioBinding.h" +#include "nsContentUtils.h" #include "nsWhitespaceTokenizer.h" #include "SVGAnimatedPreserveAspectRatio.h" @@ -58,7 +59,8 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice) SVGPreserveAspectRatio::FromString(const nsAString& aString, SVGPreserveAspectRatio* aValue) { - nsWhitespaceTokenizerTemplate tokenizer(aString); + nsWhitespaceTokenizerTemplate + tokenizer(aString); if (tokenizer.whitespaceBeforeFirstToken() || !tokenizer.hasMoreTokens()) { return NS_ERROR_DOM_SYNTAX_ERR; diff --git a/dom/svg/SVGStringList.cpp b/dom/svg/SVGStringList.cpp index dc00bc5b883b..f57630ad914e 100644 --- a/dom/svg/SVGStringList.cpp +++ b/dom/svg/SVGStringList.cpp @@ -45,7 +45,7 @@ SVGStringList::SetValue(const nsAString& aValue) SVGStringList temp; if (mIsCommaSeparated) { - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aValue, ','); while (tokenizer.hasMoreTokens()) { @@ -57,7 +57,8 @@ SVGStringList::SetValue(const nsAString& aValue) return NS_ERROR_DOM_SYNTAX_ERR; // trailing comma } } else { - nsWhitespaceTokenizerTemplate tokenizer(aValue); + nsWhitespaceTokenizerTemplate + tokenizer(aValue); while (tokenizer.hasMoreTokens()) { if (!temp.AppendItem(tokenizer.nextToken())) { diff --git a/dom/svg/nsSVGAnimatedTransformList.cpp b/dom/svg/nsSVGAnimatedTransformList.cpp index befcb23e022e..faa5bc92d254 100644 --- a/dom/svg/nsSVGAnimatedTransformList.cpp +++ b/dom/svg/nsSVGAnimatedTransformList.cpp @@ -270,7 +270,7 @@ nsSVGAnimatedTransformList::SMILAnimatedTransformList::ParseParameterList( float* aVars, int32_t aNVars) { - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aSpec, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); int numArgsFound = 0; diff --git a/dom/svg/nsSVGDataParser.cpp b/dom/svg/nsSVGDataParser.cpp index ce81ce4be234..fe8dcbf105f5 100644 --- a/dom/svg/nsSVGDataParser.cpp +++ b/dom/svg/nsSVGDataParser.cpp @@ -5,6 +5,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsSVGDataParser.h" +#include "nsContentUtils.h" #include "SVGContentUtils.h" nsSVGDataParser::nsSVGDataParser(const nsAString& aValue) @@ -31,7 +32,7 @@ bool nsSVGDataParser::SkipWsp() { while (mIter != mEnd) { - if (!IsSVGWhitespace(*mIter)) { + if (!nsContentUtils::IsHTMLWhitespace(*mIter)) { return true; } ++mIter; diff --git a/dom/svg/nsSVGIntegerPair.cpp b/dom/svg/nsSVGIntegerPair.cpp index f16536adee94..ecca689fc2a8 100644 --- a/dom/svg/nsSVGIntegerPair.cpp +++ b/dom/svg/nsSVGIntegerPair.cpp @@ -27,9 +27,8 @@ static nsresult ParseIntegerOptionalInteger(const nsAString& aValue, int32_t aValues[2]) { - nsCharSeparatedTokenizerTemplate - tokenizer(aValue, ',', - nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); + nsCharSeparatedTokenizerTemplate + tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); if (tokenizer.whitespaceBeforeFirstToken()) { return NS_ERROR_DOM_SYNTAX_ERR; } diff --git a/dom/svg/nsSVGNumberPair.cpp b/dom/svg/nsSVGNumberPair.cpp index b06c2eefd45c..fbe399531bb3 100644 --- a/dom/svg/nsSVGNumberPair.cpp +++ b/dom/svg/nsSVGNumberPair.cpp @@ -23,7 +23,7 @@ static nsresult ParseNumberOptionalNumber(const nsAString& aValue, float aValues[2]) { - nsCharSeparatedTokenizerTemplate + nsCharSeparatedTokenizerTemplate tokenizer(aValue, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); if (tokenizer.whitespaceBeforeFirstToken()) { diff --git a/dom/svg/nsSVGViewBox.cpp b/dom/svg/nsSVGViewBox.cpp index 26fd5214fdbf..b8dfe25c533e 100644 --- a/dom/svg/nsSVGViewBox.cpp +++ b/dom/svg/nsSVGViewBox.cpp @@ -40,9 +40,8 @@ nsSVGViewBoxRect::FromString(const nsAString& aStr, nsSVGViewBoxRect *aViewBox) return NS_OK; } - nsCharSeparatedTokenizerTemplate - tokenizer(aStr, ',', - nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); + nsCharSeparatedTokenizerTemplate + tokenizer(aStr, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); float vals[NUM_VIEWBOX_COMPONENTS]; uint32_t i; for (i = 0; i < NUM_VIEWBOX_COMPONENTS && tokenizer.hasMoreTokens(); ++i) { diff --git a/js/xpconnect/crashtests/582649.html b/js/xpconnect/crashtests/582649.html deleted file mode 100644 index 235858e3c7ef..000000000000 --- a/js/xpconnect/crashtests/582649.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Testcase for bug 582649 - - - - - diff --git a/js/xpconnect/crashtests/crashtests.list b/js/xpconnect/crashtests/crashtests.list index 7ed3a758c98c..67621bd00cd0 100644 --- a/js/xpconnect/crashtests/crashtests.list +++ b/js/xpconnect/crashtests/crashtests.list @@ -25,7 +25,6 @@ load 512815-1.html load 515726-1.html load 545291-1.html load 558979.html -load 582649.html load 601284-1.html load 603146-1.html load 603858-1.html diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index 298c66a385fe..bc4ffcc329d8 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -400,21 +400,6 @@ nsXPConnect::GetInfoForIID(const nsIID * aIID, nsIInterfaceInfo** info) return XPTInterfaceInfoManager::GetSingleton()->GetInfoForIID(aIID, info); } -void -xpc_MarkInCCGeneration(nsISupports* aVariant, uint32_t aGeneration) -{ - nsCOMPtr variant = do_QueryInterface(aVariant); - if (variant) { - variant->SetCCGeneration(aGeneration); - variant->GetJSVal(); // Unmarks gray JSObject. - XPCVariant* weak = variant.get(); - variant = nullptr; - if (weak->IsPurple()) { - weak->RemovePurple(); - } - } -} - void xpc_TryUnmarkWrappedGrayObject(nsISupports* aWrappedJS) { diff --git a/js/xpconnect/src/xpcpublic.h b/js/xpconnect/src/xpcpublic.h index 848440a7ce00..ec6efd1a5b91 100644 --- a/js/xpconnect/src/xpcpublic.h +++ b/js/xpconnect/src/xpcpublic.h @@ -226,11 +226,6 @@ xpc_FastGetCachedWrapper(JSContext* cx, nsWrapperCache* cache, JS::MutableHandle return nullptr; } -// If aVariant is an XPCVariant, this marks the object to be in aGeneration. -// This also unmarks the gray JSObject. -extern void -xpc_MarkInCCGeneration(nsISupports* aVariant, uint32_t aGeneration); - // If aWrappedJS is a JS wrapper, unmark its JSObject. extern void xpc_TryUnmarkWrappedGrayObject(nsISupports* aWrappedJS);