Commit graph

193 commits

Author SHA1 Message Date
Kevin Sawicki
b1f679ff6d Clean up semicolon lint errors 2016-01-21 09:32:21 -07:00
Kevin Sawicki
70bcb0ac5a Clean up no-unused-vars lint errors 2016-01-21 09:32:21 -07:00
Cheng Zhao
3b62ce7fa6 modules.exports => module.exports 2016-01-16 14:26:01 +08:00
Kevin Sawicki
f830af49c2 Use ES6 style class 2016-01-15 15:30:01 -08:00
Kevin Sawicki
2b95aeba3c Declare vars one per line 2016-01-15 10:17:45 -08:00
Jessica Lord
1779701445 Use const 2016-01-14 14:40:12 -08:00
Kevin Sawicki
030d2a843c Remove extra newlines around comments 2016-01-14 11:10:12 -08:00
Kevin Sawicki
990dc30e8d Use // for multi-line comments 2016-01-14 10:44:21 -08:00
Kevin Sawicki
f4af744519 Use // for single line comments 2016-01-14 10:35:29 -08:00
Cheng Zhao
af02739c4e Change webview's zoom level on JavaScript side 2016-01-13 12:50:02 +08:00
Cheng Zhao
55dfddba77 Handle executeJavaScript in JavaScript 2016-01-13 12:11:46 +08:00
Kevin Sawicki
1f9691ae13 Convert all source files to JavaScript 2016-01-12 16:24:06 -08:00
Kevin Sawicki
403870a27e Migrate to block comments 2016-01-12 16:22:34 -08:00
Cheng Zhao
2294a5ce69 Leak FunctionTemplateHandle
They are cached through the app's lifetime, and freeing them at the
right time is complicate, so just leak them.
2015-12-29 10:40:10 +08:00
Cheng Zhao
d8d963b780 Cache function templates created by CreateObjectWithName 2015-12-29 10:29:48 +08:00
Cheng Zhao
3d2163230b Optimize the case when creating plain object 2015-12-28 22:51:40 +08:00
Cheng Zhao
353f08e477 Remove sync call in remote module 2015-12-17 22:03:16 +08:00
Kevin Sawicki
67c0de36a3 📝 Add missing period 2015-12-15 16:47:19 -08:00
Kevin Sawicki
d44a9d1fcc 🎨 Remove parens 2015-12-15 16:46:53 -08:00
Kevin Sawicki
aedfd3bf0e Add specs for companyName/submitURL being required 2015-12-15 16:44:38 -08:00
Kevin Sawicki
80e9631220 Use better signature match in deprecation message 2015-12-15 16:27:01 -08:00
Kevin Sawicki
524649797f Make companyName and submitURL required options 2015-12-15 16:22:31 -08:00
Kevin Sawicki
dcc99dd5cb Remove duplicate start calls 2015-12-15 16:10:04 -08:00
Cheng Zhao
73e7773d84 Update to API changes of Chrome 47 2015-12-07 19:56:23 +08:00
Cheng Zhao
a15f9fab5b Use BuildPrototype to build prototype
This saves the step of manually keeping the global template object,
which is easy to forget then leak.
2015-12-03 16:04:46 +08:00
Cheng Zhao
cfdcfcbd80 Add executable permission in CopyFileOut 2015-11-27 22:06:37 +08:00
Juan Cruz Viotti
585ff9062c 🐛 Fix missing execution permission bit in execFile override
Consider an electron application that uses `execFile` to run a script
that lives within the application code base:

```coffee
child_process = require 'child_process'
child_process.execFile __dirname + '/script.sh', (error) ->
  throw error if error?
```

An application like this will fail when being packaged in an `asar` with
an following error:

```
Error: spawn EACCES
```

Electron overrides certain `fs` functions to make them work within an
`asar` package. In the case of `execFile`, the file to be executed is
extracted from the `asar` package into a temporary file and ran from
there.

The problem is that during the extraction, the original permissions of
the file are lost.

We workaround this by:

1. Extending `asar.stat` to return whether a file is executable or not,
  which is information that's already saved in the `asar` header.

2. Setting execution permissions on the extracted file if the above
  property holds true.

Fixes: https://github.com/atom/electron/issues/3512
2015-11-26 23:30:23 -04:00
Cheng Zhao
94e24abb99 Use the new style remote module in Electron 2015-11-13 22:22:25 +08:00
Cheng Zhao
e8ffd24e4e Rename the "clicked" event to "click" in Tray 2015-11-13 16:41:33 +08:00
Cheng Zhao
fbb8e61958 Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
Cheng Zhao
852500e5fa Fix a few places using old style require 2015-11-13 09:38:22 +08:00
Cheng Zhao
2ca5a33d28 Add electron.hideInternalModules 2015-11-12 21:46:03 +08:00
Cheng Zhao
8b2942c279 Optimize remote.require('electron') 2015-11-12 20:30:40 +08:00
Cheng Zhao
1d1f911b09 Use require('electron') in Electron's code 2015-11-12 20:29:30 +08:00
Cheng Zhao
c2c09daa23 Add "electron" module 2015-11-12 16:40:27 +08:00
Cheng Zhao
f0bd28ca8d Do not turn off deprecation notice by default
It is v4 now, people should be punished if they are still using
deprecated Node.js APIs.
2015-11-09 21:19:16 +08:00
Cheng Zhao
89ff62b1b5 Add "deprecate" module 2015-11-09 21:19:16 +08:00
Cheng Zhao
47649ffd17 win: Fix calling showItemInFolder in renderer process 2015-11-05 20:47:27 +08:00
Cheng Zhao
cb91d4487b Clean up the code handling renderer callback 2015-10-31 15:00:06 +08:00
Robo
2c59f4567e use webcontents id to identify callbacks 2015-10-30 19:51:19 +05:30
Robo
3a154ab8ea add line and column values to callback id 2015-10-29 21:21:30 +05:30
Robo
ac4df34ecd create binding to idweakmap 2015-10-29 17:51:56 +05:30
Robo
eae7c840b7 use idweakmap for holding callbacks in browser 2015-10-29 17:51:56 +05:30
Robo
62d15953ff remote: track listeners for browser side 2015-10-29 17:51:56 +05:30
Cheng Zhao
f399f50e9e Fix calling showItemInFolder in renderer
The remote method always assumes the existence of the remote object but
doesn't keep a reference to it, so if we only keep the reference of a
remote method we will get into troubles once the remote object is
garbage collected.

We should probably fix this in remote module, but since most things are
already working quite good, I'm using the work-around for now.

Fix #3139.
2015-10-26 16:48:27 +08:00
Cheng Zhao
6bfe06ec4e Pass original argv in callback 2015-10-22 19:02:21 +08:00
Cheng Zhao
d9fdfb711f Clean up CallbackRegistry
There were some ancient code there.
2015-10-16 20:25:30 +08:00
Ben Gotow
aeb24b784d Allow "released callback" errors to be traced to remote calls 2015-10-15 18:46:59 -07:00
Cheng Zhao
7b57a945f8 mac: Set process.mas to true for MAS build 2015-10-14 11:53:52 +08:00
Cheng Zhao
df12f181a4 Can not print string16 in wcout on POSIX 2015-10-10 17:43:56 +08:00