Issue 1:
i find my program can not clear cookies ,if i used 0.36.1 both mac and win.

then i do a test.

code is here:

"use strict"
const app = require('electron').app
const BrowserWindow = require('electron').BrowserWindow

app.on('window-all-closed', () => {
app.quit()
})

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

let mainWindow = new BrowserWindow({
"width": 800,
"height": 800,
"center": true
})

let mainWindowContents = mainWindow.webContents

let session = mainWindowContents.session

mainWindowContents.loadURL("https://www.google.com.hk")

mainWindowContents.on('did-stop-loading', () => {

// get all cookies and remove them
session.cookies.get({}, (error, cookies) => {
let len = cookies.length
console.log(len)
cookies.forEach((cookie) => {
let name = cookie.name
session.cookies.remove({
name: name
}, function(error) {
console.log(name)
})
})
})

})

})

in 0.36.1,it not working, and catch a error:

TypeError: Error processing argument -1.
at TypeError (native)
at /Users/linchao/Documents/code/electron-test/main.js:31:23
at Array.forEach (native)
at Function.<anonymous> (/Users/linchao/Documents/code/electron-test/main.js:28:13)

but the test code working fine before 0.36.1,will console cookies num and display all removed cookies names.

thanks.

Issue 2:
Hello,

While executing our test codes. clearing cookies test case was failing in 0.36.1, Attached the sample stack trace.

Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
Error: Could not call remote function `remove`. Check that the function signature is correct. Underlying error: Error processing argument -1.
at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
at EventEmitter.<anonymous> (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
at emitMany (events.js:108:13)
at EventEmitter.emit (events.js:182:7)
at EventEmitter.<anonymous> (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
at callFunction (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:186:13)
at EventEmitter.<anonymous> (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/lib/rpc-server.js:281:14)
at emitMany (events.js:108:13)
at EventEmitter.emit (events.js:182:7)
at EventEmitter.<anonymous> (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/browser/api/lib/web-contents.js:101:27)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
at metaToValue (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:108:15)
at RemoteMemberFunction [as remove] (/Applications/electron-v0.36.1-darwin-x64/Electron.app/Contents/Resources/atom.asar/renderer/api/lib/remote.js:142:26)
at Object.util.cookies._delete (<anonymous>:6:45)

Env :

Electron : 0.36.1

Mac : OS x El captain

Works fine in : 0.36.0