refactor: pass internal flag via IPC message struct for consistency (#16490)

This commit is contained in:
Milan Burda 2019-01-23 17:24:57 +01:00 committed by Shelley Vohr
parent 0a5adfe365
commit cc90919384
12 changed files with 103 additions and 65 deletions

View file

@ -114,11 +114,12 @@ class AtomSandboxedRenderFrameObserver : public AtomRenderFrameObserver {
auto context = renderer_client_->GetContext(frame, isolate);
v8::Context::Scope context_scope(context);
v8::Local<v8::Value> argv[] = {mate::ConvertToV8(isolate, channel),
v8::Local<v8::Value> argv[] = {mate::ConvertToV8(isolate, internal),
mate::ConvertToV8(isolate, channel),
mate::ConvertToV8(isolate, args),
mate::ConvertToV8(isolate, sender_id)};
renderer_client_->InvokeIpcCallback(
context, internal ? "onInternalMessage" : "onMessage",
context, "onMessage",
std::vector<v8::Local<v8::Value>>(argv, argv + node::arraysize(argv)));
}