File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,8 @@ NwCurrentWindowInternalCloseFunction::Run() {
154
154
}
155
155
156
156
void NwCurrentWindowInternalShowDevToolsInternalFunction::OnOpened () {
157
- Release ();
158
157
Respond (NoArguments ());
158
+ Release ();
159
159
}
160
160
161
161
ExtensionFunction::ResponseAction
@@ -167,12 +167,12 @@ NwCurrentWindowInternalShowDevToolsInternalFunction::Run() {
167
167
DevToolsWindow::OpenDevToolsWindow (web_contents);
168
168
DevToolsWindow* devtools_window =
169
169
DevToolsWindow::FindDevToolsWindow (agent.get ());
170
- if (devtools_window)
171
- devtools_window->SetLoadCompletedCallback (base::Bind (&NwCurrentWindowInternalShowDevToolsInternalFunction::OnOpened, this ));
172
- else
170
+ if (devtools_window) {
171
+ AddRef ();
172
+ devtools_window->SetLoadCompletedCallback (base::Bind (&NwCurrentWindowInternalShowDevToolsInternalFunction::OnOpened, base::Unretained (this )));
173
+ } else
173
174
return RespondNow (NoArguments ());
174
175
175
- AddRef ();
176
176
return RespondLater ();
177
177
}
178
178
You can’t perform that action at this time.
0 commit comments