Merge mozilla-central to autoland. a=merge CLOSED TREE

This commit is contained in:
Csoregi Natalia 2018-02-21 23:52:24 +02:00
commit dd63683685
69 changed files with 1937 additions and 1186 deletions

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<blocklist lastupdate="1519078890592" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<blocklist lastupdate="1519220554330" xmlns="http://www.mozilla.org/2006/addons-blocklist">
<emItems>
<emItem blockID="i334" id="{0F827075-B026-42F3-885D-98981EE7B1AE}">
<prefs/>
@ -2205,194 +2205,6 @@
</emItem>
</emItems>
<pluginItems>
<pluginItem blockID="p1063">
<match exp="Java(\(TM\))? Plug-in 10\.(8[1-9]|90)(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1246">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader</infoURL>
<versionRange maxVersion="11.0.16 " minVersion="10.1.6" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p954">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 80" minVersion="Java 7 Update 79" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1143">
<match exp="Java\(TM\) Platform SE 7 U(9[1-7])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1062">
<match exp="Java\(TM\) Platform SE 8 U(4[6-9]|5\d|6[0-4])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p962">
<match exp="Java(\(TM\))? Plug-in 10\.(79|80)(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p240">
<match exp="DivXBrowserPlugin\.plugin" name="filename"/>
<versionRange maxVersion="1.4" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p906">
<match exp="Java\(TM\) Platform SE 7 U(4[5-9]|(5|6)\d|7[0-8])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1064">
<match exp="Java(\(TM\))? Plug-in 11\.(4[6-9]|5\d|6[0-4])(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p594">
<match exp="npCiscoWebCommunicator\.dll" name="filename"/>
<versionRange maxVersion="3.0.5.99999999999999" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p416">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 45" minVersion="Java 6 Update 42" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p428">
<match exp="np[dD]eployJava1\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="2"/>
</pluginItem>
<pluginItem blockID="p910">
<match exp="Java(\(TM\))? Plug-in 10\.(4[5-9]|(5|6)\d|7[0-8])(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1052">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 11" minVersion="Java 7 Update 11" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p328">
<match exp="Silverlight\.plugin" name="filename"/>
<versionRange maxVersion="5.1.20124.9999" minVersion="5.1" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="19.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p80">
<match exp="\(TM\)" name="name"/>
<match exp="(npjp2\.dll)|(libnpjp2\.so)" name="filename"/>
<match exp="[^\d\._]((0(\.\d+(\.\d+([_\.]\d+)?)?)?)|(1\.(([0-5](\.\d+([_\.]\d+)?)?)|(6(\.0([_\.](0?\d|1\d|2\d|30))?)?)|(7(\.0([_\.][0-2])?)?))))([^\d\._]|$)" name="description"/>
<versionRange severity="1"/>
</pluginItem>
<pluginItem blockID="p956">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 8 Update 45" minVersion="Java 8 Update 45" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p414">
<match exp="Java\(TM\) Platform SE 6 U4[2-5](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p556">
<match exp="npUnity3D32\.dll" name="filename"/>
<versionRange maxVersion="4.6.6f1" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p574">
<match exp="NPDjVu\.plugin" name="filename"/>
<versionRange maxVersion="6.1.1" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p156">
<match exp="nppdf32\.dll" name="filename"/>
<versionRange maxVersion="9.5.1" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p958">
<match exp="Java\(TM\) Platform SE 7 U(79|80)(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1146">
<match exp="Java(\(TM\))? Plug-in 11\.(6[4-9]|7[0-6])(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p908">
<match exp="Java\(TM\) Platform SE 8( U([1-3]?\d|4[0-4]))?(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p912">
<match exp="Java(\(TM\))? Plug-in 11\.(\d|[1-3]\d|4[0-4])(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p184">
<match exp="Java\(TM\) Plug-in 1\.7\.0(_0?([0-9]|(1[0-1]))?)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p412">
<match exp="Java\(TM\) Plug-in 1\.6\.0_4[2-5]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p592">
<match exp="CiscoWebCommunicator\.plugin" name="filename"/>
<versionRange maxVersion="3.0.5.99999999999999" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p572">
<match exp="npdjvu\.dll" name="filename"/>
<versionRange maxVersion="6.1.4.27993" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p31">
<match exp="NPMySrch.dll" name="filename"/>
</pluginItem>
<pluginItem blockID="p457">
<match exp="Java(\(TM\))? Plug-in ((1\.7\.0_(2[5-9]|3\d|4[0-4]))|(10\.4[0-4](\.[0-9]+)?))([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p294">
<match exp="Java\(TM\) Platform SE 7 U1[2-5](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p332">
<match exp="libflashplayer\.so" name="filename"/>
<match exp="^Shockwave Flash 11.(0|1) r[0-9]{1,3}$" name="description"/>
@ -2403,165 +2215,6 @@
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1247">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader</infoURL>
<versionRange maxVersion="15.006.30174" minVersion="15.006.30174" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p186">
<match exp="Java\(TM\) Platform SE 6 U3[1-8](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p242" os="Darwin">
<match exp="Flip4Mac" name="description"/>
<versionRange maxVersion="2.4.3.999" minVersion="0" severity="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="18.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p154">
<match exp="npctrl\.dll" name="filename"/>
<versionRange maxVersion="5.1.20124.9999" minVersion="5.0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p902">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 78" minVersion="Java 7 Update 45" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p459">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 44" minVersion="Java 7 Update 25" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p188">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 38" minVersion="Java 6 Update 0" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p292">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 15" minVersion="Java 7 Update 12" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1002">
<match exp="npUnity3D32\.dll" name="filename"/>
<versionRange maxVersion="5.0.3f1" minVersion="5.0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p964">
<match exp="Java(\(TM\))? Plug-in 11\.45(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p190">
<match exp="Java\(TM\) Plug-in 1\.6\.0_3[1-8]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p366">
<match exp="Scorch\.plugin" name="filename"/>
<versionRange maxVersion="6.2.0" minVersion="6.2.0" severity="1"/>
</pluginItem>
<pluginItem blockID="p113">
<match exp="npuplaypc\.dll" name="filename"/>
<versionRange maxVersion="1.0.0.0" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p960">
<match exp="Java\(TM\) Platform SE 8 U45(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p158">
<match exp="nppdf32\.dll" name="filename"/>
<versionRange maxVersion="10.1.5.9999" minVersion="10.0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p418">
<match exp="Java\(TM\) Plug-in 1\.7\.0_(1[6-9]|2[0-4])([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p182">
<match exp="Java\(TM\) Platform SE 7 U([0-9]|(1[0-1]))(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p422">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 24" minVersion="Java 7 Update 16" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1141">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 97" minVersion="Java 7 Update 91" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1053">
<match exp="nprpplugin\.dll" name="filename"/>
<infoURL>https://real.com/</infoURL>
<versionRange maxVersion="17.0.10.7" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1250">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader</infoURL>
<versionRange maxVersion="15.016.20045" minVersion="15.016.20045" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p85">
<match exp="JavaPlugin2_NPAPI\.plugin" name="filename"/>
<versionRange maxVersion="13.6.0" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p250">
<match exp="npFoxitReaderPlugin\.dll" name="filename"/>
<versionRange maxVersion="2.2.1.530" minVersion="0" severity="0" vulnerabilitystatus="2"/>
</pluginItem>
<pluginItem blockID="p1142">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 8 Update 76" minVersion="Java 8 Update 64" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p129">
<match exp="Silverlight\.plugin" name="filename"/>
<versionRange maxVersion="5.0.99999" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p302">
<match exp="Java\(TM\) Plug-in 1\.6\.0_(39|40|41)([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p330">
<match exp="libflashplayer\.so" name="filename"/>
<match exp="^Shockwave Flash (([1-9]\.[0-9]+)|(10\.([0-2]|(3 r(([0-9][0-9]?)|1(([0-7][0-9])|8[0-2]))))))( |$)" name="description"/>
@ -2572,182 +2225,16 @@
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p89" os="Darwin">
<match exp="AdobePDFViewerNPAPI\.plugin" name="filename"/>
<versionRange maxVersion="10.1.3" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p1060">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 8 Update 64" minVersion="Java 8 Update 46" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p33">
<match exp="[0-6]\.0\.[01]\d{2}\.\d+" name="name"/>
<match exp="npdeploytk.dll" name="filename"/>
<versionRange severity="1"/>
</pluginItem>
<pluginItem blockID="p1145">
<match exp="Java(\(TM\))? Plug-in 10\.(9[1-7])(\.[0-9]+)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p558">
<match exp="Unity Web Player\.plugin" name="filename"/>
<match exp="^($|Unity Web Player version ([0-3]|(4\.([0-5]|6(\.([0-5]|6f1)))?[^0-9.])))" name="description"/>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1059">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 90" minVersion="Java 7 Update 81" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p408">
<match exp="QuickTime Plugin\.plugin" name="filename"/>
<versionRange maxVersion="7.6.5" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p296">
<match exp="Java\(TM\) Plug-in 1\.7\.0_1[2-5]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1144">
<match exp="Java\(TM\) Platform SE 8 U(6[4-9]|7[0-6])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p456">
<match exp="npvlc\.dll" name="filename"/>
<versionRange maxVersion="2.0.5" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p298">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 41" minVersion="Java 6 Update 39" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1054">
<match exp="np32dsw_[0-9]+\.dll" name="filename"/>
<infoURL>https://get.adobe.com/shockwave/</infoURL>
<versionRange maxVersion="12.2.0.162" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p458">
<match exp="Java\(TM\) Platform SE 7 U(2[5-9]|3\d|4[0-4])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p420">
<match exp="Java\(TM\) Platform SE 7 U(1[6-9]|2[0-4])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p28">
<match exp="NPFFAddOn.dll" name="filename"/>
</pluginItem>
<pluginItem blockID="p1151">
<match exp="npqtplugin\.dll" name="filename"/>
<infoURL>https://support.apple.com/en-us/HT205771</infoURL>
<versionRange maxVersion="*" minVersion="0" severity="0" vulnerabilitystatus="2"/>
</pluginItem>
<pluginItem blockID="p1055">
<match exp="DirectorShockwave\.plugin" name="filename"/>
<infoURL>https://get.adobe.com/shockwave/</infoURL>
<versionRange maxVersion="12.2.0.162" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p254">
<match exp="PDF Browser Plugin\.plugin" name="filename"/>
<versionRange maxVersion="2.4.2" minVersion="0" severity="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="18.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p248">
<match exp="Scorch\.plugin" name="filename"/>
<versionRange maxVersion="6.2.0b88" minVersion="0" severity="1"/>
</pluginItem>
<pluginItem blockID="p34">
<match exp="[Nn][Pp][Jj][Pp][Ii]1[56]0_[0-9]+\.[Dd][Ll][Ll]" name="filename"/>
<versionRange>
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="3.6a1pre"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p1004">
<match exp="Unity Web Player\.plugin" name="filename"/>
<match exp="^($|Unity Web Player version 5.0(\.([0-2]|3f1))?[^0-9.])" name="description"/>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p180">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 10" minVersion="Java 7 Update 0" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p32">
<match exp="npViewpoint.dll" name="filename"/>
<versionRange>
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="3.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p300">
<match exp="Java\(TM\) Platform SE 6 U(39|40|41)(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p252" os="Darwin">
<match exp="AdobePDFViewerNPAPI\.plugin" name="filename"/>
<versionRange maxVersion="11.0.01" minVersion="11.0.0" severity="1"/>
</pluginItem>
<pluginItem blockID="p102">
<match exp="npmozax\.dll" name="filename"/>
<versionRange maxVersion="*" minVersion="0"/>
</pluginItem>
<pluginItem blockID="p1120">
<match exp="(Silverlight\.plugin|npctrl\.dll)" name="filename"/>
<infoURL>https://www.microsoft.com/getsilverlight</infoURL>
<versionRange maxVersion="5.1.41105.0" minVersion="5.1.20125" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p1061">
<match exp="Java\(TM\) Platform SE 7 U(8[1-9]|90)(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p904">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 8 Update 44" minVersion="Java 8" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p152">
<match exp="npctrl\.dll" name="filename"/>
<versionRange maxVersion="4.1.10328.0" minVersion="0" severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="59c31ade-88d6-4b22-8601-5316f82e3977">
<match exp="(nppdf32\.dll)|(AdobePDFViewerNPAPI\.plugin)" name="filename"/>
<infoURL>https://get.adobe.com/reader/</infoURL>
@ -2811,6 +2298,229 @@
<infoURL>https://java.com/</infoURL>
<versionRange severity="0" vulnerabilitystatus="1"/>
</pluginItem>
<pluginItem blockID="p416">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 45" minVersion="Java 6 Update 42" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p328">
<match exp="Silverlight\.plugin" name="filename"/>
<versionRange maxVersion="5.1.20124.9999" minVersion="5.1" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="19.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p414">
<match exp="Java\(TM\) Platform SE 6 U4[2-5](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p184">
<match exp="Java\(TM\) Plug-in 1\.7\.0(_0?([0-9]|(1[0-1]))?)?([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p412">
<match exp="Java\(TM\) Plug-in 1\.6\.0_4[2-5]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p457">
<match exp="Java(\(TM\))? Plug-in ((1\.7\.0_(2[5-9]|3\d|4[0-4]))|(10\.4[0-4](\.[0-9]+)?))([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p294">
<match exp="Java\(TM\) Platform SE 7 U1[2-5](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p186">
<match exp="Java\(TM\) Platform SE 6 U3[1-8](\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p242" os="Darwin">
<match exp="Flip4Mac" name="description"/>
<versionRange maxVersion="2.4.3.999" minVersion="0" severity="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="18.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p459">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 44" minVersion="Java 7 Update 25" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p188">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 38" minVersion="Java 6 Update 0" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p292">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 15" minVersion="Java 7 Update 12" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p190">
<match exp="Java\(TM\) Plug-in 1\.6\.0_3[1-8]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p418">
<match exp="Java\(TM\) Plug-in 1\.7\.0_(1[6-9]|2[0-4])([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p182">
<match exp="Java\(TM\) Platform SE 7 U([0-9]|(1[0-1]))(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p422">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 7 Update 24" minVersion="Java 7 Update 16" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p302">
<match exp="Java\(TM\) Plug-in 1\.6\.0_(39|40|41)([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p296">
<match exp="Java\(TM\) Plug-in 1\.7\.0_1[2-5]([^\d\._]|$)" name="name"/>
<match exp="libnpjp2\.so" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p298">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<versionRange maxVersion="Java 6 Update 41" minVersion="Java 6 Update 39" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p458">
<match exp="Java\(TM\) Platform SE 7 U(2[5-9]|3\d|4[0-4])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p420">
<match exp="Java\(TM\) Platform SE 7 U(1[6-9]|2[0-4])(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p254">
<match exp="PDF Browser Plugin\.plugin" name="filename"/>
<versionRange maxVersion="2.4.2" minVersion="0" severity="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="18.0a1"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p34">
<match exp="[Nn][Pp][Jj][Pp][Ii]1[56]0_[0-9]+\.[Dd][Ll][Ll]" name="filename"/>
<versionRange>
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="3.6a1pre"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p180">
<match exp="JavaAppletPlugin\.plugin" name="filename"/>
<infoURL>https://java.com/</infoURL>
<versionRange maxVersion="Java 7 Update 10" minVersion="Java 7 Update 0" severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p32">
<match exp="npViewpoint.dll" name="filename"/>
<versionRange>
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="3.0"/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem blockID="p300">
<match exp="Java\(TM\) Platform SE 6 U(39|40|41)(\s[^\d\._U]|$)" name="name"/>
<match exp="npjp2\.dll" name="filename"/>
<versionRange severity="0" vulnerabilitystatus="1">
<targetApplication id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}">
<versionRange maxVersion="*" minVersion="17.0"/>
</targetApplication>
</versionRange>
</pluginItem>
</pluginItems>
<gfxItems>
<gfxBlacklistEntry blockID="g194">

View File

