chore: cleanup usages of const char* (#29906)
This commit is contained in:
parent
f6531166ae
commit
95a9ff952c
8 changed files with 18 additions and 19 deletions
|
@ -41,11 +41,10 @@ namespace api {
|
|||
|
||||
namespace context_bridge {
|
||||
|
||||
const char* const kProxyFunctionPrivateKey = "electron_contextBridge_proxy_fn";
|
||||
const char* const kSupportsDynamicPropertiesPrivateKey =
|
||||
const char kProxyFunctionPrivateKey[] = "electron_contextBridge_proxy_fn";
|
||||
const char kSupportsDynamicPropertiesPrivateKey[] =
|
||||
"electron_contextBridge_supportsDynamicProperties";
|
||||
const char* const kOriginalFunctionPrivateKey =
|
||||
"electron_contextBridge_original_fn";
|
||||
const char kOriginalFunctionPrivateKey[] = "electron_contextBridge_original_fn";
|
||||
|
||||
} // namespace context_bridge
|
||||
|
||||
|
@ -439,7 +438,7 @@ void ProxyFunctionWrapper(const v8::FunctionCallbackInfo<v8::Value>& info) {
|
|||
did_error = true;
|
||||
v8::Local<v8::Value> exception = try_catch.Exception();
|
||||
|
||||
const char* err_msg =
|
||||
const char err_msg[] =
|
||||
"An unknown exception occurred in the isolated context, an error "
|
||||
"occurred but a valid exception was not thrown.";
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue