Changeset 224790 in webkit


Ignore:
Timestamp:
Nov 13, 2017 3:25:00 PM (6 years ago)
Author:
achristensen@apple.com
Message:

Add logs to debug content extension test failures
https://bugs.webkit.org/show_bug.cgi?id=179624

Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp:

(API::compiledToFile):
Right now I'm seeing this log:
"Rule list compilation failed: Unspecified error during compile."
I need more information to debug what is failing on the bots.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r224789 r224790  
     12017-11-13  Alex Christensen  <achristensen@webkit.org>
     2
     3        Add logs to debug content extension test failures
     4        https://bugs.webkit.org/show_bug.cgi?id=179624
     5
     6        Reviewed by Chris Dumez.
     7
     8        * UIProcess/API/APIContentRuleListStore.cpp:
     9        (API::compiledToFile):
     10        Right now I'm seeing this log:
     11        "Rule list compilation failed: Unspecified error during compile."
     12        I need more information to debug what is failing on the bots.
     13
    1142017-11-07  Brian Burg  <bburg@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp

    r224635 r224790  
    324324    auto temporaryFileHandle = invalidPlatformFileHandle;
    325325    String temporaryFilePath = openTemporaryFile("ContentRuleList", temporaryFileHandle);
    326     if (temporaryFileHandle == invalidPlatformFileHandle)
     326    if (temporaryFileHandle == invalidPlatformFileHandle) {
     327        WTFLogAlways("Content Rule List compiling failed: Opening temporary file failed.");
    327328        return ContentRuleListStore::Error::CompileFailed;
     329    }
    328330   
    329331    char invalidHeader[ContentRuleListFileHeaderSize];
     
    331333    // This header will be rewritten in CompilationClient::finalize.
    332334    if (writeToFile(temporaryFileHandle, invalidHeader, sizeof(invalidHeader)) == -1) {
     335        WTFLogAlways("Content Rule List compiling failed: Writing header to file failed.");
    333336        closeFile(temporaryFileHandle);
    334337        return ContentRuleListStore::Error::CompileFailed;
     
    338341   
    339342    if (auto compilerError = compileRuleList(compilationClient, WTFMove(json))) {
     343        WTFLogAlways("Content Rule List compiling failed: Compiling failed.");
    340344        closeFile(temporaryFileHandle);
    341345        return compilerError;
    342346    }
    343347    if (compilationClient.hadErrorWhileWritingToFile()) {
     348        WTFLogAlways("Content Rule List compiling failed: Writing to file failed.");
    344349        closeFile(temporaryFileHandle);
    345350        return ContentRuleListStore::Error::CompileFailed;
     
    347352   
    348353    mappedData = adoptAndMapFile(temporaryFileHandle, 0, metaData.fileSize());
    349     if (mappedData.isNull())
     354    if (mappedData.isNull()) {
     355        WTFLogAlways("Content Rule List compiling failed: Mapping file failed.");
    350356        return ContentRuleListStore::Error::CompileFailed;
    351 
    352     if (!moveFile(temporaryFilePath, finalFilePath))
     357    }
     358
     359    if (!moveFile(temporaryFilePath, finalFilePath)) {
     360        WTFLogAlways("Content Rule List compiling failed: Moving file failed.");
    353361        return ContentRuleListStore::Error::CompileFailed;
     362    }
    354363
    355364    return { };
Note: See TracChangeset for help on using the changeset viewer.