Commit graph

6476 commits

Author SHA1 Message Date
Cheng Zhao
48a11bd237 Weak map only needs to be deleted for once 2015-12-03 17:10:14 +08:00
Cheng Zhao
eb8426269f Remove itself from the cleanup list when it is destroyed 2015-12-03 17:04:40 +08:00
Cheng Zhao
1e7c8c9fda It is fine to leak a V8 handle on exit 2015-12-03 16:33:57 +08:00
Cheng Zhao
117b7462de window.id is no longer available when window is closed 2015-12-03 16:17:10 +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
6795bd1d96 Do not manually manage native resources
We should rely on the destructor to cleanup everything, instead of
putting them in the Destroy method.
2015-12-03 15:38:43 +08:00
Cheng Zhao
e5358d405a Make sure V8 Function passed to native code are destroyed on UI thread 2015-12-03 11:24:33 +08:00
Charlie Hess
b1391270ed This spec is a little unreliable; up the timeout. 2015-12-02 18:40:57 -08:00
Charlie Hess
b369d4991e Write a spec for downloading from the webview tag. 2015-12-02 18:40:39 -08:00
Charlie Hess
0d30a8d70c Make downloadURL available on the webview tag. 2015-12-02 18:40:02 -08:00
Charlie Hess
5839df66e4 Document the new method. 2015-12-02 13:49:42 -08:00
Charlie Hess
c311c6cf1b Add a DownloadURL method on WebContents. 2015-12-02 13:49:30 -08:00
Jeff Wear
225fe72d03 Ensure that window.open does not override the child options
Fixes https://github.com/atom/electron/issues/3652.
2015-12-02 12:00:51 -08:00
Jeff Wear
32e949efed Read window size properly in window.open test
`BrowserWindow#getSize` returns `[width, height]`, not `{width, height}`.
2015-12-02 11:50:44 -08:00
Cléverton Heming
0553b9c672 Add electron-br 2015-12-02 15:27:23 +00:00
Plusb Preco
75c28ff993 Update as upstream 2015-12-03 00:21:34 +09:00
Plusb Preco
cc841242b5 Merge remote-tracking branch 'refs/remotes/atom/master' 2015-12-03 00:21:28 +09:00
Cheng Zhao
4252c17db0 Merge pull request #3660 from atom/tray-custom-menu
Add `menu` parameter for Tray.popUpContextMenu
2015-12-02 20:55:02 +08:00
Cheng Zhao
47b74ff820 Merge pull request #3659 from lukeapage/patch-1
Update debugging-main-process.md
2015-12-02 19:59:43 +08:00
Cheng Zhao
615ce45849 win: Implement menu parameter 2015-12-02 19:58:10 +08:00
Cheng Zhao
3cdd0f35c7 mac: Implement menu parameter 2015-12-02 19:05:22 +08:00
Cheng Zhao
2fba05b5e7 Add menu parameter for Tray.popUpContextMenu 2015-12-02 18:43:11 +08:00
Luke Page
9567599698 Update debugging-main-process.md 2015-12-02 10:23:21 +00:00
Cheng Zhao
202475f5a9 Deprecating a property with method of same name causes trouble
Close #3511.
2015-12-02 17:29:58 +08:00
Cheng Zhao
c493bec089 Make sure temp file will be cleaned up when base::Move fails 2015-12-02 11:36:29 +08:00
Cheng Zhao
c3645e3f95 Don't call Move if there is no need to move 2015-12-02 11:07:48 +08:00
Cheng Zhao
c691094aa1 spec: Fix failing tests on win32 2015-12-02 11:00:28 +08:00
Cheng Zhao
0d50e08ed1 Merge pull request #3648 from jviotti/jviotti/fix/exec-file-asar-bat
🏁 Preserve file extension when extracting from asar
2015-12-02 10:45:24 +08:00
Cheng Zhao
17f4bf2ce8 Merge pull request #3650 from arturts/patch-5
📝 [ci skip] Update to match english docs, fix typos
2015-12-02 10:21:10 +08:00
Cheng Zhao
8122d63cd2 Merge pull request #3649 from arturts/pt-BR-auto-updater
📝 [ci skip] Add translation to auto-updater, change links
2015-12-02 10:20:58 +08:00
Artur de Oliveira Tsuda
5cae8397cc 📝 [ci skip] fix more typos 2015-12-01 21:57:07 -02:00
Artur de Oliveira Tsuda
9a93ecc3cf 📝 [ci skip] fix typos 2015-12-01 21:46:13 -02:00
Artur de Oliveira Tsuda
d76e21853b Change header 2015-12-01 21:38:25 -02:00
Artur de Oliveira Tsuda
229dc02a41 📝 [ci skip] Update to match english docs, fix typos 2015-12-01 21:34:35 -02:00
Artur de Oliveira Tsuda
1b1c4bec4e 📝 [ci skip] Add translation to auto-updater, change links 2015-12-01 21:09:20 -02:00
Juan Cruz Viotti
a99c193cf2 🏁 Preserve file extension when extracting from asar
Currently, when calling `copyFileOut`, the original extension from the
file is lost, and a generic `*.tmp` is added instead.

