File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,12 @@ void ObjectManager::OnCallObjectMethod(
137
137
const std::string& type,
138
138
const std::string& method,
139
139
const base::ListValue& arguments) {
140
+ #if 0
140
141
DLOG(INFO) << "OnCallObjectMethod: object_id:" << object_id
141
142
<< " type:" << type
142
143
<< " method:" << method
143
144
<< " arguments:" << arguments;
144
-
145
+ # endif
145
146
Base* object = GetApiObject (object_id);
146
147
if (object)
147
148
object->Call (method, arguments, rvh);
Original file line number Diff line number Diff line change @@ -24,8 +24,9 @@ function Menu (option) {
24
24
privates ( this ) . items = [ ] ;
25
25
privates ( this ) . option = option ;
26
26
27
+ var items = privates ( this ) . items ;
27
28
nw . Obj . create ( id , 'Menu' , option ) ;
28
- messagingNatives . BindToGC ( this , nw . Obj . destroy . bind ( undefined , id ) , - 1 ) ;
29
+ messagingNatives . BindToGC ( this , function ( ) { items . forEach ( function ( element ) { element . _destroy ( ) ; } ) ; nw . Obj . destroy ( id ) ; } , - 1 ) ;
29
30
} ;
30
31
31
32
Menu . prototype . __defineGetter__ ( 'items' , function ( ) {
Original file line number Diff line number Diff line change @@ -97,10 +97,14 @@ function MenuItem(option) {
97
97
98
98
if ( ! option . native )
99
99
nw . Obj . create ( id , 'MenuItem' , option ) ;
100
- messagingNatives . BindToGC ( this , nw . Obj . destroy . bind ( undefined , id ) , - 1 ) ;
100
+ messagingNatives . BindToGC ( this , function ( ) { nw . Obj . destroy ( id ) ; } , - 1 ) ;
101
101
102
102
}
103
103
104
+ MenuItem . prototype . _destroy = function ( ) {
105
+ menuItems . objs [ this . id ] = null ;
106
+ } ;
107
+
104
108
util . inherits ( MenuItem , EventEmitter ) ;
105
109
106
110
MenuItem . prototype . handleGetter = function ( name ) {
You can’t perform that action at this time.
0 commit comments