Title: [224790] trunk/Source/WebKit
Revision
224790
Author
[email protected]
Date
2017-11-13 15:25:00 -0800 (Mon, 13 Nov 2017)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (224789 => 224790)


--- trunk/Source/WebKit/ChangeLog	2017-11-13 23:21:31 UTC (rev 224789)
+++ trunk/Source/WebKit/ChangeLog	2017-11-13 23:25:00 UTC (rev 224790)
@@ -1,3 +1,16 @@
+2017-11-13  Alex Christensen  <[email protected]>
+
+        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.
+
 2017-11-07  Brian Burg  <[email protected]>
 
         Web Automation: inViewCenterPoint should not include topContentInset when computed in viewport coordinates

Modified: trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp (224789 => 224790)


--- trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp	2017-11-13 23:21:31 UTC (rev 224789)
+++ trunk/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp	2017-11-13 23:25:00 UTC (rev 224790)
@@ -323,13 +323,16 @@
 
     auto temporaryFileHandle = invalidPlatformFileHandle;
     String temporaryFilePath = openTemporaryFile("ContentRuleList", temporaryFileHandle);
-    if (temporaryFileHandle == invalidPlatformFileHandle)
+    if (temporaryFileHandle == invalidPlatformFileHandle) {
+        WTFLogAlways("Content Rule List compiling failed: Opening temporary file failed.");
         return ContentRuleListStore::Error::CompileFailed;
+    }
     
     char invalidHeader[ContentRuleListFileHeaderSize];
     memset(invalidHeader, 0xFF, sizeof(invalidHeader));
     // This header will be rewritten in CompilationClient::finalize.
     if (writeToFile(temporaryFileHandle, invalidHeader, sizeof(invalidHeader)) == -1) {
+        WTFLogAlways("Content Rule List compiling failed: Writing header to file failed.");
         closeFile(temporaryFileHandle);
         return ContentRuleListStore::Error::CompileFailed;
     }
@@ -337,20 +340,26 @@
     CompilationClient compilationClient(temporaryFileHandle, metaData);
     
     if (auto compilerError = compileRuleList(compilationClient, WTFMove(json))) {
+        WTFLogAlways("Content Rule List compiling failed: Compiling failed.");
         closeFile(temporaryFileHandle);
         return compilerError;
     }
     if (compilationClient.hadErrorWhileWritingToFile()) {
+        WTFLogAlways("Content Rule List compiling failed: Writing to file failed.");
         closeFile(temporaryFileHandle);
         return ContentRuleListStore::Error::CompileFailed;
     }
     
     mappedData = adoptAndMapFile(temporaryFileHandle, 0, metaData.fileSize());
-    if (mappedData.isNull())
+    if (mappedData.isNull()) {
+        WTFLogAlways("Content Rule List compiling failed: Mapping file failed.");
         return ContentRuleListStore::Error::CompileFailed;
+    }
 
-    if (!moveFile(temporaryFilePath, finalFilePath))
+    if (!moveFile(temporaryFilePath, finalFilePath)) {
+        WTFLogAlways("Content Rule List compiling failed: Moving file failed.");
         return ContentRuleListStore::Error::CompileFailed;
+    }
 
     return { };
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to