This becomes problematic in the scenario where we use
`child_process.execFile` on a Windows Batch script that lives inside the
`asar` package.

Windows relies on the extension being present in order to interpret the
script accordingly, which results in the following bug because the
operating system doesn't know what do to with this `*.tmp` file:

```
Error: spawn UNKNOWN
```

Steps to reproduce:

1. Create a dummy batch script (test.bat):

```
@echo off
echo "Hello world"
```

2. Create an electron app that attemps to call this script with
`child_process.execFile`:

```js
var child_process = require('child_process');
var path = require('path');

child_process.execFile(path.join(__dirname, 'test.bat'), function(error, stdout) {
    if (error) throw error;
    console.log(stdout);
});
```

3. Package this small application as an asar archive:

```sh
> asar pack mytestapp app.asar
```

4. Execute the application:

```sh
> electron.exe app.asar
```
2015-12-01 14:55:58 -04:00
Cheng Zhao
85b7aa6933 Merge pull request #3645 from atom/fix-page-title-set
Delay the page-title-updated event to next tick
2015-12-01 19:12:34 +08:00
Cheng Zhao
e5974e44ed Deprecate the page-title-set event
We have two names for the same event, page-title-updated wins.
2015-12-01 18:50:56 +08:00
Cheng Zhao
c95117fb22 Delay the page-title-set event to next tick 2015-12-01 18:34:58 +08:00
Cheng Zhao
83ee78451a Emit event when title becomes empty 2015-12-01 17:53:13 +08:00
Cheng Zhao
8d20dda6d7 No need to override TitleWasSet in NativeWindow 2015-12-01 17:51:09 +08:00
Cheng Zhao
782af41c7c Merge pull request #3643 from atom/fix-did-fail-load-crash
Delay the did-fail-provisional-load event to next tick
2015-12-01 17:19:52 +08:00
Cheng Zhao
1b3eb1cc5d Delay the did-fail-provisional-load event to next tick
Chrome is doing some stuff after the DidFailProvisionalLoad event, if we
call LoadURL at this time crash would happen.
2015-12-01 17:00:42 +08:00
Cheng Zhao
0f17a0163d Put common constants in atom_constants 2015-12-01 16:21:15 +08:00
Cheng Zhao
a2f1390b0d Merge pull request #3641 from atom/process-no-asar
Add process.noAsar to toggle asar support
2015-12-01 14:40:37 +08:00
Cheng Zhao
165b464a15 docs: process.noAsar 2015-12-01 13:43:52 +08:00
Cheng Zhao
900dc78a47 spec: process.noAsar 2015-12-01 13:09:50 +08:00
Cheng Zhao
e3ec1fe8ab Add process.noAsar to turn off asar support 2015-12-01 13:09:37 +08:00
Cheng Zhao
757b644909 Merge pull request #3567 from atom/cors
Enable all origins via CORS header for custom schemes
2015-12-01 12:43:38 +08:00
Paul Betts
7fd1db192b Lint harder 2015-11-30 18:12:00 -08:00