File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -156,12 +156,13 @@ void DispatcherHost::OnCallObjectMethod(
156
156
<< " arguments:" << arguments;
157
157
158
158
Base* object = GetApiObject (object_id);
159
- DLOG (WARNING) << " Unknown object: " << object_id
159
+ if (object)
160
+ object->Call (method, arguments);
161
+ else
162
+ DLOG (WARNING) << " Unknown object: " << object_id
160
163
<< " type:" << type
161
164
<< " method:" << method
162
165
<< " arguments:" << arguments;
163
- if (object)
164
- object->Call (method, arguments);
165
166
}
166
167
167
168
void DispatcherHost::OnCallObjectMethodSync (
Original file line number Diff line number Diff line change @@ -64,6 +64,6 @@ exports.Window = {
64
64
options . object_id = id ;
65
65
var routing_id = nw . createShell ( url , options ) ;
66
66
67
- return new global . Window ( routing_id , options [ 'new-instance' ] , id ) ;
67
+ return new global . Window ( routing_id , true , id ) ;
68
68
}
69
69
} ;
Original file line number Diff line number Diff line change @@ -191,6 +191,11 @@ Shell::~Shell() {
191
191
}
192
192
}
193
193
194
+ if (!is_devtools_ && id_ > 0 ) {
195
+ nwapi::DispatcherHost* dhost = nwapi::FindDispatcherHost (web_contents_->GetRenderViewHost ());
196
+ dhost->OnDeallocateObject (id_);
197
+ }
198
+
194
199
for (size_t i = 0 ; i < windows_.size (); ++i) {
195
200
if (windows_[i] == this ) {
196
201
windows_.erase (windows_.begin () + i);
You can’t perform that action at this time.
0 commit comments