Pier Angelo Vendrame pushed to branch base-browser-115.9.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • dom/base/Document.cpp
    ... ... @@ -4103,10 +4103,11 @@ void Document::SetDocumentURI(nsIURI* aURI) {
    4103 4103
       }
    
    4104 4104
     }
    
    4105 4105
     
    
    4106
    -static void GetFormattedTimeString(PRTime aTime,
    
    4106
    +static void GetFormattedTimeString(PRTime aTime, bool aUniversal,
    
    4107 4107
                                        nsAString& aFormattedTimeString) {
    
    4108 4108
       PRExplodedTime prtime;
    
    4109
    -  PR_ExplodeTime(aTime, PR_LocalTimeParameters, &prtime);
    
    4109
    +  PR_ExplodeTime(aTime, aUniversal ? PR_GMTParameters : PR_LocalTimeParameters,
    
    4110
    +                 &prtime);
    
    4110 4111
       // "MM/DD/YYYY hh:mm:ss"
    
    4111 4112
       char formatedTime[24];
    
    4112 4113
       if (SprintfLiteral(formatedTime, "%02d/%02d/%04d %02d:%02d:%02d",
    
    ... ... @@ -4124,7 +4125,9 @@ void Document::GetLastModified(nsAString& aLastModified) const {
    4124 4125
       if (!mLastModified.IsEmpty()) {
    
    4125 4126
         aLastModified.Assign(mLastModified);
    
    4126 4127
       } else {
    
    4127
    -    GetFormattedTimeString(PR_Now(), aLastModified);
    
    4128
    +    GetFormattedTimeString(PR_Now(),
    
    4129
    +                           ShouldResistFingerprinting(RFPTarget::Unknown),
    
    4130
    +                           aLastModified);
    
    4128 4131
       }
    
    4129 4132
     }
    
    4130 4133
     
    
    ... ... @@ -11053,7 +11056,8 @@ void Document::RetrieveRelevantHeaders(nsIChannel* aChannel) {
    11053 11056
     
    
    11054 11057
       mLastModified.Truncate();
    
    11055 11058
       if (modDate != 0) {
    
    11056
    -    GetFormattedTimeString(modDate, mLastModified);
    
    11059
    +    GetFormattedTimeString(
    
    11060
    +        modDate, ShouldResistFingerprinting(RFPTarget::Unknown), mLastModified);
    
    11057 11061
       }
    
    11058 11062
     }
    
    11059 11063