- Electron version: 1.2.2
- Operating system: Linux

This is a problem only in linux. It works in OSX.

``` javascript
win.hide()
win.capturePage(function(img){
 // never called
})
```

shell/browser/api/electron_api_web_contents.cc
gin::HContents> WebContents::CreateFromWebPreferences(
    v8::Isolate* isolate,
    const gin_helper::Dictionary& web_preferences) {
   Check if webPreferences has |webContents| option.
  gin::HContents> ontents;
  if (web_preferences.GetHidden("webContents", &ontents) &&
      !ontents.IsEmpty()) {
     Set webPreferences from options if using an existing webContents.
     These preferences will be used when the webContent launches new
     render processes.
    auto* existing_preferences =
        WebContentsPreferences::From(ontents->ontents());
    base::DictionaryValue web_preferences_dict;
    if (gin::ConvertFromV8(isolate, web_preferences.GetHandle(),
                           &web_preferences_dict)) {
      existing_preferences->Clear();
      existing_preferences->Merge(web_preferences_dict);
    }
  } else {
     Create one if not.
    ontents = WebContents::New(isolate, web_preferences);
  }
  return ontents;
}
 static