fix: optional postMessage transfer arg (#32433)
This commit is contained in:
parent
1aaa0fad69
commit
6c88e3b8e7
3 changed files with 14 additions and 2 deletions
|
@ -210,7 +210,7 @@ void WebFrameMain::PostMessage(v8::Isolate* isolate,
|
|||
}
|
||||
|
||||
std::vector<gin::Handle<MessagePort>> wrapped_ports;
|
||||
if (transfer) {
|
||||
if (transfer && !transfer.value()->IsUndefined()) {
|
||||
if (!gin::ConvertFromV8(isolate, *transfer, &wrapped_ports)) {
|
||||
isolate->ThrowException(v8::Exception::Error(
|
||||
gin::StringToV8(isolate, "Invalid value for transfer")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue