- Electron version:
  1.3.3
- Operating system:
  OSX El Capitan 10.11.6

The following code crashes Electron. The dev tools don't open, but the HTML element highlights like it is open.

``` javascript
selfBrowserWindow.webContents.openDevTools({mode: 'detach'})
selfBrowserWindow.inspectElement(rightClickPosition.x, rightClickPosition.y)
```

The reason I'm doing this is because I want to open the dev tools detached, then inspect. Calling inspectElement first will open the dev tools docked by default.

atom/browser/api/atom_api_web_contents.cc
gfx::Rect rect;
  base::Callback<void(const gfx::Image&)> callback;
  if (!(args->Length() == 1 && args->GetNext(&callback)) &&
      !(args->Length() == 2 && args->GetNext(&rect)
                            && args->GetNext(&callback))) {
    args->ThrowError();
    return;
  }
  const auto view = web_contents()->GetRenderWidgetHostView();
  const auto host = view ? view->GetRenderWidgetHost() : nullptr;
  if (!view || !host) {
    callback.Run(gfx::Image());
    return;
  }
  
  const gfx::Size view_size = rect.IsEmpty() ? view->GetViewBounds().size() :
                                               rect.size();