* Output of `node_modules/.bin/electron --version`: 3.0.0 x86
* Operating System (Platform and Version): win7 sp1 x64

**Expected Behavior**
to make it easy to differentiate success from failure, error should be null/undefined on success

**Actual behavior**
error is an empty object
```
[2018-09-26T02:17:14.805Z] sendCommand callback:
error: {}
result: {}
```

**To Reproduce**
run the following
```js
'use strict';

const {app, BrowserWindow} = require('electron'),
      OFFSCREEN = true;

let win;

if (OFFSCREEN)
  app.disableHardwareAcceleration();

app.on('ready', () => {

  win = new BrowserWindow({
    width: 1440,
    height: 900,
    useContentSize: true,
    show: !OFFSCREEN,
    webPreferences: {
      nodeIntegration: false,
      partition: 'memory_partition_1',
      offscreen: OFFSCREEN
    },
  });

  if (OFFSCREEN) {
    win.webContents.setFrameRate(1);
    win.webContents.stopPainting();
  }

  win.webContents.on('did-stop-loading', event => {
    log('did-stop-loading: %s', win.webContents.getURL());
    setTimeout(exit, 2000);
  });


  const dev = win.webContents.debugger;
  dev.attach();
  dev.on('message', (event, method, params) => {
    log('%s:\n%O', method, params);
  });

  log('before sendCommand');
  dev.sendCommand('Page.enable', {}, (error, result) => log('sendCommand callback:\nerror: %O\nresult: %O', error, result));
  log('after sendCommand');

  setTimeout(() => {
    log('before loadURL');
    win.loadURL('http://example.org/');
    log('after loadURL');
  });

});

function log(msg, ...args) {
  console.log(`[${new Date().toISOString()}] ${msg}\n`, ...args);
}

function exit() {
  log('exiting');
  app.exit();
}
```
atom/browser/api/atom_api_debugger.cc
content::RenderFrameHost* new_rfh) {
  if (agent_host_) {
    agent_host_->DisconnectWebContents();
    auto* web_contents = content::WebContents::FromRenderFrameHost(new_rfh);
    agent_host_->ConnectWebContents(web_contents);
  }
}
void Debugger::Attach(mate::Arguments* args) {
  std::string protocol_version;
  args->GetNext(&protocol_version);
  if (agent_host_) {
    args->ThrowError("Debugger is already attached to the target");
    return;
  }
  if (!protocol_version.empty() &&
      !DevToolsAgentHost::IsSupportedProtocolVersion(protocol_version)) {
    args->ThrowError("Requested protocol version is not supported");
    return;
  }
  agent_host_ = DevToolsAgentHost::GetOrCreateFor(web_contents_);
  if (!agent_host_) {
    args->ThrowError("No target available");
    return;
  }
  agent_host_->AttachClient(this);
}
bool Debugger::IsAttached() {
  return agent_host_ && agent_host_->IsAttached();
}
void Debugger::Detach() {