@ -145,6 +145,7 @@ var TabsInTitlebar = {
let titlebar = $("titlebar");
let titlebarContent = $("titlebar-content");
let titlebarButtons = $("titlebar-buttonbox");
let menubar = $("toolbar-menubar");
if (allowed) {
@ -155,10 +156,13 @@ var TabsInTitlebar = {
// Reset the custom titlebar height if the menubar is shown,
// because we will want to calculate its original height.
if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0") &&
let buttonsShouldMatchTabHeight =
AppConstants.isPlatformAndVersionAtLeast("win", "10.0") ||
AppConstants.platform == "linux";
if (buttonsShouldMatchTabHeight &&
(menubar.getAttribute("inactive") != "true" ||
menubar.getAttribute("autohide") != "true")) {
$("titlebar-buttonbox").style.removeProperty("height");
menubar.getAttribute("autohide") != "true")) {
titlebarButtons.style.removeProperty("height");
}
// Try to avoid reflows in this code by calculating dimensions first and
@ -168,7 +172,7 @@ var TabsInTitlebar = {
let fullTabsHeight = rect($("TabsToolbar")).height;
// Buttons first:
let captionButtonsBoxWidth = rect($("titlebar-buttonbox")).width;
let captionButtonsBoxWidth = rect(titlebarButtons).width;
let secondaryButtonsWidth, menuHeight, fullMenuHeight, menuStyles;
if (AppConstants.platform == "macosx") {
@ -188,12 +192,11 @@ var TabsInTitlebar = {
// Begin setting CSS properties which will cause a reflow
// On Windows 10, adjust the window controls to span the entire
// Adjust the window controls to span the entire
// tab strip height if we're not showing a menu bar.
if (AppConstants.isPlatformAndVersionAtLeast("win", "10.0") &&
!menuHeight) {
if (buttonsShouldMatchTabHeight && !menuHeight) {
titlebarContentHeight = fullTabsHeight;
$("titlebar-buttonbox").style.height = titlebarContentHeight + "px";
titlebarButtons.style.height = titlebarContentHeight + "px";
}
// If the menubar is around (menuHeight is non-zero), try to adjust
@ -260,9 +263,7 @@ var TabsInTitlebar = {
this._sizePlaceholder("fullscreen-button", secondaryButtonsWidth);
}
// Reset the margins and padding that might have been modified:
titlebarContent.style.marginTop = "";
titlebarContent.style.marginBottom = "";
// Reset styles that might have been modified:
titlebar.style.marginBottom = "";
menubar.style.paddingBottom = "";
}

View File

@ -315,12 +315,6 @@ toolbarpaletteitem {
.titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 0;
}
%else
/* On non-OSX, these should be start-aligned */
#titlebar-buttonbox-container {
-moz-box-align: start;
}
%endif
%ifdef XP_WIN

View File

@ -6076,7 +6076,7 @@ function stripUnsafeProtocolOnPaste(pasteData) {
try {
scheme = Services.io.extractScheme(pasteData);
} catch (ex) { }
if (scheme != "javascript") {
if (scheme.toLowerCase() != "javascript") {
break;
}

View File

@ -13,6 +13,8 @@ var pairs = [
["http://\nexample.com", "http://example.com"],
["http://\nexample.com\n", "http://example.com"],
["data:text/html,<body>hi</body>", "data:text/html,<body>hi</body>"],
["javaScript:foopy", "foopy"],
["javaScript:javaScript:alert('hi')", "alert('hi')"],
// Nested things get confusing because some things don't parse as URIs:
["javascript:javascript:alert('hi!')", "alert('hi!')"],
["data:data:text/html,<body>hi</body>", "data:data:text/html,<body>hi</body>"],

View File

@ -7,7 +7,9 @@ add_task(async function test_policy_disable_shield() {
const { RecipeRunner } = ChromeUtils.import("resource://shield-recipe-client/lib/RecipeRunner.jsm", {});
await SpecialPowers.pushPrefEnv({ set: [["extensions.shield-recipe-client.api_url",
"https://localhost/selfsupport-dummy/"]] });
"https://localhost/selfsupport-dummy/"],
["datareporting.healthreport.uploadEnabled",
true]]});
ok(RecipeRunner, "RecipeRunner exists");
RecipeRunner.checkPrefs();

View File

@ -44,8 +44,7 @@
preference="browser.search.suggest.enabled"/>
<vbox class="indent">
<checkbox id="urlBarSuggestion" label="&showURLBarSuggestions2.label;"
accesskey="&showURLBarSuggestions2.accesskey;"
preference="browser.urlbar.suggest.searches"/>
accesskey="&showURLBarSuggestions2.accesskey;"/>
<checkbox id="showSearchSuggestionsFirstCheckbox"
label="&showSearchSuggestionsAboveHistory.label;"/>
<hbox id="urlBarSuggestionPermanentPBLabel"

View File

@ -341,6 +341,7 @@ decorate_task(
decorate_task(
withPrefEnv({
set: [
["datareporting.healthreport.uploadEnabled", true], // telemetry enabled
["extensions.shield-recipe-client.dev_mode", true],
["extensions.shield-recipe-client.first_run", false],
],
@ -358,6 +359,7 @@ decorate_task(
decorate_task(
withPrefEnv({
set: [
["datareporting.healthreport.uploadEnabled", true], // telemetry enabled
["extensions.shield-recipe-client.dev_mode", false],
["extensions.shield-recipe-client.first_run", false],
],
@ -375,6 +377,7 @@ decorate_task(
decorate_task(
withPrefEnv({
set: [
["datareporting.healthreport.uploadEnabled", true], // telemetry enabled
["extensions.shield-recipe-client.dev_mode", false],
["extensions.shield-recipe-client.first_run", true],
["extensions.shield-recipe-client.api_url", "https://example.com"],

View File

@ -675,6 +675,9 @@ notification[value="translation"] menulist > .menulist-dropmarker {
*/
#titlebar-buttonbox {
z-index: 1;
-moz-box-align: center;
padding-top: 2px;
padding-bottom: 2px;
}
/* Render titlebar command buttons according to system config.

View File

@ -171,12 +171,12 @@ def valid_ucrt_sdk_dir_result(value):
return '%s in %s' % (value.version, quote(value.path))
@depends(windows_sdk_dir, 'WINDOWSSDKDIR')
@depends(windows_sdk_dir, 'WINDOWSSDKDIR', c_compiler)
@checking('for Universal CRT SDK', valid_ucrt_sdk_dir_result)
@imports('os')
@imports(_from='__builtin__', _import='sorted')
@imports(_import='mozpack.path', _as='mozpath')
def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env):
def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env, c_compiler):
if windows_sdk_dir_env:
windows_sdk_dir_env = windows_sdk_dir_env[0]
sdks = {}
@ -236,6 +236,15 @@ def valid_ucrt_sdk_dir(windows_sdk_dir, windows_sdk_dir_env):
' Studio installer.'
% (version, minimum_ucrt_version))
broken_ucrt_version = Version('10.0.16299.0')
if c_compiler.type == 'clang-cl' and version >= broken_ucrt_version:
raise FatalCheckError('Found SDK version %s but clang-cl builds'
' currently don\'t work with SDK version %s'
' and later. You should use an older SDK,'
' either by uninstalling the broken one or'
' setting a custom WINDOWSSDKDIR.'
% (version, broken_ucrt_version))
return namespace(
path=sdk.path,
include=sdk.include,

View File

@ -418,6 +418,7 @@ class RespondWithHandler final : public PromiseNativeHandler
#endif
const nsCString mScriptSpec;
const nsString mRequestURL;
const nsCString mRequestFragment;
const nsCString mRespondWithScriptSpec;
const uint32_t mRespondWithLineNumber;
const uint32_t mRespondWithColumnNumber;
@ -431,6 +432,7 @@ public:
RequestRedirect aRedirectMode,
const nsACString& aScriptSpec,
const nsAString& aRequestURL,
const nsACString& aRequestFragment,
const nsACString& aRespondWithScriptSpec,
uint32_t aRespondWithLineNumber,
uint32_t aRespondWithColumnNumber)
@ -443,6 +445,7 @@ public:
#endif
, mScriptSpec(aScriptSpec)
, mRequestURL(aRequestURL)
, mRequestFragment(aRequestFragment)
, mRespondWithScriptSpec(aRespondWithScriptSpec)
, mRespondWithLineNumber(aRespondWithLineNumber)
, mRespondWithColumnNumber(aRespondWithColumnNumber)
@ -716,6 +719,18 @@ RespondWithHandler::ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValu
nsCString responseURL;
if (mRequestMode != RequestMode::Navigate) {
responseURL = ir->GetUnfilteredURL();
// Similar to how we apply the request fragment to redirects automatically
// we also want to apply it automatically when propagating the response
// URL from a service worker interception. Currently response.url strips
// the fragment, so this will never conflict with an existing fragment
// on the response. In the future we will have to check for a response
// fragment and avoid overriding in that case.
if (!mRequestFragment.IsEmpty()) {
MOZ_ASSERT(!responseURL.Contains('#'));
responseURL.Append(NS_LITERAL_CSTRING("#"));
responseURL.Append(mRequestFragment);
}
}
UniquePtr<RespondWithClosure> closure(new RespondWithClosure(mInterceptedChannel,
@ -816,7 +831,7 @@ FetchEvent::RespondWith(JSContext* aCx, Promise& aArg, ErrorResult& aRv)
new RespondWithHandler(mChannel, mRegistration, mRequest->Mode(),
ir->IsClientRequest(), mRequest->Redirect(),
mScriptSpec, NS_ConvertUTF8toUTF16(requestURL),
spec, line, column);
ir->GetFragment(), spec, line, column);
aArg.AppendNativeHandler(handler);
if (!WaitOnPromise(aArg)) {

View File

@ -80,8 +80,10 @@ ModuleValueGetter(JSContext* cx, unsigned argc, Value* vp)
cls::name() const \
{ \
Value value = cls##_##name##Value(this); \
MOZ_ASSERT(value.toInt32() >= 0); \
return value.toInt32(); \
MOZ_ASSERT(value.toNumber() >= 0); \
if (value.isInt32()) \
return value.toInt32(); \
return JS::ToUint32(value.toDouble()); \
}
///////////////////////////////////////////////////////////////////////////
@ -143,8 +145,6 @@ ImportEntryObject::create(JSContext* cx,
uint32_t lineNumber,
uint32_t columnNumber)
{
MOZ_ASSERT(lineNumber > 0);
RootedObject proto(cx, GlobalObject::getOrCreateImportEntryPrototype(cx, cx->global()));
if (!proto)
return nullptr;
@ -157,8 +157,8 @@ ImportEntryObject::create(JSContext* cx,
self->initReservedSlot(ModuleRequestSlot, StringValue(moduleRequest));
self->initReservedSlot(ImportNameSlot, StringValue(importName));
self->initReservedSlot(LocalNameSlot, StringValue(localName));
self->initReservedSlot(LineNumberSlot, Int32Value(lineNumber));
self->initReservedSlot(ColumnNumberSlot, Int32Value(columnNumber));
self->initReservedSlot(LineNumberSlot, NumberValue(lineNumber));
self->initReservedSlot(ColumnNumberSlot, NumberValue(columnNumber));
return self;
}
@ -247,8 +247,8 @@ ExportEntryObject::create(JSContext* cx,
self->initReservedSlot(ModuleRequestSlot, StringOrNullValue(maybeModuleRequest));
self->initReservedSlot(ImportNameSlot, StringOrNullValue(maybeImportName));
self->initReservedSlot(LocalNameSlot, StringOrNullValue(maybeLocalName));
self->initReservedSlot(LineNumberSlot, Int32Value(lineNumber));
self->initReservedSlot(ColumnNumberSlot, Int32Value(columnNumber));
self->initReservedSlot(LineNumberSlot, NumberValue(lineNumber));
self->initReservedSlot(ColumnNumberSlot, NumberValue(columnNumber));
return self;
}
@ -303,8 +303,6 @@ RequestedModuleObject::create(JSContext* cx,
uint32_t lineNumber,
uint32_t columnNumber)
{
MOZ_ASSERT(lineNumber > 0);
RootedObject proto(cx, GlobalObject::getOrCreateRequestedModulePrototype(cx, cx->global()));
if (!proto)
return nullptr;
@ -315,8 +313,8 @@ RequestedModuleObject::create(JSContext* cx,
RootedRequestedModuleObject self(cx, &obj->as<RequestedModuleObject>());
self->initReservedSlot(ModuleSpecifierSlot, StringValue(moduleSpecifier));
self->initReservedSlot(LineNumberSlot, Int32Value(lineNumber));
self->initReservedSlot(ColumnNumberSlot, Int32Value(columnNumber));
self->initReservedSlot(LineNumberSlot, NumberValue(lineNumber));
self->initReservedSlot(ColumnNumberSlot, NumberValue(columnNumber));
return self;
}
@ -1252,7 +1250,6 @@ ModuleBuilder::buildTables()
if (!localExportEntries_.append(exp))
return false;
} else {
MOZ_ASSERT(exp->lineNumber());
RootedAtom exportName(cx_, exp->exportName());
RootedAtom moduleRequest(cx_, importEntry->moduleRequest());
RootedAtom importName(cx_, importEntry->importName());
@ -1272,7 +1269,6 @@ ModuleBuilder::buildTables()
if (!starExportEntries_.append(exp))
return false;
} else {
MOZ_ASSERT(exp->lineNumber());
if (!indirectExportEntries_.append(exp))
return false;
}

View File

@ -491,11 +491,9 @@ NativeRegExpMacroAssembler::GenerateCode(JSContext* cx, bool match_only)
Linker linker(masm);
AutoFlushICache afc("RegExp");
JitCode* code = linker.newCode<NoGC>(cx, CodeKind::RegExp);
if (!code) {
ReportOutOfMemory(cx);
JitCode* code = linker.newCode(cx, CodeKind::RegExp);
if (!code)
return RegExpCode();
}
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(code, "RegExp");

View File

@ -0,0 +1,10 @@
function parseAsModule(source) {
return Reflect.parse(source, {
target: "module",
line: 0x7FFFFFFF + 1,
});
}
parseAsModule(`
import {a} from "";
export {a};
`);

View File

@ -0,0 +1,10 @@
// Test that zero-based line numbers supplied by Reflect.parse don't cause
// assertions.
function parseAsModule(source) {
return Reflect.parse(source, {
target: "module",
line: 0
});
}
parseAsModule("import d from 'a'");

View File

@ -302,17 +302,28 @@ testComparison64('gt_u', 40, 40, 0);
testComparison64('ge_s', 40, 40, 1);
testComparison64('ge_u', 40, 40, 1);
testComparison64('eq', "0x400012345678", "0x400012345678", 1);
testComparison64('eq', "0x400012345678", "0x500012345678", 0);
testComparison64('ne', "0x400012345678", "0x400012345678", 0);
testComparison64('ne', "0x400012345678", "0x500012345678", 1);
testComparison64('eq', "0xffffffffffffffff", -1, 1);
testComparison64('lt_s', "0x8000000012345678", "0x1", 1);
testComparison64('lt_s', "0x1", "0x8000000012345678", 0);
testComparison64('lt_u', "0x8000000012345678", "0x1", 0);
testComparison64('lt_u', "0x1", "0x8000000012345678", 1);
testComparison64('le_s', -1, 0, 1);
testComparison64('le_s', -1, -1, 1);
testComparison64('le_s', 0, -1, 0);
testComparison64('le_u', -1, 0, 0);
testComparison64('le_u', -1, -1, 1);
testComparison64('le_u', 0, -1, 1);
testComparison64('gt_s', 1, "0x8000000000000000", 1);
testComparison64('gt_s', "0x8000000000000000", 1, 0);
testComparison64('gt_u', 1, "0x8000000000000000", 0);
testComparison64('gt_u', "0x8000000000000000", 1, 1);
testComparison64('ge_s', 1, "0x8000000000000000", 1);
testComparison64('ge_s', "0x8000000000000000", 1, 0);
testComparison64('ge_u', 1, "0x8000000000000000", 0);
testComparison64('ge_u', "0x8000000000000000", 1, 1);
testUnary('i64', 'clz', 40, 58);
testUnary('i64', 'clz', "0x8000000000000000", 0);

View File

@ -198,7 +198,7 @@ BaselineCacheIRCompiler::compile()
Linker linker(masm);
AutoFlushICache afc("getStubCode");
Rooted<JitCode*> newStubCode(cx_, linker.newCode<NoGC>(cx_, CodeKind::Baseline));
Rooted<JitCode*> newStubCode(cx_, linker.newCode(cx_, CodeKind::Baseline));
if (!newStubCode) {
cx_->recoverFromOutOfMemory();
return nullptr;

View File

@ -134,7 +134,7 @@ BaselineCompiler::compile()
}
AutoFlushICache afc("Baseline");
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Baseline);
JitCode* code = linker.newCode(cx, CodeKind::Baseline);
if (!code)
return Method_Error;

View File

@ -1168,7 +1168,7 @@ JitRuntime::generateBaselineDebugModeOSRHandler(JSContext* cx, uint32_t* noFrame
Linker linker(masm);
AutoFlushICache afc("BaselineDebugModeOSRHandler");
JitCode* code = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return nullptr;

View File

@ -1463,12 +1463,11 @@ GetTypedThingLayout(const Class* clasp)
bool
GetPropIRGenerator::tryAttachTypedObject(HandleObject obj, ObjOperandId objId, HandleId id)
{
if (!obj->is<TypedObject>() ||
!cx_->runtime()->jitSupportsFloatingPoint ||
cx_->compartment()->detachedTypedObjects)
{
if (!obj->is<TypedObject>())
return false;
if (!cx_->runtime()->jitSupportsFloatingPoint || cx_->compartment()->detachedTypedObjects)
return false;
}
TypedObject* typedObj = &obj->as<TypedObject>();
if (!typedObj->typeDescr().is<StructTypeDescr>())
@ -1483,15 +1482,14 @@ GetPropIRGenerator::tryAttachTypedObject(HandleObject obj, ObjOperandId objId, H
if (!fieldDescr->is<SimpleTypeDescr>())
return false;
Shape* shape = typedObj->maybeShape();
TypedThingLayout layout = GetTypedThingLayout(shape->getObjectClass());
TypedThingLayout layout = GetTypedThingLayout(obj->getClass());
uint32_t fieldOffset = structDescr->fieldOffset(fieldIndex);
uint32_t typeDescr = SimpleTypeDescrKey(&fieldDescr->as<SimpleTypeDescr>());
maybeEmitIdGuard(id);
writer.guardNoDetachedTypedObjects();
writer.guardShape(objId, shape);
writer.guardGroupForLayout(objId, obj->group());
writer.loadTypedObjectResult(objId, fieldOffset, layout, typeDescr);
// Only monitor the result if the type produced by this stub might vary.
@ -1938,10 +1936,13 @@ GetPropIRGenerator::tryAttachTypedElement(HandleObject obj, ObjOperandId objId,
return false;
TypedThingLayout layout = GetTypedThingLayout(obj->getClass());
if (layout != Layout_TypedArray)
writer.guardNoDetachedTypedObjects();
writer.guardShape(objId, obj->as<ShapedObject>().shape());
if (IsPrimitiveArrayTypedObject(obj)) {
writer.guardNoDetachedTypedObjects();
writer.guardGroupForLayout(objId, obj->group());
} else {
writer.guardShape(objId, obj->as<TypedArrayObject>().shape());
}
writer.loadTypedElementResult(objId, indexId, layout, TypedThingElementType(obj));
@ -2644,13 +2645,12 @@ HasPropIRGenerator::tryAttachTypedArray(HandleObject obj, ObjOperandId objId,
if (!obj->is<TypedArrayObject>() && !IsPrimitiveArrayTypedObject(obj))
return false;
// Don't attach typed object stubs if the underlying storage could be
// detached, as the stub will always bail out.
if (IsPrimitiveArrayTypedObject(obj) && cx_->compartment()->detachedTypedObjects)
return false;
TypedThingLayout layout = GetTypedThingLayout(obj->getClass());
writer.guardShape(objId, obj->as<ShapedObject>().shape());
if (IsPrimitiveArrayTypedObject(obj))
writer.guardGroupForLayout(objId, obj->group());
else
writer.guardShape(objId, obj->as<TypedArrayObject>().shape());
writer.loadTypedElementExistsResult(objId, indexId, layout);
@ -3083,7 +3083,10 @@ bool
SetPropIRGenerator::tryAttachUnboxedProperty(HandleObject obj, ObjOperandId objId, HandleId id,
ValOperandId rhsId)
{
if (!obj->is<UnboxedPlainObject>() || !cx_->runtime()->jitSupportsFloatingPoint)
if (!obj->is<UnboxedPlainObject>())
return false;
if (!cx_->runtime()->jitSupportsFloatingPoint)
return false;
const UnboxedLayout::Property* property = obj->as<UnboxedPlainObject>().layout().lookup(id);
@ -3109,10 +3112,10 @@ bool
SetPropIRGenerator::tryAttachTypedObjectProperty(HandleObject obj, ObjOperandId objId, HandleId id,
ValOperandId rhsId)
{
if (!obj->is<TypedObject>() || !cx_->runtime()->jitSupportsFloatingPoint)
if (!obj->is<TypedObject>())
return false;
if (cx_->compartment()->detachedTypedObjects)
if (!cx_->runtime()->jitSupportsFloatingPoint || cx_->compartment()->detachedTypedObjects)
return false;
if (!obj->as<TypedObject>().typeDescr().is<StructTypeDescr>())
@ -3132,7 +3135,6 @@ SetPropIRGenerator::tryAttachTypedObjectProperty(HandleObject obj, ObjOperandId
maybeEmitIdGuard(id);
writer.guardNoDetachedTypedObjects();
writer.guardShape(objId, obj->as<TypedObject>().shape());
writer.guardGroupForLayout(objId, obj->group());
typeCheckInfo_.set(obj->group(), id);
@ -3523,10 +3525,13 @@ SetPropIRGenerator::tryAttachSetTypedElement(HandleObject obj, ObjOperandId objI
Scalar::Type elementType = TypedThingElementType(obj);
TypedThingLayout layout = GetTypedThingLayout(obj->getClass());
if (!obj->is<TypedArrayObject>())
if (IsPrimitiveArrayTypedObject(obj)) {
writer.guardNoDetachedTypedObjects();
writer.guardGroupForLayout(objId, obj->group());
} else {
writer.guardShape(objId, obj->as<TypedArrayObject>().shape());
}
writer.guardShape(objId, obj->as<ShapedObject>().shape());
writer.storeTypedElement(objId, indexId, rhsId, layout, elementType, handleOutOfBounds);
writer.returnFromIC();

View File

@ -2076,7 +2076,7 @@ JitCompartment::generateRegExpMatcherStub(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("RegExpMatcherStub");
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return nullptr;
@ -2233,7 +2233,7 @@ JitCompartment::generateRegExpSearcherStub(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("RegExpSearcherStub");
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return nullptr;
@ -2381,7 +2381,7 @@ JitCompartment::generateRegExpTesterStub(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("RegExpTesterStub");
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return nullptr;
@ -8259,7 +8259,7 @@ JitCompartment::generateStringConcatStub(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("StringConcatStub");
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(code, "StringConcatStub");
@ -10075,9 +10075,9 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
// Also, note that creating the code here during an incremental GC will
// trace the code and mark all GC things it refers to. This captures any
// read barriers which were skipped while compiling the script off thread.
Linker linker(masm);
Linker linker(masm, nogc);
AutoFlushICache afc("IonLink");
JitCode* code = linker.newCode<NoGC>(cx, CodeKind::Ion, !patchableBackedges_.empty());
JitCode* code = linker.newCode(cx, CodeKind::Ion, !patchableBackedges_.empty());
if (!code)
return false;

View File

@ -339,7 +339,7 @@ JitRuntime::initialize(JSContext* cx, AutoLockForExclusiveAccess& lock)
Linker linker(masm);
AutoFlushICache afc("Trampolines");
trampolineCode_ = linker.newCode<NoGC>(cx, CodeKind::Other);
trampolineCode_ = linker.newCode(cx, CodeKind::Other);
if (!trampolineCode_)
return false;

View File

@ -601,7 +601,7 @@ IonCacheIRCompiler::compile()
Linker linker(masm);
AutoFlushICache afc("getStubCode");
Rooted<JitCode*> newStubCode(cx_, linker.newCode<NoGC>(cx_, CodeKind::Ion));
Rooted<JitCode*> newStubCode(cx_, linker.newCode(cx_, CodeKind::Ion));
if (!newStubCode) {
cx_->recoverFromOutOfMemory();
return nullptr;

View File

@ -13,13 +13,12 @@
namespace js {
namespace jit {
template <AllowGC allowGC>
JitCode*
Linker::newCode(JSContext* cx, CodeKind kind, bool hasPatchableBackedges /* = false */)
{
MOZ_ASSERT_IF(hasPatchableBackedges, kind == CodeKind::Ion);
gc::AutoSuppressGC suppressGC(cx);
JS::AutoAssertNoGC nogc(cx);
if (masm.oom())
return fail(cx);
@ -53,10 +52,10 @@ Linker::newCode(JSContext* cx, CodeKind kind, bool hasPatchableBackedges /* = fa
codeStart = (uint8_t*)AlignBytes((uintptr_t)codeStart, CodeAlignment);
MOZ_ASSERT(codeStart + masm.bytesNeeded() <= result + bytesNeeded);
uint32_t headerSize = codeStart - result;
JitCode* code = JitCode::New<allowGC>(cx, codeStart, bytesNeeded - headerSize,
headerSize, pool, kind);
JitCode* code = JitCode::New<NoGC>(cx, codeStart, bytesNeeded - headerSize,
headerSize, pool, kind);
if (!code)
return nullptr;
return fail(cx);
if (masm.oom())
return fail(cx);
awjc.emplace(result, bytesNeeded);
@ -67,8 +66,5 @@ Linker::newCode(JSContext* cx, CodeKind kind, bool hasPatchableBackedges /* = fa
return code;
}
template JitCode* Linker::newCode<CanGC>(JSContext* cx, CodeKind kind, bool hasPatchableBackedges);
template JitCode* Linker::newCode<NoGC>(JSContext* cx, CodeKind kind, bool hasPatchableBackedges);
} // namespace jit
} // namespace js

View File

@ -28,13 +28,26 @@ class Linker
}
public:
// Construct a linker with a rooted macro assembler.
explicit Linker(MacroAssembler& masm)
: masm(masm)
{
MOZ_ASSERT(masm.isRooted());
masm.finish();
}
// If the macro assembler isn't rooted then care must be taken as it often
// contains GC pointers.
Linker(MacroAssembler& masm, JS::AutoRequireNoGC& nogc)
: masm(masm)
{
masm.finish();
}
template <AllowGC allowGC>
// Create a new JitCode object and populate it with the contents of the
// macro assember buffer.
//
// This method cannot GC. Errors are reported to the context.
JitCode* newCode(JSContext* cx, CodeKind kind, bool hasPatchableBackedges = false);
};

View File

@ -388,6 +388,12 @@ class MacroAssembler : public MacroAssemblerSpecific
#endif
}
#ifdef DEBUG
bool isRooted() const {
return autoRooter_.isSome();
}
#endif
void constructRoot(JSContext* cx) {
autoRooter_.emplace(cx, this);
}

View File

@ -517,7 +517,7 @@ ICStubCompiler::getStubCode()
return nullptr;
Linker linker(masm);
AutoFlushICache afc("getStubCode");
Rooted<JitCode*> newStubCode(cx, linker.newCode<CanGC>(cx, CodeKind::Baseline));
Rooted<JitCode*> newStubCode(cx, linker.newCode(cx, CodeKind::Baseline));
if (!newStubCode)
return nullptr;
@ -2779,7 +2779,7 @@ GenerateNewObjectWithTemplateCode(JSContext* cx, JSObject* templateObject)
Linker linker(masm);
AutoFlushICache afc("GenerateNewObjectWithTemplateCode");
return linker.newCode<CanGC>(cx, CodeKind::Baseline);
return linker.newCode(cx, CodeKind::Baseline);
}
static bool

View File

@ -993,7 +993,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("DebugTrapHandler");
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -809,7 +809,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("DebugTrapHandler");
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -601,6 +601,20 @@ AssemblerMIPSShared::as_mul(Register rd, Register rs, Register rt)
return writeInst(InstReg(op_special2, rs, rt, rd, ff_mul).encode());
}
BufferOffset
AssemblerMIPSShared::as_madd(Register rs, Register rt)
{
spew("madd %3s,%3s", rs.name(), rt.name());
return writeInst(InstReg(op_special2, rs, rt, ff_madd).encode());
}
BufferOffset
AssemblerMIPSShared::as_maddu(Register rs, Register rt)
{
spew("maddu %3s,%3s", rs.name(), rt.name());
return writeInst(InstReg(op_special2, rs, rt, ff_maddu).encode());
}
// Shift instructions
BufferOffset
AssemblerMIPSShared::as_sll(Register rd, Register rt, uint16_t sa)
@ -1043,7 +1057,7 @@ AssemblerMIPSShared::as_slti(Register rd, Register rs, int32_t j)
BufferOffset
AssemblerMIPSShared::as_sltiu(Register rd, Register rs, uint32_t j)
{
MOZ_ASSERT(Imm16::IsInUnsignedRange(j));
MOZ_ASSERT(Imm16::IsInSignedRange(int32_t(j)));
spew("sltiu %3s,%3s, 0x%x", rd.name(), rs.name(), j);
return writeInst(InstImm(op_sltiu, rs, rd, Imm16(j)).encode());
}

View File

@ -397,6 +397,8 @@ enum FunctionField {
ff_dsra32 = 63,
// special2 encoding of function field.
ff_madd = 0,
ff_maddu = 1,
ff_mul = 2,
ff_clz = 32,
ff_clo = 33,
@ -1019,6 +1021,8 @@ class AssemblerMIPSShared : public AssemblerShared
BufferOffset as_div(Register rs, Register rt);
BufferOffset as_divu(Register rs, Register rt);
BufferOffset as_mul(Register rd, Register rs, Register rt);
BufferOffset as_madd(Register rs, Register rt);
BufferOffset as_maddu(Register rs, Register rt);
BufferOffset as_ddiv(Register rs, Register rt);
BufferOffset as_ddivu(Register rs, Register rt);

View File

@ -519,8 +519,7 @@ CodeGeneratorMIPSShared::visitMulI64(LMulI64* lir)
{
const LInt64Allocation lhs = lir->getInt64Operand(LMulI64::Lhs);
const LInt64Allocation rhs = lir->getInt64Operand(LMulI64::Rhs);
MOZ_ASSERT(ToRegister64(lhs) == ToOutRegister64(lir));
const Register64 output = ToOutRegister64(lir);
if (IsConstant(rhs)) {
int64_t constant = ToInt64(rhs);
@ -536,6 +535,17 @@ CodeGeneratorMIPSShared::visitMulI64(LMulI64* lir)
return;
default:
if (constant > 0) {
if (mozilla::IsPowerOfTwo(static_cast<uint32_t>(constant + 1))) {
masm.move64(ToRegister64(lhs), output);
masm.lshift64(Imm32(FloorLog2(constant + 1)), output);
masm.sub64(ToRegister64(lhs), output);
return;
} else if (mozilla::IsPowerOfTwo(static_cast<uint32_t>(constant - 1))) {
masm.move64(ToRegister64(lhs), output);
masm.lshift64(Imm32(FloorLog2(constant - 1u)), output);
masm.add64(ToRegister64(lhs), output);
return;
}
// Use shift if constant is power of 2.
int32_t shift = mozilla::FloorLog2(constant);
if (int64_t(1) << shift == constant) {
@ -593,7 +603,7 @@ CodeGeneratorMIPSShared::visitDivI(LDivI* ins)
masm.move32(Imm32(-1), temp);
if (mir->trapOnError()) {
Label ok;
masm.ma_b(rhs, temp, &ok, Assembler::NoEqual);
masm.ma_b(rhs, temp, &ok, Assembler::NotEqual);
masm.wasmTrap(wasm::Trap::IntegerOverflow, mir->bytecodeOffset());
masm.bind(&ok);
} else if (mir->canTruncateOverflow()) {
@ -2225,7 +2235,7 @@ CodeGeneratorMIPSShared::visitUDivOrMod(LUDivOrMod* ins)
Label nonZero;
masm.ma_b(rhs, rhs, &nonZero, Assembler::NonZero);
masm.wasmTrap(wasm::Trap::IntegerDivideByZero, ins->bytecodeOffset());
masm.bind(&nonZero)
masm.bind(&nonZero);
} else {
// Infinity|0 == 0
Label notzero;

View File

@ -75,6 +75,7 @@ LIRGeneratorMIPSShared::lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* l
{
bool needsTemp = false;
bool cannotAliasRhs = false;
bool reuseInput = true;
#ifdef JS_CODEGEN_MIPS32
needsTemp = true;
@ -87,6 +88,9 @@ LIRGeneratorMIPSShared::lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* l
needsTemp = false;
if (int64_t(1) << shift == constant)
needsTemp = false;
if (mozilla::IsPowerOfTwo(static_cast<uint32_t>(constant + 1)) ||
mozilla::IsPowerOfTwo(static_cast<uint32_t>(constant - 1)))
reuseInput = false;
}
#endif
ins->setInt64Operand(0, useInt64RegisterAtStart(lhs));
@ -95,8 +99,10 @@ LIRGeneratorMIPSShared::lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* l
if (needsTemp)
ins->setTemp(0, temp());
defineInt64ReuseInput(ins, mir, 0);
if(reuseInput)
defineInt64ReuseInput(ins, mir, 0);
else
defineInt64(ins, mir);
}
template<size_t Temps>

View File

@ -290,12 +290,12 @@ MacroAssemblerMIPSShared::ma_xor(Register rd, Register rs, Imm32 imm)
void
MacroAssemblerMIPSShared::ma_ctz(Register rd, Register rs)
{
ma_negu(ScratchRegister, rs);
as_and(rd, ScratchRegister, rs);
as_addiu(ScratchRegister, rs, -1);
as_xor(rd, ScratchRegister, rs);
as_and(rd, rd, ScratchRegister);
as_clz(rd, rd);
ma_negu(SecondScratchReg, rd);
ma_addu(SecondScratchReg, Imm32(0x1f));
as_movn(rd, SecondScratchReg, ScratchRegister);
ma_li(ScratchRegister, Imm32(0x20));
as_subu(rd, ScratchRegister, rd);
}
// Arithmetic-based ops.

View File

@ -309,19 +309,14 @@ CodeGeneratorMIPS::visitCompareI64(LCompareI64* lir)
bool isSigned = mir->compareType() == MCompare::Compare_Int64;
Assembler::Condition condition = JSOpToCondition(lir->jsop(), isSigned);
Label done;
masm.move32(Imm32(1), output);
if (IsConstant(rhs)) {
Imm64 imm = Imm64(ToInt64(rhs));
masm.branch64(condition, lhsRegs, imm, &done);
masm.cmp64Set(condition, lhsRegs, imm, output);
} else {
Register64 rhsRegs = ToRegister64(rhs);
masm.branch64(condition, lhsRegs, rhsRegs, &done);
masm.cmp64Set(condition, lhsRegs, rhsRegs, output);
}
masm.move32(Imm32(0), output);
masm.bind(&done);
}
void
@ -367,22 +362,12 @@ CodeGeneratorMIPS::visitDivOrModI64(LDivOrModI64* lir)
MOZ_ASSERT(output == ReturnReg64);
// All inputs are useAtStart for a call instruction. As a result we cannot
// ask for a non-aliasing temp. Using the following to get such a temp.
AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
regs.take(lhs.low);
regs.take(lhs.high);
if (lhs != rhs) {
regs.take(rhs.low);
regs.take(rhs.high);
}
Register temp = regs.takeAny();
Label done;
// Handle divide by zero.
if (lir->canBeDivideByZero()) {
Label nonZero;
masm.branchTest64(Assembler::NonZero, rhs, rhs, temp, &nonZero);
masm.branchTest64(Assembler::NonZero, rhs, rhs, InvalidReg, &nonZero);
masm.wasmTrap(wasm::Trap::IntegerDivideByZero, lir->bytecodeOffset());
masm.bind(&nonZero);
}
@ -424,21 +409,10 @@ CodeGeneratorMIPS::visitUDivOrModI64(LUDivOrModI64* lir)
MOZ_ASSERT(ToOutRegister64(lir) == ReturnReg64);
// All inputs are useAtStart for a call instruction. As a result we cannot
// ask for a non-aliasing temp. Using the following to get such a temp.
AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
regs.take(lhs.low);
regs.take(lhs.high);
if (lhs != rhs) {
regs.take(rhs.low);
regs.take(rhs.high);
}
Register temp = regs.takeAny();
// Prevent divide by zero.
if (lir->canBeDivideByZero()) {
Label nonZero;
masm.branchTest64(Assembler::NonZero, rhs, rhs, temp, &nonZero);
masm.branchTest64(Assembler::NonZero, rhs, rhs, InvalidReg, &nonZero);
masm.wasmTrap(wasm::Trap::IntegerDivideByZero, lir->bytecodeOffset());
masm.bind(&nonZero);
}

View File

@ -192,10 +192,13 @@ MacroAssembler::addPtr(ImmWord imm, Register dest)
void
MacroAssembler::add64(Register64 src, Register64 dest)
{
MOZ_ASSERT(dest.low != src.low);
as_addu(dest.low, dest.low, src.low);
as_sltu(ScratchRegister, dest.low, src.low);
if (dest.low == src.low) {
as_sltu(ScratchRegister, src.low, zero);
as_addu(dest.low, dest.low, src.low);
} else {
as_addu(dest.low, dest.low, src.low);
as_sltu(ScratchRegister, dest.low, src.low);
}
as_addu(dest.high, dest.high, src.high);
as_addu(dest.high, dest.high, ScratchRegister);
}
@ -203,9 +206,14 @@ MacroAssembler::add64(Register64 src, Register64 dest)
void
MacroAssembler::add64(Imm32 imm, Register64 dest)
{
ma_li(ScratchRegister, imm);
as_addu(dest.low, dest.low, ScratchRegister);
as_sltu(ScratchRegister, dest.low, ScratchRegister);
if (Imm16::IsInSignedRange(imm.value)) {
as_addiu(dest.low, dest.low, imm.value);
as_sltiu(ScratchRegister, dest.low, imm.value);
} else {
ma_li(ScratchRegister, imm);
as_addu(dest.low, dest.low, ScratchRegister);
as_sltu(ScratchRegister, dest.low, ScratchRegister);
}
as_addu(dest.high, dest.high, ScratchRegister);
}
@ -263,10 +271,16 @@ MacroAssembler::sub64(Register64 src, Register64 dest)
void
MacroAssembler::sub64(Imm64 imm, Register64 dest)
{
ma_li(ScratchRegister, imm.low());
as_sltu(ScratchRegister, dest.low, ScratchRegister);
as_subu(dest.high, dest.high, ScratchRegister);
ma_subu(dest.low, dest.low, imm.low());
if (Imm16::IsInSignedRange(imm.low().value) && Imm16::IsInSignedRange(-imm.value)) {
as_sltiu(ScratchRegister, dest.low, imm.low().value);
as_subu(dest.high, dest.high, ScratchRegister);
as_addiu(dest.low, dest.low, -imm.value);
} else {
ma_li(SecondScratchReg, imm.low());
as_sltu(ScratchRegister, dest.low, SecondScratchReg);
as_subu(dest.high, dest.high, ScratchRegister);
as_subu(dest.low, dest.low, SecondScratchReg);
}
ma_subu(dest.high, dest.high, imm.hi());
}
@ -278,40 +292,31 @@ MacroAssembler::mul64(Imm64 imm, const Register64& dest)
// + LOW(LOW(dest) * HIGH(imm)) [multiply dest into upper bits]
// + HIGH(LOW(dest) * LOW(imm)) [carry]
// HIGH(dest) = LOW(HIGH(dest) * LOW(imm));
ma_li(ScratchRegister, Imm32(imm.value & LOW_32_MASK));
as_multu(dest.high, ScratchRegister);
as_mflo(dest.high);
// mfhi:mflo = LOW(dest) * LOW(imm);
as_multu(dest.low, ScratchRegister);
// HIGH(dest) += mfhi;
as_mfhi(ScratchRegister);
as_addu(dest.high, dest.high, ScratchRegister);
if (((imm.value >> 32) & LOW_32_MASK) == 5) {
if (imm.low().value == 5) {
// Optimized case for Math.random().
// HIGH(dest) += LOW(LOW(dest) * HIGH(imm));
as_sll(ScratchRegister, dest.low, 2);
as_addu(ScratchRegister, ScratchRegister, dest.low);
as_addu(dest.high, dest.high, ScratchRegister);
// LOW(dest) = mflo;
as_mflo(dest.low);
as_srl(SecondScratchReg, dest.low, 32-2);
as_addu(dest.low, ScratchRegister, dest.low);
as_sltu(ScratchRegister, dest.low, ScratchRegister);
as_addu(ScratchRegister, ScratchRegister, SecondScratchReg);
as_sll(SecondScratchReg, dest.high, 2);
as_addu(SecondScratchReg, SecondScratchReg, dest.high);
as_addu(dest.high, ScratchRegister, SecondScratchReg);
} else {
// tmp = mflo
as_mflo(SecondScratchReg);
// HIGH(dest) += LOW(LOW(dest) * HIGH(imm));
ma_li(ScratchRegister, Imm32((imm.value >> 32) & LOW_32_MASK));
// HIGH32 = LOW(HIGH(dest) * LOW(imm)) [multiply imm into upper bits]
// + LOW(LOW(dest) * HIGH(imm)) [multiply dest into upper bits]
ma_li(ScratchRegister, imm.low());
as_mult(dest.high, ScratchRegister);
ma_li(ScratchRegister, imm.hi());
as_madd(dest.low, ScratchRegister);
as_mflo(dest.high);
// + HIGH(LOW(dest) * LOW(imm)) [carry]
// LOW32 = LOW(LOW(dest) * LOW(imm));
ma_li(ScratchRegister, imm.low());
as_multu(dest.low, ScratchRegister);
as_mflo(ScratchRegister);
as_mfhi(ScratchRegister);
as_mflo(dest.low);
as_addu(dest.high, dest.high, ScratchRegister);
// LOW(dest) = tmp;
ma_move(dest.low, SecondScratchReg);
}
}
@ -323,23 +328,21 @@ MacroAssembler::mul64(Imm64 imm, const Register64& dest, const Register temp)
// + LOW(LOW(dest) * HIGH(imm)) [multiply dest into upper bits]
// + HIGH(LOW(dest) * LOW(imm)) [carry]
// HIGH(dest) = LOW(HIGH(dest) * LOW(imm));
MOZ_ASSERT(temp != dest.high && temp != dest.low);
ma_li(ScratchRegister, imm.firstHalf());
as_multu(dest.high, ScratchRegister);
// HIGH32 = LOW(HIGH(dest) * LOW(imm)) [multiply imm into upper bits]
// + LOW(LOW(dest) * HIGH(imm)) [multiply dest into upper bits]
ma_li(ScratchRegister, imm.low());
as_mult(dest.high, ScratchRegister);
ma_li(temp, imm.hi());
as_madd(dest.low, temp);
as_mflo(dest.high);
ma_li(ScratchRegister, imm.secondHalf());
// + HIGH(LOW(dest) * LOW(imm)) [carry]
// LOW32 = LOW(LOW(dest) * LOW(imm));
as_multu(dest.low, ScratchRegister);
as_mflo(temp);
as_addu(temp, dest.high, temp);
ma_li(ScratchRegister, imm.firstHalf());
as_multu(dest.low, ScratchRegister);
as_mfhi(dest.high);
as_mfhi(ScratchRegister);
as_mflo(dest.low);
as_addu(dest.high, dest.high, temp);
as_addu(dest.high, dest.high, ScratchRegister);
}
void
@ -350,29 +353,29 @@ MacroAssembler::mul64(const Register64& src, const Register64& dest, const Regis
// + LOW(LOW(dest) * HIGH(imm)) [multiply dest into upper bits]
// + HIGH(LOW(dest) * LOW(imm)) [carry]
// HIGH(dest) = LOW(HIGH(dest) * LOW(imm));
MOZ_ASSERT(dest != src);
MOZ_ASSERT(dest.low != src.high && dest.high != src.low);
as_multu(dest.high, src.low); // (2)
// HIGH32 = LOW(HIGH(dest) * LOW(src)) [multiply src into upper bits]
// + LOW(LOW(dest) * HIGH(src)) [multiply dest into upper bits]
as_mult(dest.high, src.low);
as_madd(dest.low, src.high);
as_mflo(dest.high);
as_multu(dest.low, src.high); // (3)
as_mflo(temp);
as_addu(temp, dest.high, temp);
as_multu(dest.low, src.low); // (4) + (1)
as_mfhi(dest.high);
// + HIGH(LOW(dest) * LOW(src)) [carry]
// LOW32 = LOW(LOW(dest) * LOW(src));
as_multu(dest.low, src.low);
as_mfhi(ScratchRegister);
as_mflo(dest.low);
as_addu(dest.high, dest.high, temp);
as_addu(dest.high, dest.high, ScratchRegister);
}
void
MacroAssembler::neg64(Register64 reg)
{
ma_li(ScratchRegister, Imm32(1));
as_movz(ScratchRegister, zero, reg.low);
ma_negu(reg.low, reg.low);
as_addu(reg.high, reg.high, ScratchRegister);
ma_negu(reg.high, reg.high);
as_subu(ScratchRegister, zero, reg.low);
as_sltu(ScratchRegister, reg.low, ScratchRegister);
as_subu(reg.high, zero, reg.high);
as_subu(reg.high, reg.high, ScratchRegister);
}
void
@ -433,27 +436,24 @@ MacroAssembler::lshift64(Imm32 imm, Register64 dest)
void
MacroAssembler::lshift64(Register unmaskedShift, Register64 dest)
{
Label done, less;
Label done;
ScratchRegisterScope shift(*this);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_b(shift, Imm32(0), &done, Equal);
ma_sll(dest.high, dest.high, shift);
ma_subu(shift, shift, Imm32(32));
ma_b(shift, Imm32(0), &less, LessThan);
ma_sll(dest.high, dest.low, shift);
move32(Imm32(0), dest.low);
ma_b(&done);
bind(&less);
ma_li(SecondScratchReg, Imm32(0));
as_subu(shift, SecondScratchReg, shift);
ma_srl(SecondScratchReg, dest.low, shift);
as_or(dest.high, dest.high, SecondScratchReg);
ma_and(shift, unmaskedShift, Imm32(0x3f));
mov(dest.low, SecondScratchReg);
ma_sll(dest.low, dest.low, shift);
as_nor(shift, zero, shift);
as_srl(SecondScratchReg, SecondScratchReg, 1);
ma_srl(SecondScratchReg, SecondScratchReg, shift);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_sll(dest.high, dest.high, shift);
as_or(dest.high, dest.high, SecondScratchReg);
ma_and(SecondScratchReg, shift, Imm32(0x20));
as_movn(dest.high, dest.low, SecondScratchReg);
as_movn(dest.low, zero, SecondScratchReg);
bind(&done);
}
@ -478,7 +478,9 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
MOZ_ASSERT(0 <= imm.value && imm.value < 64);
ScratchRegisterScope scratch(*this);
if (imm.value < 32) {
if (imm.value == 0) {
return;
} else if (imm.value < 32) {
as_srl(dest.low, dest.low, imm.value);
as_sll(scratch, dest.high, (32 - imm.value)%32);
as_or(dest.low, dest.low, scratch);
@ -495,27 +497,23 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
void
MacroAssembler::rshift64(Register unmaskedShift, Register64 dest)
{
Label done, less;
Label done;
ScratchRegisterScope shift(*this);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_b(shift, Imm32(0), &done, Equal);
ma_srl(dest.low, dest.low, shift);
ma_subu(shift, shift, Imm32(32));
ma_b(shift, Imm32(0), &less, LessThan);
ma_srl(dest.low, dest.high, shift);
move32(Imm32(0), dest.high);
ma_b(&done);
bind(&less);
ma_li(SecondScratchReg, Imm32(0));
as_subu(shift, SecondScratchReg, shift);
ma_sll(SecondScratchReg, dest.high, shift);
as_or(dest.low, dest.low, SecondScratchReg);
ma_and(shift, unmaskedShift, Imm32(0x3f));
mov(dest.high, SecondScratchReg);
ma_srl(dest.high, dest.high, shift);
as_nor(shift, zero, shift);
as_sll(SecondScratchReg, SecondScratchReg, 1);
ma_sll(SecondScratchReg, SecondScratchReg, shift);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_srl(dest.low, dest.low, shift);
as_or(dest.low, dest.low, SecondScratchReg);
ma_and(SecondScratchReg, shift, Imm32(0x20));
as_movn(dest.low, dest.high, SecondScratchReg);
as_movn(dest.high, zero, SecondScratchReg);
bind(&done);
}
@ -526,7 +524,9 @@ MacroAssembler::rshift64Arithmetic(Imm32 imm, Register64 dest)
MOZ_ASSERT(0 <= imm.value && imm.value < 64);
ScratchRegisterScope scratch(*this);
if (imm.value < 32) {
if (imm.value == 0) {
return;
} else if (imm.value < 32) {
as_srl(dest.low, dest.low, imm.value);
as_sll(scratch, dest.high, (32 - imm.value)%32);
as_or(dest.low, dest.low, scratch);
@ -543,27 +543,24 @@ MacroAssembler::rshift64Arithmetic(Imm32 imm, Register64 dest)
void
MacroAssembler::rshift64Arithmetic(Register unmaskedShift, Register64 dest)
{
Label done, less;
Label done;
ScratchRegisterScope shift(*this);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_b(shift, Imm32(0), &done, Equal);
ma_srl(dest.low, dest.low, shift);
ma_subu(shift, shift, Imm32(32));
ma_b(shift, Imm32(0), &less, LessThan);
ma_sra(dest.low, dest.high, shift);
as_sra(dest.high, dest.high, 31);
ma_b(&done);
bind(&less);
ma_li(SecondScratchReg, Imm32(0));
as_subu(shift, SecondScratchReg, shift);
ma_sll(SecondScratchReg, dest.high, shift);
as_or(dest.low, dest.low, SecondScratchReg);
ma_and(shift, unmaskedShift, Imm32(0x3f));
mov(dest.high, SecondScratchReg);
ma_sra(dest.high, dest.high, shift);
as_nor(shift, zero, shift);
as_sll(SecondScratchReg, SecondScratchReg, 1);
ma_sll(SecondScratchReg, SecondScratchReg, shift);
ma_and(shift, unmaskedShift, Imm32(0x3f));
ma_srl(dest.low, dest.low, shift);
as_or(dest.low, dest.low, SecondScratchReg);
ma_and(SecondScratchReg, shift, Imm32(0x20));
as_sra(shift, dest.high, 31);
as_movn(dest.low, dest.high, SecondScratchReg);
as_movn(dest.high, shift, SecondScratchReg);
bind(&done);
}
@ -610,57 +607,26 @@ MacroAssembler::rotateLeft64(Register shift, Register64 src, Register64 dest, Re
MOZ_ASSERT(shift != src.low && shift != src.high);
MOZ_ASSERT(temp != InvalidReg);
ScratchRegisterScope shift_value(*this);
Label high, swap, done, zero;
ma_and(shift, shift, Imm32(0x3f));
ma_b(shift, Imm32(32), &swap, Equal);
ma_b(shift, Imm32(32), &high, GreaterThan);
ScratchRegisterScope scratch(*this);
// high = high << shift | low >> 32 - shift
// low = low << shift | high >> 32 - shift
ma_move(temp, src.high);
ma_sll(dest.high, src.high, shift);
ma_b(shift, Imm32(0), &zero, Equal);
ma_li(SecondScratchReg, Imm32(32));
as_subu(shift_value, SecondScratchReg, shift);
ma_srl(SecondScratchReg, src.low, shift_value);
as_or(dest.high, dest.high, SecondScratchReg);
ma_sll(dest.low, src.low, shift);
ma_srl(SecondScratchReg, temp, shift_value);
as_or(dest.low, dest.low, SecondScratchReg);
ma_b(&done);
bind(&zero);
ma_move(dest.low, src.low);
ma_move(dest.high, src.high);
ma_b(&done);
bind(&swap);
ma_move(SecondScratchReg, src.low);
ma_move(dest.low, src.high);
ma_move(dest.high, SecondScratchReg);
ma_b(&done);
// A 32 - 64 shift is a 0 - 32 shift in the other direction.
bind(&high);
ma_li(SecondScratchReg, Imm32(64));
as_subu(shift_value, SecondScratchReg, shift);
ma_move(temp, src.high);
ma_srl(dest.high, src.high, shift_value);
ma_li(SecondScratchReg, Imm32(32));
as_subu(shift_value, SecondScratchReg, shift_value);
ma_sll(SecondScratchReg, src.low, shift_value);
as_or(dest.high, dest.high, SecondScratchReg);
ma_sll(temp, temp, shift_value);
ma_li(SecondScratchReg, Imm32(64));
as_subu(shift_value, SecondScratchReg, shift);
ma_srl(dest.low, src.low, shift_value);
ma_and(scratch, shift, Imm32(0x3f));
as_nor(SecondScratchReg, zero, scratch);
ma_sll(temp, src.low, scratch);
ma_move(scratch, src.low);
as_srl(dest.low, src.high, 1);
ma_srl(dest.low, dest.low, SecondScratchReg);
as_or(dest.low, dest.low, temp);
bind(&done);
ma_move(SecondScratchReg, src.high);
as_srl(dest.high, scratch, 1);
ma_and(scratch, shift, Imm32(0x3f));
ma_sll(temp, SecondScratchReg, scratch);
as_nor(SecondScratchReg, zero, scratch);
ma_srl(dest.high, dest.high, SecondScratchReg);
as_or(dest.high, dest.high, temp);
ma_and(temp, scratch, Imm32(32));
as_movn(SecondScratchReg, dest.high, temp);
as_movn(dest.high, dest.low, temp);
as_movn(dest.low, SecondScratchReg, temp);
}
void
@ -701,62 +667,26 @@ MacroAssembler::rotateRight64(Register shift, Register64 src, Register64 dest, R
MOZ_ASSERT(shift != src.low && shift != src.high);
MOZ_ASSERT(temp != InvalidReg);
ScratchRegisterScope shift_value(*this);
Label high, swap, done, zero;
ScratchRegisterScope scratch(*this);
ma_and(shift, shift, Imm32(0x3f));
ma_b(shift, Imm32(32), &swap, Equal);
ma_b(shift, Imm32(32), &high, GreaterThan);
// high = high >> shift | low << 32 - shift
// low = low >> shift | high << 32 - shift
ma_move(temp, src.high);
ma_srl(dest.high, src.high, shift);
ma_b(shift, Imm32(0), &zero, Equal);
ma_li(SecondScratchReg, Imm32(32));
as_subu(shift_value, SecondScratchReg, shift);
ma_sll(SecondScratchReg, src.low, shift_value);
as_or(dest.high, dest.high, SecondScratchReg);
ma_srl(dest.low, src.low, shift);
//ma_li(SecondScratchReg, Imm32(32));
//as_subu(shift_value, SecondScratchReg, shift_value);
ma_sll(SecondScratchReg, temp, shift_value);
as_or(dest.low, dest.low, SecondScratchReg);
ma_b(&done);
bind(&zero);
ma_move(dest.low, src.low);
ma_move(dest.high, src.high);
ma_b(&done);
bind(&swap);
ma_move(SecondScratchReg, src.low);
ma_move(dest.low, src.high);
ma_move(dest.high, SecondScratchReg);
ma_b(&done);
// A 32 - 64 shift is a 0 - 32 shift in the other direction.
bind(&high);
ma_li(SecondScratchReg, Imm32(64));
as_subu(shift_value, SecondScratchReg, shift);
ma_move(temp, src.high);
ma_sll(dest.high, src.high, shift_value);
ma_li(SecondScratchReg, Imm32(32));
as_subu(shift_value, SecondScratchReg, shift_value);
ma_srl(SecondScratchReg, src.low, shift_value);
as_or(dest.high, dest.high, SecondScratchReg);
ma_srl(temp, temp, shift_value);
ma_li(SecondScratchReg, Imm32(64));
as_subu(shift_value, SecondScratchReg, shift);
ma_sll(dest.low, src.low, shift_value);
ma_and(scratch, shift, Imm32(0x3f));
as_nor(SecondScratchReg, zero, scratch);
ma_srl(temp, src.low, scratch);
ma_move(scratch, src.low);
as_sll(dest.low, src.high, 1);
ma_sll(dest.low, dest.low, SecondScratchReg);
as_or(dest.low, dest.low, temp);
bind(&done);
ma_move(SecondScratchReg, src.high);
as_sll(dest.high, scratch, 1);
ma_and(scratch, shift, Imm32(0x3f));
ma_srl(temp, SecondScratchReg, scratch);
as_nor(SecondScratchReg, zero, scratch);
ma_sll(dest.high, dest.high, SecondScratchReg);
as_or(dest.high, dest.high, temp);
ma_and(temp, scratch, Imm32(32));
as_movn(SecondScratchReg, dest.high, temp);
as_movn(dest.high, dest.low, temp);
as_movn(dest.low, SecondScratchReg, temp);
}
template <typename T1, typename T2>
@ -779,34 +709,22 @@ MacroAssembler::cmp32Set(Condition cond, T1 lhs, T2 rhs, Register dest)
void
MacroAssembler::clz64(Register64 src, Register dest)
{
Label done, low;
ma_b(src.high, Imm32(0), &low, Equal);
as_clz(dest, src.high);
ma_b(&done);
bind(&low);
as_clz(dest, src.low);
ma_addu(dest, Imm32(32));
bind(&done);
as_clz(ScratchRegister, src.high);
as_clz(SecondScratchReg, src.low);
as_movn(SecondScratchReg, zero, src.high);
as_addu(dest, ScratchRegister, SecondScratchReg);
}
void
MacroAssembler::ctz64(Register64 src, Register dest)
{
Label done, high;
as_movz(SecondScratchReg, src.high, src.low);
as_movn(SecondScratchReg, src.low, src.low);
ma_ctz(SecondScratchReg, SecondScratchReg);
ma_li(ScratchRegister, Imm32(0x20));
as_movn(ScratchRegister, zero, src.low);
as_addu(dest, SecondScratchReg, ScratchRegister);
ma_b(src.low, Imm32(0), &high, Equal);
ma_ctz(dest, src.low);
ma_b(&done);
bind(&high);
ma_ctz(dest, src.high);
ma_addu(dest, Imm32(32));
bind(&done);
}
void
@ -816,17 +734,31 @@ MacroAssembler::popcnt64(Register64 src, Register64 dest, Register tmp)
MOZ_ASSERT(dest.high != tmp);
MOZ_ASSERT(dest.low != dest.high);
if (dest.low != src.high) {
popcnt32(src.low, dest.low, tmp);
popcnt32(src.high, dest.high, tmp);
} else {
MOZ_ASSERT(dest.high != src.high);
popcnt32(src.low, dest.high, tmp);
popcnt32(src.high, dest.low, tmp);
}
ma_addu(dest.low, dest.high);
move32(Imm32(0), dest.high);
as_srl(tmp, src.low, 1);
as_srl(SecondScratchReg, src.high, 1);
ma_li(ScratchRegister, Imm32(0x55555555));
as_and(tmp, tmp, ScratchRegister);
as_subu(tmp, src.low, tmp);
as_and(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_subu(SecondScratchReg, src.high, SecondScratchReg);
ma_li(ScratchRegister, Imm32(0x33333333));
as_and(dest.low, tmp, ScratchRegister);
as_srl(tmp, tmp, 2);
as_and(tmp, tmp, ScratchRegister);
as_addu(tmp, dest.low, tmp);
as_and(dest.high, SecondScratchReg, ScratchRegister);
as_srl(SecondScratchReg, SecondScratchReg, 2);
as_and(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_addu(SecondScratchReg, dest.high, SecondScratchReg);
ma_li(ScratchRegister, Imm32(0x0F0F0F0F));
as_addu(tmp, SecondScratchReg, tmp);
as_srl(dest.low, tmp, 4);
as_and(dest.low, dest.low, ScratchRegister);
as_and(tmp, tmp, ScratchRegister);
as_addu(dest.low, dest.low, tmp);
ma_mul(dest.low, dest.low, Imm32(0x01010101));
as_srl(dest.low, dest.low, 24);
ma_move(dest.high, zero);
}
// ===============================================================
@ -861,107 +793,54 @@ MacroAssembler::branch64(Condition cond, const Address& lhs, const Address& rhs,
void
MacroAssembler::branch64(Condition cond, Register64 lhs, Imm64 val, Label* success, Label* fail)
{
bool fallthrough = false;
Label fallthroughLabel;
if (!fail) {
fail = &fallthroughLabel;
fallthrough = true;
if (val.value == 0) {
switch(cond){
case Assembler::Equal:
case Assembler::BelowOrEqual:
case Assembler::NotEqual:
case Assembler::Above:
as_or(ScratchRegister, lhs.high, lhs.low);
ma_b(ScratchRegister, ScratchRegister, success,
(cond == Assembler::Equal ||
cond == Assembler::BelowOrEqual) ? Assembler::Zero : Assembler::NonZero);
break;
case Assembler::LessThan:
case Assembler::GreaterThanOrEqual:
ma_b(lhs.high, Imm32(0), success, cond);
break;
case Assembler::LessThanOrEqual:
case Assembler::GreaterThan:
as_or(SecondScratchReg, lhs.high, lhs.low);
as_sra(ScratchRegister, lhs.high, 31);
as_sltu(ScratchRegister, ScratchRegister, SecondScratchReg);
ma_b(ScratchRegister, ScratchRegister, success,
(cond == Assembler::LessThanOrEqual) ? Assembler::Zero : Assembler::NonZero);
break;
case Assembler::Below:
// This condition is always false. No branch required.
break;
case Assembler::AboveOrEqual:
ma_b(success);
break;
default:
MOZ_CRASH("Condition code not supported");
}
return;
}
switch(cond) {
case Assembler::Equal:
branch32(Assembler::NotEqual, lhs.low, val.low(), fail);
branch32(Assembler::Equal, lhs.high, val.hi(), success);
if (!fallthrough)
jump(fail);
break;
case Assembler::NotEqual:
branch32(Assembler::NotEqual, lhs.low, val.low(), success);
branch32(Assembler::NotEqual, lhs.high, val.hi(), success);
if (!fallthrough)
jump(fail);
break;
case Assembler::LessThan:
case Assembler::LessThanOrEqual:
case Assembler::GreaterThan:
case Assembler::GreaterThanOrEqual:
case Assembler::Below:
case Assembler::BelowOrEqual:
case Assembler::Above:
case Assembler::AboveOrEqual: {
Assembler::Condition invert_cond = Assembler::InvertCondition(cond);
Assembler::Condition cond1 = Assembler::ConditionWithoutEqual(cond);
Assembler::Condition cond2 = Assembler::ConditionWithoutEqual(invert_cond);
Assembler::Condition cond3 = Assembler::UnsignedCondition(cond);
ma_b(lhs.high, val.hi(), success, cond1);
ma_b(lhs.high, val.hi(), fail, cond2);
ma_b(lhs.low, val.low(), success, cond3);
if (!fallthrough)
jump(fail);
break;
}
default:
MOZ_CRASH("Condition code not supported");
break;
}
if (fallthrough)
bind(fail);
Condition c = ma_cmp64(cond, lhs, val, SecondScratchReg);
ma_b(SecondScratchReg, SecondScratchReg, success, c);
if (fail)
jump(fail);
}
void
MacroAssembler::branch64(Condition cond, Register64 lhs, Register64 rhs, Label* success, Label* fail)
{
bool fallthrough = false;
Label fallthroughLabel;
if (!fail) {
fail = &fallthroughLabel;
fallthrough = true;
}
switch(cond) {
case Assembler::Equal:
branch32(Assembler::NotEqual, lhs.low, rhs.low, fail);
branch32(Assembler::Equal, lhs.high, rhs.high, success);
if (!fallthrough)
jump(fail);
break;
case Assembler::NotEqual:
branch32(Assembler::NotEqual, lhs.low, rhs.low, success);
branch32(Assembler::NotEqual, lhs.high, rhs.high, success);
if (!fallthrough)
jump(fail);
break;
case Assembler::LessThan:
case Assembler::LessThanOrEqual:
case Assembler::GreaterThan:
case Assembler::GreaterThanOrEqual:
case Assembler::Below:
case Assembler::BelowOrEqual:
case Assembler::Above:
case Assembler::AboveOrEqual: {
Assembler::Condition invert_cond = Assembler::InvertCondition(cond);
Assembler::Condition cond1 = Assembler::ConditionWithoutEqual(cond);
Assembler::Condition cond2 = Assembler::ConditionWithoutEqual(invert_cond);
Assembler::Condition cond3 = Assembler::UnsignedCondition(cond);
ma_b(lhs.high, rhs.high, success, cond1);
ma_b(lhs.high, rhs.high, fail, cond2);
ma_b(lhs.low, rhs.low, success, cond3);
if (!fallthrough)
jump(fail);
break;
}
default:
MOZ_CRASH("Condition code not supported");
break;
}
if (fallthrough)
bind(fail);
Condition c = ma_cmp64(cond, lhs, rhs, SecondScratchReg);
ma_b(SecondScratchReg, SecondScratchReg, success, c);
if (fail)
jump(fail);
}
void
@ -975,11 +854,11 @@ void
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
L label)
{
if (cond == Assembler::Zero) {
if (cond == Assembler::Zero || cond == Assembler::NonZero) {
MOZ_ASSERT(lhs.low == rhs.low);
MOZ_ASSERT(lhs.high == rhs.high);
as_or(ScratchRegister, lhs.low, lhs.high);
branchTestPtr(cond, ScratchRegister, ScratchRegister, label);
ma_b(ScratchRegister, ScratchRegister, label, cond);
} else {
MOZ_CRASH("Unsupported condition");
}
@ -1105,7 +984,7 @@ MacroAssembler::branchToComputedAddress(const BaseIndex& addr)
int32_t shift = Imm32::ShiftOf(addr.scale).value;
if (shift) {
// 4 instructions : lui ori jr nop
ma_mul(ScratchRegister, addr.index, Imm32(4 * 4));
as_sll(ScratchRegister, addr.index, 4);
as_addu(ScratchRegister, addr.base, ScratchRegister);
} else {
as_addu(ScratchRegister, addr.base, addr.index);

View File

@ -619,6 +619,199 @@ MacroAssemblerMIPS::ma_cmp_set(Register dst, Address lhs, Register rhs, Conditio
ma_cmp_set(dst, ScratchRegister, rhs, c);
}
void
MacroAssemblerMIPSCompat::cmp64Set(Condition cond, Register64 lhs, Imm64 val, Register dest) {
if (val.value == 0) {
switch(cond){
case Assembler::Equal:
case Assembler::BelowOrEqual:
as_or(dest, lhs.high, lhs.low);
as_sltiu(dest, dest, 1);
break;
case Assembler::NotEqual:
case Assembler::Above:
as_or(dest, lhs.high, lhs.low);
as_sltu(dest, zero, dest);
break;
case Assembler::LessThan:
case Assembler::GreaterThanOrEqual:
as_slt(dest, lhs.high, zero);
if (cond == Assembler::GreaterThanOrEqual)
as_xori(dest, dest, 1);
break;
case Assembler::GreaterThan:
case Assembler::LessThanOrEqual:
as_or(SecondScratchReg, lhs.high, lhs.low);
as_sra(ScratchRegister, lhs.high, 31);
as_sltu(dest, ScratchRegister, SecondScratchReg);
if (cond == Assembler::LessThanOrEqual)
as_xori(dest, dest, 1);
break;
case Assembler::Below:
case Assembler::AboveOrEqual:
as_ori(dest, zero, cond == Assembler::AboveOrEqual ? 1 : 0);
break;
default:
MOZ_CRASH("Condition code not supported");
break;
}
return;
}
Condition c = ma_cmp64(cond, lhs, val, dest);
switch(cond) {
// For Equal/NotEqual cond ma_cmp64 dest holds non boolean result.
case Assembler::Equal:
as_sltiu(dest, dest, 1);
break;
case Assembler::NotEqual:
as_sltu(dest, zero, dest);
break;
default:
if(c == Assembler::Zero)
as_xori(dest, dest, 1);
break;
}
}
void
MacroAssemblerMIPSCompat::cmp64Set(Condition cond, Register64 lhs, Register64 rhs, Register dest) {
Condition c = ma_cmp64(cond, lhs, rhs, dest);
switch(cond) {
// For Equal/NotEqual cond ma_cmp64 dest holds non boolean result.
case Assembler::Equal:
as_sltiu(dest, dest, 1);
break;
case Assembler::NotEqual:
as_sltu(dest, zero, dest);
break;
default:
if(c == Assembler::Zero)
as_xori(dest, dest, 1);
break;
}
}
Assembler::Condition
MacroAssemblerMIPSCompat::ma_cmp64(Condition cond, Register64 lhs, Register64 rhs, Register dest) {
switch(cond) {
case Assembler::Equal:
case Assembler::NotEqual:
as_xor(SecondScratchReg, lhs.high, rhs.high);
as_xor(ScratchRegister, lhs.low, rhs.low);
as_or(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::Equal) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::LessThan:
case Assembler::GreaterThanOrEqual:
as_slt(SecondScratchReg, rhs.high, lhs.high);
as_sltu(ScratchRegister, lhs.low, rhs.low);
as_slt(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_slt(ScratchRegister, lhs.high, rhs.high);
as_or(dest, ScratchRegister, SecondScratchReg);
return (cond == Assembler::GreaterThanOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::GreaterThan:
case Assembler::LessThanOrEqual:
as_slt(SecondScratchReg, lhs.high, rhs.high);
as_sltu(ScratchRegister, rhs.low, lhs.low);
as_slt(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_slt(ScratchRegister, rhs.high, lhs.high);
as_or(dest, ScratchRegister, SecondScratchReg);
return (cond == Assembler::LessThanOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::Below:
case Assembler::AboveOrEqual:
as_sltu(SecondScratchReg, rhs.high, lhs.high);
as_sltu(ScratchRegister, lhs.low, rhs.low);
as_slt(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_sltu(ScratchRegister, lhs.high, rhs.high);
as_or(dest, ScratchRegister, SecondScratchReg);
return (cond == Assembler::AboveOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::Above:
case Assembler::BelowOrEqual:
as_sltu(SecondScratchReg, lhs.high, rhs.high);
as_sltu(ScratchRegister, rhs.low, lhs.low);
as_slt(SecondScratchReg, SecondScratchReg, ScratchRegister);
as_sltu(ScratchRegister, rhs.high, lhs.high);
as_or(dest, ScratchRegister, SecondScratchReg);
return (cond == Assembler::BelowOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
default:
MOZ_CRASH("Condition code not supported");
break;
}
}
Assembler::Condition
MacroAssemblerMIPSCompat::ma_cmp64(Condition cond, Register64 lhs, Imm64 val, Register dest) {
MOZ_ASSERT(val.value != 0);
switch(cond) {
case Assembler::Equal:
case Assembler::NotEqual:
ma_xor(SecondScratchReg, lhs.high, val.hi());
ma_xor(ScratchRegister, lhs.low, val.low());
as_or(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::Equal) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::LessThan:
case Assembler::GreaterThanOrEqual:
ma_li(SecondScratchReg, val.hi());
as_slt(ScratchRegister, lhs.high, SecondScratchReg);
as_slt(SecondScratchReg, SecondScratchReg, lhs.high);
as_subu(SecondScratchReg, SecondScratchReg, ScratchRegister);
ma_li(ScratchRegister, val.low());
as_sltu(ScratchRegister, lhs.low, ScratchRegister);
as_slt(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::GreaterThanOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::GreaterThan:
case Assembler::LessThanOrEqual:
ma_li(SecondScratchReg, val.hi());
as_slt(ScratchRegister, SecondScratchReg, lhs.high);
as_slt(SecondScratchReg, lhs.high, SecondScratchReg);
as_subu(SecondScratchReg, SecondScratchReg, ScratchRegister);
ma_li(ScratchRegister, val.low());
as_sltu(ScratchRegister, ScratchRegister, lhs.low);
as_slt(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::LessThanOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::Below:
case Assembler::AboveOrEqual:
ma_li(SecondScratchReg, val.hi());
as_sltu(ScratchRegister, lhs.high, SecondScratchReg);
as_sltu(SecondScratchReg, SecondScratchReg, lhs.high);
as_subu(SecondScratchReg, SecondScratchReg, ScratchRegister);
ma_li(ScratchRegister, val.low());
as_sltu(ScratchRegister, lhs.low, ScratchRegister);
as_slt(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::AboveOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
case Assembler::Above:
case Assembler::BelowOrEqual:
ma_li(SecondScratchReg, val.hi());
as_sltu(ScratchRegister, SecondScratchReg, lhs.high);
as_sltu(SecondScratchReg, lhs.high, SecondScratchReg);
as_subu(SecondScratchReg, SecondScratchReg, ScratchRegister);
ma_li(ScratchRegister, val.low());
as_sltu(ScratchRegister, ScratchRegister, lhs.low);
as_slt(dest, SecondScratchReg, ScratchRegister);
return (cond == Assembler::BelowOrEqual) ? Assembler::Zero : Assembler::NonZero;
break;
default:
MOZ_CRASH("Condition code not supported");
break;
}
}
// fp instructions
void
MacroAssemblerMIPS::ma_lid(FloatRegister dest, double value)

View File

@ -713,6 +713,9 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
// convert it to double. Else, branch to failure.
void ensureDouble(const ValueOperand& source, FloatRegister dest, Label* failure);
void cmp64Set(Condition cond, Register64 lhs, Register64 rhs, Register dest);
void cmp64Set(Condition cond, Register64 lhs, Imm64 val, Register dest);
protected:
bool buildOOLFakeExitFrame(void* fakeReturnAddr);
@ -722,6 +725,8 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
Register ptrScratch, Register64 output, Register tmp);
void wasmStoreI64Impl(const wasm::MemoryAccessDesc& access, Register64 value, Register memoryBase,
Register ptr, Register ptrScratch, Register tmp);
Condition ma_cmp64(Condition cond, Register64 lhs, Register64 rhs, Register dest);
Condition ma_cmp64(Condition cond, Register64 lhs, Imm64 val, Register dest);
public:
CodeOffset labelForPatch() {

View File

@ -392,6 +392,8 @@ SimInstruction::instructionType() const
case op_special2:
switch (functionFieldRaw()) {
case ff_mul:
case ff_madd:
case ff_maddu:
case ff_clz:
return kRegisterType;
default:
@ -2651,6 +2653,18 @@ Simulator::configureTypeRegister(SimInstruction* instr,
case ff_mul:
alu_out = rs_u * rt_u; // Only the lower 32 bits are kept.
break;
case ff_mult:
i64hilo = static_cast<int64_t>(rs) * static_cast<int64_t>(rt);
break;
case ff_multu:
u64hilo = static_cast<uint64_t>(rs_u) * static_cast<uint64_t>(rt_u);
break;
case ff_madd:
i64hilo += static_cast<int64_t>(rs) * static_cast<int64_t>(rt);
break;
case ff_maddu:
u64hilo += static_cast<uint64_t>(rs_u) * static_cast<uint64_t>(rt_u);
break;
case ff_clz:
alu_out = rs_u ? __builtin_clz(rs_u) : 32;
break;
@ -3204,6 +3218,14 @@ Simulator::decodeTypeRegister(SimInstruction* instr)
setRegister(LO, Unpredictable);
setRegister(HI, Unpredictable);
break;
case ff_madd:
setRegister(LO, getRegister(LO) + static_cast<int32_t>(i64hilo & 0xffffffff));
setRegister(HI, getRegister(HI) + static_cast<int32_t>(i64hilo >> 32));
break;
case ff_maddu:
setRegister(LO, getRegister(LO) + static_cast<int32_t>(u64hilo & 0xffffffff));
setRegister(HI, getRegister(HI) + static_cast<int32_t>(u64hilo >> 32));
break;
default: // For other special2 opcodes we do the default operation.
setRegister(rd_reg, alu_out);
}
@ -3617,7 +3639,7 @@ Simulator::instructionDecode(SimInstruction* instr)
UNSUPPORTED();
}
if (!pc_modified_)
setRegister(pc, reinterpret_cast<int32_t>(instr) + SimInstruction::kInstrSize);
setRegister(pc, reinterpret_cast<int32_t>(instr) + SimInstruction::kInstrSize);
}
void

View File

@ -977,7 +977,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("DebugTrapHandler");
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -929,7 +929,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
Linker linker(masm);
AutoFlushICache afc("DebugTrapHandler");
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -883,7 +883,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
masm.ret();
Linker linker(masm);
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -904,7 +904,7 @@ JitRuntime::generateDebugTrapHandler(JSContext* cx)
masm.ret();
Linker linker(masm);
JitCode* codeDbg = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* codeDbg = linker.newCode(cx, CodeKind::Other);
#ifdef JS_ION_PERF
writePerfSpewerJitCodeProfile(codeDbg, "DebugTrapHandler");

View File

@ -46,7 +46,7 @@ static bool Execute(JSContext* cx, MacroAssembler& masm)
return false;
Linker linker(masm);
JitCode* code = linker.newCode<CanGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return false;
if (!ExecutableAllocator::makeExecutable(code->raw(), code->bufferSize()))

View File

@ -76,7 +76,7 @@ linkAndAllocate(JSContext* cx, js::jit::MacroAssembler* masm)
using namespace js::jit;
AutoFlushICache afc("test");
Linker l(*masm);
return l.newCode<CanGC>(cx, CodeKind::Ion);
return l.newCode(cx, CodeKind::Ion);
}
#define TRY(x) if (!(x)) return false;

View File

@ -60,7 +60,7 @@ linkAndAllocate(JSContext* cx, js::jit::MacroAssembler* masm)
using namespace js::jit;
AutoFlushICache afc("test");
Linker l(*masm);
return l.newCode<CanGC>(cx, CodeKind::Ion);
return l.newCode(cx, CodeKind::Ion);
}
#define TRY(x) if (!(x)) return false;

View File

@ -268,7 +268,7 @@ UnboxedLayout::makeConstructorCode(JSContext* cx, HandleObjectGroup group)
Linker linker(masm);
AutoFlushICache afc("UnboxedObject");
JitCode* code = linker.newCode<NoGC>(cx, CodeKind::Other);
JitCode* code = linker.newCode(cx, CodeKind::Other);
if (!code)
return false;

View File

@ -3807,8 +3807,10 @@ class BaseCompiler final : public BaseCompilerInterface
#endif // RABALDR_I64_TO_FLOAT_CALLOUT
void cmp64Set(Assembler::Condition cond, RegI64 lhs, RegI64 rhs, RegI32 dest) {
#ifdef JS_PUNBOX64
#if defined(JS_PUNBOX64)
masm.cmpPtrSet(cond, lhs.reg, rhs.reg, dest);
#elif defined(JS_CODEGEN_MIPS32)
masm.cmp64Set(cond, lhs, rhs, dest);
#else
// TODO / OPTIMIZE (Bug 1316822): This is pretty branchy, we should be
// able to do better.

View File

@ -1264,8 +1264,8 @@ mozJSComponentLoader::Import(JSContext* aCx, const nsACString& aLocation,
if (!newEntry)
return NS_ERROR_OUT_OF_MEMORY;
rv = info.EnsureResolvedURI();
NS_ENSURE_SUCCESS(rv, rv);
// Note: This implies EnsureURI().
MOZ_TRY(info.EnsureResolvedURI());
// get the JAR if there is one
nsCOMPtr<nsIJARURI> jarURI;
@ -1297,16 +1297,18 @@ mozJSComponentLoader::Import(JSContext* aCx, const nsACString& aLocation,
}
mLocations.Put(newEntry->resolvedURL, new nsCString(info.Key()));
mInProgressImports.Put(info.Key(), newEntry);
rv = info.EnsureURI();
NS_ENSURE_SUCCESS(rv, rv);
RootedValue exception(aCx);
rv = ObjectForLocation(info, sourceFile, &newEntry->obj,
&newEntry->thisObjectKey,
&newEntry->location, true, &exception);
{
mInProgressImports.Put(info.Key(), newEntry);
auto cleanup = MakeScopeExit([&] () {
mInProgressImports.Remove(info.Key());
});
mInProgressImports.Remove(info.Key());
rv = ObjectForLocation(info, sourceFile, &newEntry->obj,
&newEntry->thisObjectKey,
&newEntry->location, true, &exception);
}
if (NS_FAILED(rv)) {
if (!exception.isUndefined()) {

View File

@ -11,7 +11,7 @@ fuzzy-if(skiaContent,7,90) == rotate-angle-4.svg rotate-angle-ref.svg
fuzzy-if(skiaContent,7,60) == rotate-angle-5.svg rotate-angle-ref.svg
fuzzy(12,27) fuzzy-if(skiaContent,1,180) fuzzy-if(Android,16,3) == scale-1.svg scale-1-ref.svg # bug 981004
== set-transform-1.svg lime.svg
fuzzy-if(winWidget||gtkWidget||OSX,1,27) fuzzy-if(skiaContent,7,1548) == skew-1.svg skew-1-ref.svg # bug 983671, Bug 1260629
fuzzy-if(winWidget||gtkWidget||OSX,3,27) fuzzy-if(skiaContent,7,1548) == skew-1.svg skew-1-ref.svg # bug 983671, Bug 1260629
== translate-clipPath-1.svg lime.svg
== translate-gradient-1.svg lime.svg
== translate-pattern-1.svg lime.svg

View File

@ -86,6 +86,7 @@ user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
// Ensure that telemetry is disabled, so we don't connect to the telemetry
// server in the middle of the tests.
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy/");
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("experiments.enabled", false);
// Likewise for safebrowsing.

View File

@ -286,6 +286,69 @@ VerifyEntryContentDigest(nsIZipReader* zip, const nsACString& aFilename,
return VerifyStreamContentDigest(stream, digestFromManifest, buf);
}
// @oaram aDir directory containing the unpacked signed archive
// @param aFilename path of the target file relative to aDir
// @param digestFromManifest The digest that we're supposed to check the file's
// contents against, from the manifest
// @param buf A scratch buffer that we use for doing the I/O
nsresult
VerifyFileContentDigest(nsIFile* aDir, const nsAString& aFilename,
const DigestWithAlgorithm& digestFromManifest,
SECItem& buf)
{
// Find the file corresponding to the manifest path
nsCOMPtr<nsIFile> file;
nsresult rv = aDir->Clone(getter_AddRefs(file));
if (NS_FAILED(rv)) {
return rv;
}
// We don't know how to handle JARs with signed directory entries.
// It's technically possible in the manifest but makes no sense on disk.
// Inside an archive we just ignore them, but here we have to treat it
// as an error because the signed bytes never got unpacked.
int32_t pos = 0;
int32_t slash;
int32_t namelen = aFilename.Length();
if (namelen == 0 || aFilename[namelen - 1] == '/') {
return NS_ERROR_SIGNED_JAR_ENTRY_INVALID;
}
// Append path segments one by one
do {
slash = aFilename.FindChar('/', pos);
int32_t segend = (slash == kNotFound) ? namelen : slash;
rv = file->Append(Substring(aFilename, pos, (segend - pos)));
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_ENTRY_INVALID;
}
pos = slash + 1;
} while (pos < namelen && slash != kNotFound);
bool exists;
rv = file->Exists(&exists);
if (NS_FAILED(rv) || !exists) {
return NS_ERROR_SIGNED_JAR_ENTRY_MISSING;
}
bool isDir;
rv = file->IsDirectory(&isDir);
if (NS_FAILED(rv) || isDir) {
// We only support signed files, not directory entries
return NS_ERROR_SIGNED_JAR_ENTRY_INVALID;
}
// Open an input stream for that file and verify it.
nsCOMPtr<nsIInputStream> stream;
rv = NS_NewLocalFileInputStream(getter_AddRefs(stream), file, -1, -1,
nsIFileInputStream::CLOSE_ON_EOF);
if (NS_FAILED(rv) || !stream) {
return NS_ERROR_SIGNED_JAR_ENTRY_MISSING;
}
return VerifyStreamContentDigest(stream, digestFromManifest, buf);
}
// On input, nextLineStart is the start of the current line. On output,
// nextLineStart is the start of the next line.
nsresult
@ -1454,11 +1517,530 @@ nsNSSCertificateDB::OpenSignedAppFileAsync(
return task->Dispatch("SignedJAR");
}
//
// Signature verification for archives unpacked into a file structure
//
// Finds the "*.rsa" signature file in the META-INF directory and returns
// the name. It is an error if there are none or more than one .rsa file
nsresult
FindSignatureFilename(nsIFile* aMetaDir,
/*out*/ nsAString& aFilename)
{
nsCOMPtr<nsISimpleEnumerator> entries;
nsresult rv = aMetaDir->GetDirectoryEntries(getter_AddRefs(entries));
nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(entries);
if (NS_FAILED(rv) || !files) {
return NS_ERROR_SIGNED_JAR_NOT_SIGNED;
}
bool found = false;
nsCOMPtr<nsIFile> file;
rv = files->GetNextFile(getter_AddRefs(file));
while (NS_SUCCEEDED(rv) && file) {
nsAutoString leafname;
rv = file->GetLeafName(leafname);
if (NS_SUCCEEDED(rv)) {
if (StringEndsWith(leafname, NS_LITERAL_STRING(".rsa"))) {
if (!found) {
found = true;
aFilename = leafname;
} else {
// second signature file is an error
rv = NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
break;
}
}
rv = files->GetNextFile(getter_AddRefs(file));
}
}
if (!found) {
rv = NS_ERROR_SIGNED_JAR_NOT_SIGNED;
}
files->Close();
return rv;
}
// Loads the signature metadata file that matches the given filename in
// the passed-in Meta-inf directory. If bufDigest is not null then on
// success bufDigest will contain the SHA1 or SHA256 digest of the entry
// (depending on what aDigestAlgorithm is).
nsresult
LoadOneMetafile(nsIFile* aMetaDir,
const nsAString& aFilename,
/*out*/ SECItem& aBuf,
/*optional, in*/ SECOidTag aDigestAlgorithm = SEC_OID_SHA1,
/*optional, out*/ Digest* aBufDigest = nullptr)
{
nsCOMPtr<nsIFile> metafile;
nsresult rv = aMetaDir->Clone(getter_AddRefs(metafile));
NS_ENSURE_SUCCESS(rv, rv);
rv = metafile->Append(aFilename);
NS_ENSURE_SUCCESS(rv, rv);
bool exists;
rv = metafile->Exists(&exists);
if (NS_FAILED(rv) || !exists) {
// we can call a missing .rsa file "unsigned" but FindSignatureFilename()
// already found one: missing other metadata files means a broken signature.
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
nsCOMPtr<nsIInputStream> stream;
rv = NS_NewLocalFileInputStream(getter_AddRefs(stream), metafile);
NS_ENSURE_SUCCESS(rv, rv);
rv = ReadStream(stream, aBuf);
stream->Close();
NS_ENSURE_SUCCESS(rv, rv);
if (aBufDigest) {
rv = aBufDigest->DigestBuf(aDigestAlgorithm, aBuf.data, aBuf.len - 1);
NS_ENSURE_SUCCESS(rv, rv);
}
return NS_OK;
}
// Parses MANIFEST.MF and verifies the contents of the unpacked files
// listed in the manifest.
// The filenames of all entries will be returned in aMfItems. aBuf must
// be a pre-allocated scratch buffer that is used for doing I/O.
nsresult
ParseMFUnpacked(const char* aFilebuf, nsIFile* aDir, SECOidTag aDigestAlgorithm,
/*out*/ nsTHashtable<nsStringHashKey>& aMfItems,
ScopedAutoSECItem& aBuf)
{
const char* digestNameToFind = nullptr;
switch (aDigestAlgorithm) {
case SEC_OID_SHA256:
digestNameToFind = "sha256-digest";
break;
case SEC_OID_SHA1:
digestNameToFind = "sha1-digest";
break;
default:
MOZ_ASSERT_UNREACHABLE("bad argument to ParseMF");
return NS_ERROR_FAILURE;
}
const char* nextLineStart = aFilebuf;
nsresult rv = CheckManifestVersion(nextLineStart,
NS_LITERAL_CSTRING(JAR_MF_HEADER));
if (NS_FAILED(rv)) {
return rv;
}
// Skip the rest of the header section, which ends with a blank line.
{
nsAutoCString line;
do {
rv = ReadLine(nextLineStart, line);
if (NS_FAILED(rv)) {
return rv;
}
} while (line.Length() > 0);
// Manifest containing no file entries is OK, though useless.
if (*nextLineStart == '\0') {
return NS_OK;
}
}
nsAutoString curItemName;
nsAutoCString digest;
for (;;) {
nsAutoCString curLine;
rv = ReadLine(nextLineStart, curLine);
if (NS_FAILED(rv)) {
return rv;
}
if (curLine.Length() == 0) {
// end of section (blank line or end-of-file)
if (curItemName.Length() == 0) {
// '...Each section must start with an attribute with the name as
// "Name",...', so every section must have a Name attribute.
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
if (digest.IsEmpty()) {
// We require every entry to have a digest, since we require every
// entry to be signed and we don't allow duplicate entries.
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
if (aMfItems.Contains(curItemName)) {
// Duplicate entry
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// Verify that the file's content digest matches the digest from this
// MF section.
DigestWithAlgorithm digestWithAlgorithm = { digest, aDigestAlgorithm };
rv = VerifyFileContentDigest(aDir, curItemName, digestWithAlgorithm,
aBuf);
if (NS_FAILED(rv)) {
return rv;
}
aMfItems.PutEntry(curItemName);
if (*nextLineStart == '\0') {
// end-of-file
break;
}
// reset so we know we haven't encountered either of these for the next
// item yet.
curItemName.Truncate();
digest.Truncate();
continue; // skip the rest of the loop below
}
nsAutoCString attrName;
nsAutoCString attrValue;
rv = ParseAttribute(curLine, attrName, attrValue);
if (NS_FAILED(rv)) {
return rv;
}
// Lines to look for:
// (1) Digest:
if (attrName.EqualsIgnoreCase(digestNameToFind)) {
if (!digest.IsEmpty()) {
// multiple SHA* digests in section
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
rv = Base64Decode(attrValue, digest);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
continue;
}
// (2) Name: associates this manifest section with a file in the jar.
if (attrName.LowerCaseEqualsLiteral("name")) {
if (MOZ_UNLIKELY(curItemName.Length() > 0)) {
// multiple names in section
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
if (MOZ_UNLIKELY(attrValue.Length() == 0)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
curItemName = NS_ConvertUTF8toUTF16(attrValue);
continue;
}
// (3) Magic: the only other must-understand attribute
if (attrName.LowerCaseEqualsLiteral("magic")) {
// We don't understand any magic, so we can't verify an entry that
// requires magic. Since we require every entry to have a valid
// signature, we have no choice but to reject the entry.
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// unrecognized attributes must be ignored
}
return NS_OK;
}
// recursively check a directory tree for files not in the list of
// verified files we found in the manifest. For each file we find
// Check it against the files found in the manifest. If the file wasn't
// in the manifest then it's unsigned and we can stop looking. Otherwise
// remove it from the collection so we can check leftovers later.
//
// @param aDir Directory to check
// @param aPath Relative path to that directory (to check against aItems)
// @param aItems All the files found
// @param *Filename signature files that won't be in the manifest
nsresult
CheckDirForUnsignedFiles(nsIFile* aDir,
const nsString& aPath,
/* in/out */ nsTHashtable<nsStringHashKey>& aItems,
const nsAString& sigFilename,
const nsAString& sfFilename,
const nsAString& mfFilename)
{
nsCOMPtr<nsISimpleEnumerator> entries;
nsresult rv = aDir->GetDirectoryEntries(getter_AddRefs(entries));
nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(entries);
if (NS_FAILED(rv) || !files) {
return NS_ERROR_SIGNED_JAR_ENTRY_MISSING;
}
bool inMeta = StringBeginsWith(aPath, NS_LITERAL_STRING(JAR_META_DIR));
while (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIFile> file;
rv = files->GetNextFile(getter_AddRefs(file));
if (NS_FAILED(rv) || !file) {
break;
}
nsAutoString leafname;
rv = file->GetLeafName(leafname);
if (NS_FAILED(rv)) {
return rv;
}
nsAutoString curName(aPath + leafname);
bool isDir;
rv = file->IsDirectory(&isDir);
if (NS_FAILED(rv)) {
return rv;
}
// if it's a directory we need to recurse
if (isDir) {
curName.AppendLiteral(u"/");
rv = CheckDirForUnsignedFiles(file, curName, aItems,
sigFilename, sfFilename, mfFilename);
} else {
// The files that comprise the signature mechanism are not covered by the
// signature.
//
// XXX: This is OK for a single signature, but doesn't work for
// multiple signatures because the metadata for the other signatures
// is not signed either.
if (inMeta && ( leafname == sigFilename ||
leafname == sfFilename ||
leafname == mfFilename )) {
continue;
}
// make sure the current file was found in the manifest
nsStringHashKey* item = aItems.GetEntry(curName);
if (!item) {
return NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY;
}
// Remove the item so we can check for leftover items later
aItems.RemoveEntry(item);
}
}
files->Close();
return rv;
}
/*
* Verify the signature of a directory structure as if it were a
* signed JAR file (used for unpacked JARs)
*/
nsresult
VerifySignedDirectory(AppTrustedRoot aTrustedRoot,
nsIFile* aDirectory,
/*out, optional */ nsIX509Cert** aSignerCert)
{
NS_ENSURE_ARG_POINTER(aDirectory);
if (aSignerCert) {
*aSignerCert = nullptr;
}
// Make sure there's a META-INF directory
nsCOMPtr<nsIFile> metaDir;
nsresult rv = aDirectory->Clone(getter_AddRefs(metaDir));
if (NS_FAILED(rv)) {
return rv;
}
rv = metaDir->Append(NS_LITERAL_STRING(JAR_META_DIR));
if (NS_FAILED(rv)) {
return rv;
}
bool exists;
rv = metaDir->Exists(&exists);
if (NS_FAILED(rv) || !exists) {
return NS_ERROR_SIGNED_JAR_NOT_SIGNED;
}
bool isDirectory;
rv = metaDir->IsDirectory(&isDirectory);
if (NS_FAILED(rv) || !isDirectory) {
return NS_ERROR_SIGNED_JAR_NOT_SIGNED;
}
// Find and load the Signature (RSA) file
nsAutoString sigFilename;
rv = FindSignatureFilename(metaDir, sigFilename);
if (NS_FAILED(rv)) {
return rv;
}
ScopedAutoSECItem sigBuffer;
rv = LoadOneMetafile(metaDir, sigFilename, sigBuffer);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_NOT_SIGNED;
}
// Load the signature (SF) file and verify the signature.
// The .sf and .rsa files must have the same name apart from the extension.
nsAutoString sfFilename(Substring(sigFilename, 0, sigFilename.Length() - 3)
+ NS_LITERAL_STRING("sf"));
ScopedAutoSECItem sfBuffer;
rv = LoadOneMetafile(metaDir, sfFilename, sfBuffer);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// Calculate both the SHA-1 and SHA-256 hashes of the signature file - we
// don't know what algorithm the PKCS#7 signature used.
Digest sfCalculatedSHA1Digest;
rv = sfCalculatedSHA1Digest.DigestBuf(SEC_OID_SHA1, sfBuffer.data,
sfBuffer.len - 1);
if (NS_FAILED(rv)) {
return rv;
}
Digest sfCalculatedSHA256Digest;
rv = sfCalculatedSHA256Digest.DigestBuf(SEC_OID_SHA256, sfBuffer.data,
sfBuffer.len - 1);
if (NS_FAILED(rv)) {
return rv;
}
sigBuffer.type = siBuffer;
UniqueCERTCertList builtChain;
SECOidTag digestToUse;
rv = VerifySignature(aTrustedRoot, sigBuffer, sfCalculatedSHA1Digest.get(),
sfCalculatedSHA256Digest.get(), digestToUse, builtChain);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// Get the expected manifest hash from the signed .sf file
nsAutoCString mfDigest;
rv = ParseSF(BitwiseCast<char*, unsigned char*>(sfBuffer.data), digestToUse,
mfDigest);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// Load manifest (MF) file and verify signature
nsAutoString mfFilename(NS_LITERAL_STRING("manifest.mf"));
ScopedAutoSECItem manifestBuffer;
Digest mfCalculatedDigest;
rv = LoadOneMetafile(metaDir, mfFilename, manifestBuffer, digestToUse,
&mfCalculatedDigest);
if (NS_FAILED(rv)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
nsDependentCSubstring calculatedDigest(
DigestToDependentString(mfCalculatedDigest));
if (!mfDigest.Equals(calculatedDigest)) {
return NS_ERROR_SIGNED_JAR_MANIFEST_INVALID;
}
// Parse manifest and verify signed hash of all listed files
// Allocate the I/O buffer only once per JAR, instead of once per entry, in
// order to minimize malloc/free calls and in order to avoid fragmenting
// memory.
ScopedAutoSECItem buf(128 * 1024);
nsTHashtable<nsStringHashKey> items;
rv = ParseMFUnpacked(BitwiseCast<char*, unsigned char*>(manifestBuffer.data),
aDirectory, digestToUse, items, buf);
if (NS_FAILED(rv)){
return rv;
}
// We've checked that everything listed in the manifest exists and is signed
// correctly. Now check on disk for extra (unsigned) files.
// Deletes found entries from items as it goes.
rv = CheckDirForUnsignedFiles(aDirectory, EmptyString(), items,
sigFilename, sfFilename, mfFilename);
if (NS_FAILED(rv)) {
return rv;
}
// We verified that every entry that we require to be signed is signed. But,
// were there any missing entries--that is, entries that are mentioned in the
// manifest but missing from the directory tree? (There shouldn't be given
// ParseMFUnpacked() checking them all, but it's a cheap sanity check.)
if (items.Count() != 0) {
return NS_ERROR_SIGNED_JAR_ENTRY_MISSING;
}
// Return the signer's certificate to the reader if they want it.
// XXX: We should return an nsIX509CertList with the whole validated chain.
if (aSignerCert) {
CERTCertListNode* signerCertNode = CERT_LIST_HEAD(builtChain);
if (!signerCertNode || CERT_LIST_END(signerCertNode, builtChain) ||
!signerCertNode->cert) {
return NS_ERROR_FAILURE;
}
nsCOMPtr<nsIX509Cert> signerCert =
nsNSSCertificate::Create(signerCertNode->cert);
NS_ENSURE_TRUE(signerCert, NS_ERROR_OUT_OF_MEMORY);
signerCert.forget(aSignerCert);
}
return NS_OK;
}
class VerifySignedDirectoryTask final : public CryptoTask
{
public:
VerifySignedDirectoryTask(AppTrustedRoot aTrustedRoot, nsIFile* aUnpackedJar,
nsIVerifySignedDirectoryCallback* aCallback)
: mTrustedRoot(aTrustedRoot)
, mDirectory(aUnpackedJar)
, mCallback(new nsMainThreadPtrHolder<nsIVerifySignedDirectoryCallback>(
"VerifySignedDirectoryTask::mCallback", aCallback))
{
}
private:
virtual nsresult CalculateResult() override
{
return VerifySignedDirectory(mTrustedRoot,
mDirectory,
getter_AddRefs(mSignerCert));
}
virtual void CallCallback(nsresult rv) override
{
(void) mCallback->VerifySignedDirectoryFinished(rv, mSignerCert);
}
const AppTrustedRoot mTrustedRoot;
const nsCOMPtr<nsIFile> mDirectory;
nsMainThreadPtrHandle<nsIVerifySignedDirectoryCallback> mCallback;
nsCOMPtr<nsIX509Cert> mSignerCert; // out
};
NS_IMETHODIMP
nsNSSCertificateDB::VerifySignedDirectoryAsync(AppTrustedRoot, nsIFile*,
nsNSSCertificateDB::VerifySignedDirectoryAsync(
AppTrustedRoot aTrustedRoot, nsIFile* aUnpackedJar,
nsIVerifySignedDirectoryCallback* aCallback)
{
NS_ENSURE_ARG_POINTER(aUnpackedJar);
NS_ENSURE_ARG_POINTER(aCallback);
return aCallback->VerifySignedDirectoryFinished(
NS_ERROR_SIGNED_JAR_NOT_SIGNED, nullptr);
RefPtr<VerifySignedDirectoryTask> task(new VerifySignedDirectoryTask(aTrustedRoot,
aUnpackedJar,
aCallback));
return task->Dispatch("UnpackedJar");
}

View File

@ -1162,4 +1162,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
static const int32_t kUnknownId = -1;
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1527623779860000);
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1527709500462000);

View File

@ -28,8 +28,6 @@ interface nsIOpenSignedAppFileCallback : nsISupports
in nsIX509Cert aSignerCert);
};
// Only relevant while we transition away from legacy add-ons. rv will always be
// NS_ERROR_SIGNED_JAR_NOT_SIGNED. aSignerCert will always be null.
[scriptable, function, uuid(d5f97827-622a-488f-be08-d850432ac8ec)]
interface nsIVerifySignedDirectoryCallback : nsISupports
{
@ -270,9 +268,16 @@ interface nsIX509CertDB : nsISupports {
in nsIOpenSignedAppFileCallback callback);
/**
* Vestigial implementation of verifying signed unpacked add-ons. trustedRoot
* and aUnpackedDir are ignored. The callback is always called with
* NS_ERROR_SIGNED_JAR_NOT_SIGNED and a null signer cert.
* Verifies the signature on a directory representing an unpacked signed
* JAR file. To be considered valid, there must be exactly one signature
* on the directory structure and that signature must have signed every
* entry. Further, the signature must come from a certificate that
* is trusted for code signing.
*
* On success NS_OK and the trusted certificate that signed the
* unpacked JAR are returned.
*
* On failure, an error code is returned.
*/
[must_use]
void verifySignedDirectoryAsync(in AppTrustedRoot trustedRoot,

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1530042967332000);
const PRTime gPreloadListExpirationTime = INT64_C(1530128688308000);
%%
0-1.party, 1
0.me.uk, 1
@ -622,7 +622,6 @@ aariefhaafiz.com, 1
aarkue.eu, 1
aaron.xin, 1
aaronhorler.com, 1
aaronmcguire.me, 0
aaronroyle.com, 1
aaronsilber.me, 1
aatf.us, 1
@ -1014,6 +1013,7 @@ adventures.de, 1
adventureswithlillie.ca, 1
advocate-europe.eu, 1
advocaten-avocats.be, 1
advocatenalkmaar.org, 1
advokat-romanov.com, 1
adware.pl, 1
adws.io, 1
@ -2331,7 +2331,6 @@ armleads.com, 1
armodec.com, 1
armstrongsengineering.com, 1
army24.cz, 1
armyofbane.com, 1
armyprodej.cz, 1
arnaudb.net, 1
arnaudfeld.de, 1
@ -2540,7 +2539,7 @@ astrosnail.pt.eu.org, 1
astural.org, 1
astutikhonda.com, 1
astutr.co, 1
asucrews.com, 1
asucrews.com, 0
asuhe.win, 1
asuhe.xyz, 1
asuka.io, 1
@ -2821,7 +2820,6 @@ avid.blue, 1
avietech.com, 1
aviv.nyc, 1
avmemo.com, 1
avmo.pw, 1
avmoo.com, 1
avnet.ws, 1
avocode.com, 1
@ -2829,7 +2827,6 @@ avonlearningcampus.com, 1
avotoma.com, 1
avova.de, 1
avpres.net, 1
avso.pw, 1
avsox.com, 1
avspot.net, 1
avticket.ru, 0
@ -2837,7 +2834,6 @@ avtoforex.ru, 1
avtogara-isperih.com, 1
avtovokzaly.ru, 1
avvcorda.com, 1
avxo.pw, 1
awan.tech, 1
awaremi-tai.com, 1
awaro.net, 1
@ -2951,7 +2947,6 @@ b8591.com, 1
b8591.net, 1
b8979.com, 1
b8979.net, 1
b8a.me, 1
b9018.com, 1
b9018.net, 1
b9108.com, 1
@ -3203,7 +3198,6 @@ baodan666.com, 1
baofengtech.com, 1
baosuckhoedoisong.net, 1
baptistboard.com, 1
baptiste-destombes.fr, 1
baptiste-peugnez.fr, 1
baptistedeleris.fr, 1
bar-harcourt.com, 1
@ -3251,7 +3245,6 @@ barslecht.com, 1
barslecht.nl, 1
barss.io, 1
barta.me, 1
bartel.ws, 1
bartelldrugs.com, 1
bartelt.name, 1
barthonia-showroom.de, 1
@ -3502,7 +3495,6 @@ befundonline.de, 1
begabungsfoerderung.info, 1
begbie.com, 1
beginner.nl, 1
beginwp.top, 1
behamzdarma.cz, 1
behoerden-online-dienste.de, 1
beichtgenerator.de, 0
@ -3573,6 +3565,7 @@ benediktdichgans.de, 1
benepiscinas.com.br, 1
beneri.se, 1
benevisim.com, 1
benevita.bio, 1
benevita.life, 1
benevita.live, 1
benevita.organic, 1
@ -3693,6 +3686,7 @@ bestbonuses.co.uk, 1
bestbrakes.com, 1
bestbridal.top, 1
bestbyte.com.br, 1
bestcellular.com, 0
bestellipticalmachinereview.info, 1
bestesb.com, 1
bestesb.net, 1
@ -3833,7 +3827,6 @@ biathloncup.ru, 1
bible-maroc.com, 1
bible.ru, 1
bibleonline.ru, 1
biblerhymes.com, 1
bibliaon.com, 1
biblio.wiki, 1
biblioblog.fr, 1
@ -4294,6 +4287,7 @@ blogom.at, 1
blogpentrusuflet.ro, 1
blogreen.org, 1
blogtroterzy.pl, 1
blok56.nl, 1
blokuhaka.fr, 1
bloodsports.org, 1
bloodyexcellent.com, 1
@ -4697,7 +4691,6 @@ bownty.pt, 1
bowntycdn.net, 1
boxdevigneron.fr, 1
boxintense.com, 0
boxit.es, 1
boxpeg.com, 1
boxpirates.to, 1
boxvergelijker.nl, 1
@ -4986,7 +4979,6 @@ btcgo.nl, 1
btcontract.com, 1
btcpop.co, 1
btcycle.org, 1
btio.pw, 1
btku.org, 1
btmstore.com.br, 1
btnissanparts.com, 1
@ -5222,6 +5214,7 @@ bytema.eu, 1
bytema.re, 1
bytema.sk, 1
byteowls.com, 0
bytes.fyi, 1
bytesatwork.de, 1
byteshark.org, 1
byteshift.ca, 1
@ -5246,6 +5239,7 @@ c-shock.org, 1
c-webdesign.net, 1
c-world.co.uk, 1
c.cc, 1
c0rn3j.com, 1
c16t.uk, 1
c2design.it, 1
c2o-library.net, 1
@ -6075,6 +6069,7 @@ chengl.com, 1
chengtongled.com, 1
chenky.com, 1
chennien.com, 1
chentianyi.cn, 1
chenzhekl.me, 1
cherevoiture.com, 1
cherie-belle.com, 1
@ -6350,7 +6345,7 @@ cirugiasplasticas.com.mx, 1
cirujanooral.com, 1
cirurgicagervasio.com.br, 1
cirurgicalucena.com.br, 1
ciscodude.net, 0
ciscodude.net, 1
cisoaid.com, 1
ciss.ltd, 1
cisy.me, 1
@ -6538,7 +6533,6 @@ cloudbleed.info, 1
cloudbolin.es, 1
cloudbreaker.de, 1
cloudcaprice.net, 1
cloudcert.org, 1
cloudcloudcloud.cloud, 1
cloudflare.com, 1
cloudflareonazure.com, 1
@ -7186,6 +7180,8 @@ cosmundi.de, 1
cosni.co, 1
cosplayer.com, 1
cospol.ch, 1
costa-rica-reisen.ch, 1
costa-rica-reisen.de, 1
costablancavoorjou.com, 1
costinstefan.eu, 1
costreportdata.com, 0
@ -8370,7 +8366,6 @@ deprecate.de, 1
deprobe.pro, 1
depth-co.jp, 1
depthe.gr, 1
der-bank-blog.de, 1
der-gardinenmann.de, 1
der-rudi.eu, 1
der-stein-fluesterer.de, 1
@ -8531,6 +8526,7 @@ devzero.io, 1
dewaard.de, 1
dewalch.net, 1
dewapress.com, 1
dewebwerf.nl, 1
dexalo.de, 1
dezeregio.nl, 1
dezet-ev.de, 1
@ -8591,6 +8587,7 @@ diasp.org, 1
diasporadialogues.com, 1
diavo.de, 1
dibiphp.com, 1
diccionarioabierto.com, 1
diccionariodedudas.com, 1
dice.tokyo, 1
diceduels.com, 1
@ -8653,7 +8650,6 @@ diffnow.com, 1
difoosion.com, 1
digcit.org, 1
digdata.de, 1
diggable.co, 1
dighans.com, 1
digiarc.net, 1
digibild.ch, 1
@ -9426,7 +9422,7 @@ dujsq.com, 1
dujsq.top, 1
dukan-recepty.ru, 1
dukefox.com, 1
dukegat.de, 1
dukegat.de, 0
dukesatqueens.com, 1
duks.com.br, 1
dukun.de, 1
@ -9570,7 +9566,6 @@ e11even.nl, 0
e1488.com, 1
e2feed.com, 1
e30.ee, 1
e3kids.com, 1
e3q.de, 1
e4metech.com, 1
e52888.com, 1
@ -9709,7 +9704,6 @@ ecole-attalens.ch, 1
ecole-iaf.fr, 1
ecoledusabbat.org, 1
ecolemathurincordier.com, 1
ecolesrec.ch, 1
ecolife-vrn.ru, 1
ecompen.co.za, 1
econativa.pt, 1
@ -10319,6 +10313,7 @@ envoyglobal.com, 1
envygeeks.io, 1
eocservices.co.uk, 1
eoitek.com, 1
eolme.ml, 1
eonet.cc, 1
eonhive.com, 1
eoonglobalresources.jp, 1
@ -11054,7 +11049,6 @@ f3nws.com, 1
f42.net, 1
f43.me, 1
f5movies.top, 1
f5nu.com, 1
f5w.de, 1
f8842.com, 1
f9digital.com, 1
@ -11457,7 +11451,6 @@ fialat.cz, 1
fiam.me, 1
fiareapp.red, 0
fibo-forex.org, 1
fibrasynormasdecolombia.com, 1
ficklenote.net, 1
fickweiler.nl, 1
ficlab.com, 1
@ -12171,11 +12164,8 @@ freifahrt.de, 1
freifamily.ch, 1
freifunk-burgaltendorf.de, 1
freifunk-essen.de, 1
freifunk-in-solingen.de, 1
freifunk-lindlar.net, 1
freifunk-luenen.de, 1
freifunk-nrw.de, 1
freifunk-remscheid.de, 1
freimeldungen.de, 1
freims.cc, 1
freiwurst.net, 1
@ -12394,7 +12384,6 @@ furtivelook.com, 1
fusa-miyamoto.jp, 1
fuseos.net, 1
fushee.com, 1
fuskator.com, 1
fussball-xxl.de, 1
fussell.io, 1
futos.de, 1
@ -13091,7 +13080,6 @@ glenshere.com, 1
glidingshop.cz, 1
glidingshop.de, 1
glidingshop.eu, 1
glittersjabloon.nl, 1
glloq.org, 1
glob-coin.com, 1
global-adult-webcams.com, 1
@ -13777,7 +13765,6 @@ hackerone-ext-content.com, 1
hackerone-user-content.com, 1
hackerone.com, 1
hackerone.net, 1
hackerpoints.com, 1
hackerstxt.org, 1
hackgins.com, 1
hackingand.coffee, 1
@ -13978,6 +13965,7 @@ hash.works, 1
hashcat.net, 1
hashes.org, 1
hashi.dk, 1
hashiconf.com, 1
hashiconf.eu, 1
hashicorp.com, 1
hashimah.ca, 1
@ -14400,7 +14388,6 @@ highwaytohoell.de, 1
higilopocht.li, 1
higp.de, 1
hijoan.com, 1
hikagestudios.com, 1
hike.pics, 1
hikinggearlab.com, 1
hikingguy.com, 1
@ -14441,7 +14428,6 @@ hiqfranchise.co.uk, 1
hiqhub.co.uk, 0
hiqonline.co.uk, 1
hirake55.com, 1
hiraku.me, 0
hiratake.xyz, 1
hire-a-coder.de, 1
hireabouncycastle.net, 1
@ -15769,7 +15755,6 @@ intmissioncenter.org, 1
into.technology, 1
inton.biz, 1
intoparking.com, 0
intpforum.com, 1
intracom.com, 1
intradayseasonals.com, 1
intranetsec-regionra.fr, 1
@ -15928,6 +15913,7 @@ isaackabel.ga, 1
isaackabel.gq, 1
isaackabel.ml, 1
isaackabel.tk, 1
isaackhor.com, 0
isaacman.tech, 1
isaacpartnership.co.uk, 1
isaacpartnership.com, 1
@ -16206,7 +16192,6 @@ jabberfr.org, 1
jabberzac.org, 1
jaberg-rutschi.ch, 1
jabergrutschi.ch, 1
jability.ovh, 1
jabjab.de, 1
jaccblog.com, 1
jacekowski.org, 1
@ -16246,7 +16231,6 @@ jake.eu.org, 1
jake.ml, 1
jake.nom.za, 1
jakecurtis.de, 1
jakeguild.com, 1
jakenbake.com, 1
jakereynolds.co, 1
jakerullman.com, 1
@ -17425,7 +17409,6 @@ kevinmeijer.nl, 1
kevinmorssink.nl, 1
kevinpirnie.com, 1
kevinratcliff.com, 1
kevinroebert.de, 1
kevlar.pw, 1
kevyn.lu, 1
kewego.co.uk, 1
@ -18108,7 +18091,6 @@ kyberna.xyz, 1
kybi.sk, 1
kydara.com, 1
kyle.place, 1
kylebaldw.in, 1
kyledrake.net, 1
kylejohnson.io, 1
kylelaker.com, 1
@ -18644,7 +18626,6 @@ leonardcamacho.me, 1
leonauto.de, 1
leonax.net, 1
leondenard.com, 1
leonhooijer.nl, 0
leonklingele.de, 1
leopoldina.net, 1
leovanna.co.uk, 1
@ -18785,6 +18766,7 @@ lianye4.cc, 1
lianye5.cc, 1
lianye6.cc, 1
liaozheqi.cn, 1
liaronce.win, 1
liautard.fr, 1
lib64.net, 1
libbitcoin.org, 1
@ -19156,7 +19138,7 @@ locationvoituresuede.com, 1
locatorplus.gov, 1
locauxrama.fr, 1
locchat.com, 1
locker.email, 1
locker.email, 0
locker3.com, 1
lockify.com, 1
lockpick.nl, 1
@ -19565,6 +19547,7 @@ lynxpro.nl, 1
lyon-interactive.com, 1
lyon-synergie.com, 1
lyoness.digital, 1
lyonl.com, 1
lyricfm.ie, 1
lys.ch, 1
lyscnd.com, 1
@ -19639,7 +19622,6 @@ madae.nl, 1
madars.org, 0
madbin.com, 1
madbouncycastles.co.uk, 1
madcatdesign.de, 1
maddi.biz, 1
maddreefer.com, 1
made-in-earth.co.jp, 1
@ -19935,7 +19917,7 @@ marche-nordic-jorat.ch, 1
marciaimportados.com.br, 1
marcianoandtopazio.com, 1
marco-goltz.de, 1
marco-kretz.de, 1
marco-kretz.de, 0
marco-polo-reisen.com, 1
marcocasoni.com, 1
marcohager.de, 1
@ -20806,6 +20788,7 @@ mightymillionsraffle.com, 1
miguel.pw, 1
migueldemoura.com, 1
migueldominguez.ch, 1
miguelgfierro.com, 1
miguelmartinez.ch, 1
miguelmenendez.pro, 1
miguelmoura.com, 1
@ -20920,6 +20903,7 @@ minerva2015.it, 1
minesouls.fr, 1
minez-nightswatch.com, 0
minf3-games.de, 1
mingming.info, 1
mingram.net, 1
mingwah.ch, 1
mingy.ddns.net, 1
@ -21447,6 +21431,7 @@ movil.uno, 1
moving-pixtures.de, 1
movinglogistics.nl, 0
movingoklahoma.org, 1
movingtohttps.com, 1
movlib.org, 1
mowalls.net, 1
moy.cat, 1
@ -23236,7 +23221,6 @@ ofggolf.com, 1
oflow.me, 1
oftamedic.com, 1
oftn.org, 1
oganime.com, 1
oge.ch, 1
oggw.us, 1
ogis.gov, 1
@ -24904,8 +24888,8 @@ pldx.org, 1
please-deny.me, 1
pleaseuseansnisupportedbrowser.ml, 1
pleasure-science.com, 1
pleier-it.de, 1
pleier.it, 1
pleier-it.de, 0
pleier.it, 0
pleine-conscience.ch, 1
plen.io, 1
plenigo.com, 1
@ -24940,7 +24924,6 @@ plumbingbenoni.co.za, 1
plumlocosoft.com, 1
plumnet.ch, 1
plumpie.net, 0
plural.cafe, 1
plus-5.com, 1
plus.google.com, 1
plus.sandbox.google.com, 1
@ -25815,7 +25798,7 @@ qandavision.com, 0
qapital.com, 1
qbeing.info, 1
qbiju.com.br, 1
qbin.io, 1
qbin.io, 0
qbus.pl, 1
qc.immo, 1
qc.search.yahoo.com, 0
@ -26154,7 +26137,7 @@ rauros.net, 1
rautelow.de, 1
rautermods.net, 1
ravchat.com, 1
raven.dog, 1
raven.dog, 0
ravenger.net, 1
ravengergaming.net, 1
ravensbuch.de, 1
@ -27781,6 +27764,7 @@ schum.world, 1
schumanandmonnet.eu, 1
schummar.de, 1
schunako.ch, 1
schuppentier.org, 1
schurkenstaat.net, 1
schutz-vor-schmutz.de, 1
schutznetze24.de, 1
@ -28851,7 +28835,6 @@ sistel.es, 1
sistem-maklumat.com, 1
sistem-maklumat.com.my, 1
sistemy48.ru, 0
sistersurprise.de, 1
sistimiki-anaparastasi.gr, 1
sisv.eu, 1
sit-brn.ru, 1
@ -29204,6 +29187,7 @@ snip.run, 1
snl.no, 1
snote.io, 1
snoupon.com, 1
snovey.com, 1
snow-online.com, 1
snow-online.de, 1
snow.dog, 1
@ -29302,7 +29286,6 @@ soinvett.com, 1
sojingle.net, 1
soju.fi, 1
sokche.com, 1
sokietech.com, 1
sokkenhoek.nl, 1
sokolkarvina.cz, 1
sokouchousa.net, 1
@ -29531,6 +29514,7 @@ speechndraw.com, 1
speeddate.it, 0
speedof.me, 1
speedracer.ca, 1
speeds.vip, 1
speedsportofhull.co.uk, 1
speedtailors.com, 1
speedtest-russia.com, 1
@ -29611,7 +29595,6 @@ spornkuller.de, 1
sport-in-sundern.de, 1
sport-potreby.cz, 1
sport-potreby.sk, 1
sport-socken.net, 1
sporter.com, 1
sportflash.info, 1
sportnesia.com, 1
@ -29670,7 +29653,6 @@ sqlfeatures.com, 1
sqr-training.com, 1
sqroot.eu, 1
sqshq.de, 1
squadlinx.com, 1
square-gaming.org, 1
square-src.de, 0
square.com, 0
@ -30154,6 +30136,7 @@ studenttenant.com, 1
studer.su, 1
studiemeter.nl, 1
studienportal.eu, 1
studienservice.de, 1
studiereader.nl, 1
studio-architetto.com, 1
studio-fotografico.ru, 1
@ -30201,6 +30184,7 @@ stuudium.org, 1
stuudium.pro, 1
stuur.nl, 0
stuvel.eu, 1
stuvus.uni-stuttgart.de, 1
stw-group.at, 1
stygium.net, 0
styleci.io, 1
@ -30606,7 +30590,6 @@ tab.watch, 1
tabarnak.ga, 1
tabernadovinho.com.br, 1
tabino.top, 1
tabitatsu.jp, 1
tabithawebb.co.uk, 1
tabla-periodica.com, 1
tabledusud.be, 1
@ -30621,7 +30604,6 @@ tacklinglife.com, 1
tacklog.com, 1
tacoma-games.com, 1
tacomafia.net, 0
tacotown.tk, 1
tacticalsquare.com, 1
tadata.me, 1
tadcastercircuit.org.uk, 1
@ -30745,7 +30727,6 @@ taskstream.com, 1
taskulu.com, 1
tasogarenoinori.net, 1
tass.nu, 1
tasticfilm.com, 1
tastycake.net, 1
tastystakes.com, 1
tat2grl85.com, 1
@ -31275,7 +31256,6 @@ thegrape.ro, 1
thegreatplains.com, 1
thegreenfields.se, 1
thegreenmanpottery.com, 1
thegreenpark.co.uk, 1
thegreens.us, 1
thegvoffice.net, 1
thegym.org, 1
@ -31572,7 +31552,6 @@ thw-bernburg.de, 1
thxandbye.de, 1
thyngster.com, 1
thynx.io, 1
thyrex.fr, 1
ti-js.com, 1
ti-pla.net, 1
ti-planet.org, 1
@ -31823,6 +31802,7 @@ tocaro.im, 1
toccoig.com, 1
tochi-urikata.net, 1
todacarreira.com, 1
todaciencia.com, 1
todamateria.com.br, 1
todapolitica.com, 1
todaymeow.com, 1
@ -32250,6 +32230,7 @@ traut.cloud, 1
travador.com, 1
travaux-toiture-idf.fr, 1
travel-dealz.de, 1
travel-to-nature.ch, 1
travel1x1.com, 1
travel365.it, 1
travelarmenia.org, 1
@ -32282,6 +32263,7 @@ treetopsecurity.com, 1
trefcon.cz, 1
trefpuntdemeent.nl, 1
treinaweb.com.br, 0
treinonerd.com, 1
trek-planet.ru, 1
treker.us, 1
trekfriend.com, 1
@ -32466,7 +32448,6 @@ tucsonfcu.com, 1
tucuxi.org, 1
tudiennhakhoa.com, 1
tudorproject.org, 1
tueche.com.ar, 1
tufilo.com, 1
tuincentersnaet.be, 1
tuingereedschappen.net, 0
@ -33357,7 +33338,6 @@ vetofish.com, 1
vets.gov, 1
veverusak.cz, 1
vfdworld.com, 1
vfn-nrw.de, 1
vgatest.nl, 1
vgerak.com, 1
vgolos.zt.ua, 1
@ -33787,7 +33767,6 @@ w50.co.uk, 1
w5gfe.org, 1
w7k.de, 1
w84.it, 1
w9rld.com, 1
wa-stromerzeuger.de, 1
waaw.tv, 1
wabatam.com, 1
@ -33926,6 +33905,7 @@ watertrails.io, 1
waterworkscondos.com, 1
watoo.tech, 1
watsonwork.me, 1
wattechweb.com, 1
wave-ola.es, 1
wave.is, 1
wavesboardshop.com, 1
@ -34612,6 +34592,7 @@ wmawri.com, 1
wmfusercontent.org, 1
wmkowa.de, 1
wmustore.com, 1
wnu.com, 1
wo-ist-elvira.net, 1
wo2forum.nl, 1
wobble.ninja, 1
@ -34955,7 +34936,6 @@ www68277.com, 1
wxcafe.net, 1
wxh.jp, 1
wxrlab.com, 1
wxster.com, 1
wy6.org, 1
wyam.io, 1
wybar.uk, 1
@ -35431,7 +35411,6 @@ yhaupenthal.org, 1
yhb.io, 1
yhong.me, 1
yhori.xyz, 1
yhwj.top, 1
yibaoweilong.top, 1
yibin0831.com, 1
yicknam.my, 1
@ -35536,6 +35515,7 @@ youran.me, 1
yourciso.com, 1
yourcopywriter.it, 1
yourdaddy.dk, 1
yourforex.org, 1
yourfriendlytech.com, 1
yourgames.tv, 1
yoursbookstore.jp, 1
@ -35729,6 +35709,7 @@ zargaripour.com, 1
zargescases.co.uk, 1
zarmarket.org, 1
zarpo.com.br, 1
zary.me, 1
zaufanatrzeciastrona.pl, 1
zavec.com.ec, 1
zavetaji.lv, 1
@ -35872,6 +35853,7 @@ zionvps.com, 0
zip.ch, 1
ziptie.com, 1
zircode.com, 1
ziroh.be, 1
zitseng.com, 1
zittingskalender.be, 1
zivava.ge, 1
@ -35899,7 +35881,7 @@ zodiacohouses.com, 1
zoeller.me, 1
zofrex.com, 1
zohar.shop, 1
zohar.wang, 0
zohar.wang, 1
zoigl.club, 1
zojadravai.com, 1
zoki.art, 1

View File

@ -2,8 +2,9 @@
// http://creativecommons.org/publicdomain/zero/1.0/
"use strict";
// Tests that signed extensions extracted/unpacked into a directory do not pass
// signature verification, because that's no longer supported.
// Tests that signed extensions extracted/unpacked into a directory work pass
// verification when non-tampered, and fail verification when tampered via
// various means.
const { ZipUtils } = ChromeUtils.import("resource://gre/modules/ZipUtils.jsm", {});
@ -26,15 +27,62 @@ var gSignedXPI =
var gTarget = FileUtils.getDir("TmpD", ["test_signed_dir"]);
gTarget.createUnique(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
/**
* Each property below is optional. Defining none of them means "don't tamper".
*
* @typedef {TamperInstructions}
* @type Object
* @property {String[][]} copy
* Format: [[path,newname], [path2,newname2], ...]
* Copy the file located at |path| and name it |newname|.
* @property {String[]} delete
* List of paths to files to delete.
* @property {String[]} corrupt
* List of paths to files to corrupt.
*/
/**
* Extracts the signed XPI into a directory, and tampers the files in that
* directory if instructed.
*
* @param {TamperInstructions} tamper
* Instructions on whether to tamper any files, and if so, how.
* @returns {nsIFile}
* The directory where the XPI was extracted to.
*/
function prepare() {
function prepare(tamper) {
ZipUtils.extractFiles(gSignedXPI, gTarget);
// copy files
if (tamper.copy) {
tamper.copy.forEach(i => {
let f = gTarget.clone();
i[0].split("/").forEach(seg => { f.append(seg); });
f.copyTo(null, i[1]);
});
}
// delete files
if (tamper.delete) {
tamper.delete.forEach(i => {
let f = gTarget.clone();
i.split("/").forEach(seg => { f.append(seg); });
f.remove(true);
});
}
// corrupt files
if (tamper.corrupt) {
tamper.corrupt.forEach(i => {
let f = gTarget.clone();
i.split("/").forEach(seg => { f.append(seg); });
let s = FileUtils.openFileOutputStream(f, FileUtils.MODE_WRONLY);
const str = "Kilroy was here";
s.write(str, str.length);
s.close();
});
}
return gTarget;
}
@ -48,8 +96,8 @@ function checkResult(expectedRv, dir, resolve) {
};
}
function verifyDirAsync(expectedRv) {
let targetDir = prepare();
function verifyDirAsync(expectedRv, tamper) {
let targetDir = prepare(tamper);
return new Promise((resolve, reject) => {
certdb.verifySignedDirectoryAsync(
Ci.nsIX509CertDB.AddonsPublicRoot, targetDir,
@ -57,8 +105,93 @@ function verifyDirAsync(expectedRv) {
});
}
add_task(async function testAPIFails() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_NOT_SIGNED);
//
// the tests
//
add_task(async function testValid() {
await verifyDirAsync(Cr.NS_OK, {} /* no tampering */);
});
add_task(async function testNoMetaDir() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_NOT_SIGNED,
{delete: ["META-INF"]});
});
add_task(async function testEmptyMetaDir() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_NOT_SIGNED,
{delete: ["META-INF/mozilla.rsa",
"META-INF/mozilla.sf",
"META-INF/manifest.mf"]});
});
add_task(async function testTwoRSAFiles() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{copy: [["META-INF/mozilla.rsa", "extra.rsa"]]});
});
add_task(async function testCorruptRSAFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{corrupt: ["META-INF/mozilla.rsa"]});
});
add_task(async function testMissingSFFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{delete: ["META-INF/mozilla.sf"]});
});
add_task(async function testCorruptSFFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{corrupt: ["META-INF/mozilla.sf"]});
});
add_task(async function testExtraInvalidSFFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY,
{copy: [["META-INF/mozilla.rsa", "extra.sf"]]});
});
add_task(async function testExtraValidSFFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY,
{copy: [["META-INF/mozilla.sf", "extra.sf"]]});
});
add_task(async function testMissingManifest() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{delete: ["META-INF/manifest.mf"]});
});
add_task(async function testCorruptManifest() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID,
{corrupt: ["META-INF/manifest.mf"]});
});
add_task(async function testMissingFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_ENTRY_MISSING,
{delete: ["bootstrap.js"]});
});
add_task(async function testCorruptFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY,
{corrupt: ["bootstrap.js"]});
});
add_task(async function testExtraFile() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY,
{copy: [["bootstrap.js", "extra"]]});
});
add_task(async function testMissingFileInDir() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_ENTRY_MISSING,
{delete: ["lib/ui.js"]});
});
add_task(async function testCorruptFileInDir() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY,
{corrupt: ["lib/ui.js"]});
});
add_task(async function testExtraFileInDir() {
await verifyDirAsync(Cr.NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY,
{copy: [["lib/ui.js", "extra"]]});
});
registerCleanupFunction(function() {

View File

@ -242,6 +242,7 @@ user_pref("browser.contentHandlers.types.5.uri", "http://test1.example.org/rss?u
// We want to collect telemetry, but we don't want to send in the results.
user_pref("toolkit.telemetry.server", "https://%(server)s/telemetry-dummy/");
user_pref("datareporting.healthreport.uploadEnabled", false);
// Don't send 'new-profile' ping on new profiles during tests, otherwise the testing framework
// might wait on the pingsender to finish and slow down tests.
user_pref("toolkit.telemetry.newProfilePing.enabled", false);

View File

@ -178869,6 +178869,18 @@
{}
]
],
"service-workers/service-worker/svg-target-reftest.https.html": [
[
"/service-workers/service-worker/svg-target-reftest.https.html",
[
[
"/service-workers/service-worker/resources/svg-target-reftest-001.html",
"=="
]
],
{}
]
],
"shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html": [
[
"/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html",
@ -281857,6 +281869,11 @@
{}
]
],
"images/colors.svg": [
[
{}
]
],
"images/fail.gif": [
[
{}
@ -289222,6 +289239,11 @@
{}
]
],
"service-workers/service-worker/resources/pass-through-worker.js": [
[
{}
]
],
"service-workers/service-worker/resources/pass.txt": [
[
{}
@ -289452,6 +289474,21 @@
{}
]
],
"service-workers/service-worker/resources/svg-target-reftest-001-frame.html": [
[
{}
]
],
"service-workers/service-worker/resources/svg-target-reftest-001.html": [
[
{}
]
],
"service-workers/service-worker/resources/svg-target-reftest-frame.html": [
[
{}
]
],
"service-workers/service-worker/resources/test-helpers.sub.js": [
[
{}
@ -485312,7 +485349,7 @@
"support"
],
"css/css-fonts/font-feature-settings-serialization-001.html": [
"d1032e08aee1e9a7d1309ad94bd5633535ce9315",
"bf557e7f93663a36dab3ea358401b16c2e88811a",
"testharness"
],
"css/css-fonts/font-features-across-space-1-ref.html": [
@ -537440,7 +537477,7 @@
"testharness"
],
"dom/events/event-disabled-dynamic.html": [
"2a358fff53f3f6eb14ff87520a84e68f10533c9f",
"40ab5636653dfd105738ab38e7d22316132eb630",
"testharness"
],
"dom/historical.html": [
@ -538792,7 +538829,7 @@
"support"
],
"domparsing/XMLSerializer-serializeToString.html": [
"71314752b8552c19b0951647594b9c5c85ca01b6",
"0ff2295477d3d2d690b19976eceae8a8a79720fe",
"testharness"
],
"domparsing/createContextualFragment.html": [
@ -542884,7 +542921,7 @@
"support"
],
"fetch/nosniff/script.html": [
"762b6033a5b75465417f9921f7d06781ad036cbe",
"812bf9d241272d5fb455d36e156b4d15474e8306",
"testharness"
],
"fetch/nosniff/stylesheet.html": [
@ -562855,6 +562892,10 @@
"16f9dc971ee76bcc71599af602a04b9b64e960d2",
"support"
],
"images/colors.svg": [
"6ebe57def787860ab404f2be9536a0e081d50bb6",
"support"
],
"images/fail.gif": [
"a4dad89f8247eef2a574d1d96b0d188e84f1b57f",
"support"
@ -563132,7 +563173,7 @@
"support"
],
"interfaces/dom.idl": [
"52236516620dac45213fa06dc169f0c02e63a0c5",
"773c449a2f9a6bd9e35d0dd8a4c2e1eaa0266150",
"support"
],
"interfaces/fullscreen.idl": [
@ -584371,6 +584412,10 @@
"df15579b54fc14412435eee789c81a6523a394fc",
"support"
],
"service-workers/service-worker/resources/pass-through-worker.js": [
"9bea44e9ab6d8452aadc57d5e6d5a1eaa017ac78",
"support"
],
"service-workers/service-worker/resources/pass.txt": [
"27d2303f215d7d1a8f12f0b80b9b56a2cdf6c9a7",
"support"
@ -584555,6 +584600,18 @@
"628bc36bef749e1a2ffda104f71a17acee69b13b",
"support"
],
"service-workers/service-worker/resources/svg-target-reftest-001-frame.html": [
"898cb16d911e94eb36506a07c6cceae41d9bcbda",
"support"
],
"service-workers/service-worker/resources/svg-target-reftest-001.html": [
"31ca62ad01049549f05ec52dda828defcbe2ac6e",
"support"
],
"service-workers/service-worker/resources/svg-target-reftest-frame.html": [
"0f7bf8a7cccb1fb4aa5948fb7a684857006b295f",
"support"
],
"service-workers/service-worker/resources/test-helpers.sub.js": [
"fee1648c02422cd2607b008b9a1ef0834385c69c",
"support"
@ -584683,6 +584740,10 @@
"ecb0e2fd22e7c92a98ae612a2032a92edf8520d9",
"testharness"
],
"service-workers/service-worker/svg-target-reftest.https.html": [
"c8d97ffed68ca40b4154bde36d9a0ca65d2e3816",
"reftest"
],
"service-workers/service-worker/synced-state.https.html": [
"c6a3d6e8aa7a70e1bc670f89192240bac081bfe9",
"testharness"

View File

@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="100" height="50">
<style>use:not(:target) { display: none; }</style>
<defs>
<rect id="green-box" fill="#00ff00" width="100" height="50"/>
<rect id="red-box" fill="#ff0000" width="100" height="50"/>
</defs>
<use id="green" xlink:href="#green-box"/>
<use id="red" xlink:href="#red-box"/>
</svg>

After

Width:  |  Height:  |  Size: 411 B

View File

@ -0,0 +1,3 @@
addEventListener('fetch', evt => {
evt.respondWith(fetch(evt.request));
});

View File

@ -0,0 +1,3 @@
<!DOCTYPE html>
<meta charset="utf-8">
<img src="/images/green.svg">

View File

@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Green svg box reference file</title>
<p>Pass if you see a green box below.</p>
<iframe src="svg-target-reftest-001-frame.html">

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<img src="/images/colors.svg#green">

View File

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>Service worker interception does not break SVG fragment targets</title>
<meta name="assert" content="SVG with link fragment should render correctly when intercepted by a service worker.">
<script src="resources/test-helpers.sub.js"></script>
<link rel="match" href="resources/svg-target-reftest-001.html">
<p>Pass if you see a green box below.</p>
<script>
// We want to use utility functions designed for testharness.js where
// there is a test object. We don't have a test object in reftests
// so fake one for now.
const fake_test = { step_func: f => f };
async function runTest() {
const script = './resources/pass-through-worker.js';
const scope = './resources/svg-target-reftest-frame.html';
let reg = await navigator.serviceWorker.register(script, { scope });
await wait_for_state(fake_test, reg.installing, 'activated');
let f = await with_iframe(scope);
document.documentElement.classList.remove('reftest-wait');
await reg.unregister();
// Note, we cannot remove the frame explicitly because we can't
// tell when the reftest completes.
}
runTest();
</script>
</html>

View File

@ -41,6 +41,7 @@ skip-if = os == "android" # checking for telemetry needs to be updated: 1384923
[test_ext_legacy_extension_embedding.js]
[test_ext_localStorage.js]
[test_ext_management.js]
skip-if = (os == "win" && !debug) #Bug 1419183 disable on Windows
[test_ext_management_uninstall_self.js]
[test_ext_onmessage_removelistener.js]
skip-if = true # This test no longer tests what it is meant to test.

View File

@ -253,6 +253,8 @@ tags = blocklist
[test_signed_updatepref.js]
run-if = addon_signing
skip-if = require_signing || !allow_legacy_extensions
[test_signed_verify.js]
run-if = addon_signing
[test_signed_inject.js]
run-if = addon_signing
# Bug 1394122

View File

@ -59,7 +59,5 @@ tags = webextensions
[test_schema_change.js]
[test_registerchrome.js]
[test_system_allowed.js]
[test_signed_verify.js]
run-if = addon_signing
[include:xpcshell-shared.ini]

View File

@ -2380,6 +2380,7 @@ moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
{
style = GetStyleContext(widget);
moz_gtk_add_border_padding(style, left, top, right, bottom);
*top = *bottom = 0;
return MOZ_GTK_SUCCESS;
}
/* These widgets have no borders, since they are not containers. */