Commit 94bf7d9f authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[d8] Throw in d8.log.getAndStop() if log file does not exist

This prevents CF from crashing and assuming it's a security issue
for flaky bots.

Bug: chromium:1152525
Change-Id: Ie782e55705e3bdbf2742ccd711f6544a71235b33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2599748Reviewed-by: 's avatarSathya Gunasekaran  <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71850}
parent c84213ef
......@@ -1592,7 +1592,10 @@ void Shell::LogGetAndStop(const v8::FunctionCallbackInfo<v8::Value>& args) {
std::string raw_log;
FILE* log_file = i_isolate->logger()->TearDownAndGetLogFile();
CHECK_NOT_NULL(log_file);
if (!log_file) {
Throw(isolate, "Log file does not exist.");
return;
}
bool exists = false;
raw_log = i::ReadFile(log_file, &exists, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment