chore: cleanup usages of const char* (#29906)

This commit is contained in:
David Sanders 2021-07-01 17:51:52 -07:00 committed by GitHub
parent f6531166ae
commit 95a9ff952c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 19 deletions

View file

@ -211,7 +211,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
promise_.Resolve(value);
}
} else {
const char* error_message =
const char error_message[] =
"Script failed to execute, this normally means an error "
"was thrown. Check the renderer console for the error.";
if (!callback_.is_null()) {
@ -226,7 +226,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
promise_.RejectWithErrorMessage(error_message);
}
} else {
const char* error_message =
const char error_message[] =
"WebFrame was removed before script could run. This normally means "
"the underlying frame was destroyed";
if (!callback_.is_null()) {
@ -705,7 +705,7 @@ class WebFrameRenderer : public gin::Wrappable<WebFrameRenderer>,
script.Get("startLine", &start_line);
if (!script.Get("code", &code)) {
const char* error_message = "Invalid 'code'";
const char error_message[] = "Invalid 'code'";
if (!completion_callback.is_null()) {
std::move(completion_callback)
.Run(v8::Undefined(isolate),