void completeWithError(WebContentDecryptionModuleException code, unsigned long systemCode, const WebString& message) override
 {
     // Non-zero |systemCode| is appended to the |message|. If the |message|
     // is empty, we'll report "Rejected with system code (systemCode)".
     String errorString = message;
     if (systemCode != 0) {
         if (errorString.isEmpty())
             errorString.append("Rejected with system code");
         errorString.append(" (" + String::number(systemCode) + ")");
     }
     (*m_failureCallback)(WebCdmExceptionToExceptionCode(code), errorString);
 }
void ContentDecryptionModuleResultPromise::completeWithError(WebContentDecryptionModuleException exceptionCode, unsigned long systemCode, const WebString& errorMessage)
{
    // Non-zero |systemCode| is appended to the |errorMessage|. If the
    // |errorMessage| is empty, we'll report "Rejected with system code
    // (systemCode)".
    String errorString = errorMessage;
    if (systemCode != 0) {
        if (errorString.isEmpty())
            errorString.append("Rejected with system code");
        errorString.append(" (" + String::number(systemCode) + ")");
    }
    reject(WebCdmExceptionToExceptionCode(exceptionCode), errorString);
}