Bug 1457985: Fix a typo in nsStyleContentData copy-constructor. r=xidorn
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 30 Apr 2018 20:41:08 +0200
changeset 472473 25599bf5604d848d78484199781bd99c44b7da0e
parent 472472 6a5dc145f8ecd07be94a1c22bcfa6c5ddfae936c
child 472474 c287079aaf7f3f61f04cc8ab12df91d661371d97
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1457985
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457985: Fix a typo in nsStyleContentData copy-constructor. r=xidorn MozReview-Commit-ID: FtcA6Nm4dwr
layout/style/crashtests/1457985.html
layout/style/crashtests/crashtests.list
layout/style/nsStyleStruct.cpp
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1457985.html
@@ -0,0 +1,2 @@
+<body style="content:attr(a) open-quote">
+<header style="all:inherit">
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -270,8 +270,9 @@ pref(dom.webcomponents.shadowdom.enabled
 load 1426312.html
 load 1439793.html
 load 1409183.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1445682.html
 load 1450691.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1453206.html
 load 1454140.html
 load 1455108.html
+load 1457985.html
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -4156,17 +4156,17 @@ nsStyleContentData::nsStyleContentData(c
       mContent.mImage->AddRef();
       break;
     case eStyleContentType_Counter:
     case eStyleContentType_Counters:
       mContent.mCounters = aOther.mContent.mCounters;
       mContent.mCounters->AddRef();
       break;
     case eStyleContentType_Attr:
-      mContent.mAttr = new nsStyleContentAttr(*mContent.mAttr);
+      mContent.mAttr = new nsStyleContentAttr(*aOther.mContent.mAttr);
       break;
     case eStyleContentType_String:
       mContent.mString = NS_strdup(aOther.mContent.mString);
       break;
     default:
       MOZ_ASSERT(!aOther.mContent.mString);
       mContent.mString = nullptr;
   }