Handle empty handles (#11598)
* Handle empty handles * Close and dispose window at end of void test * Dispose of existing window before running void 0 spec
This commit is contained in:
parent
181169b743
commit
9bd7d53cf8
3 changed files with 23 additions and 10 deletions
|
@ -340,7 +340,7 @@ WebContents::WebContents(v8::Isolate* isolate, const mate::Dictionary& options)
|
|||
// Obtain the session.
|
||||
std::string partition;
|
||||
mate::Handle<api::Session> session;
|
||||
if (options.Get("session", &session)) {
|
||||
if (options.Get("session", &session) && !session.IsEmpty()) {
|
||||
} else if (options.Get("partition", &partition)) {
|
||||
session = Session::FromPartition(isolate, partition);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue