Skip to content

Commit

Permalink
Port changes from electron_4 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas101 committed Feb 11, 2019
1 parent 67cad2b commit 0b3ddfa
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 82 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
sudo: required
dist: trusty
language: node_js
node_js: "10.2.0"
node_js: "10.11.0"
before_install:
- npm i -g npm@6.2.0
- npm i -g npm@6.4.1
install:
- npm install
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Here's how to build Wavebox from source.
Before you get started you'll need the following

* Python 2.7
* Nodejs 10.2.1
* Nodejs 10.11.0
* npm >= 6.4.1
* Wavebox API Key
* Download & install Wavebox for free
Expand Down
212 changes: 139 additions & 73 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"colors": "1.3.3",
"copy-webpack-plugin": "4.6.0",
"css-loader": "2.1.0",
"electron": "3.0.15",
"electron": "4.0.2",
"electron-rebuild": "1.8.4",
"file-loader": "3.0.1",
"fs-extra": "7.0.1",
Expand Down Expand Up @@ -101,8 +101,8 @@
"parser": "babel-eslint"
},
"electronInstallEnv": {
"ELECTRON_MIRROR": "https://electron-wb.s3.us-east-2.amazonaws.com/",
"ELECTRON_CUSTOM_DIR": "wb_4_5_15"
"xELECTRON_MIRROR": "https://electron-wb.s3.us-east-2.amazonaws.com/",
"xELECTRON_CUSTOM_DIR": "wb_4_5_15"
},
"pre-commit": [
"validate"
Expand Down
8 changes: 8 additions & 0 deletions src/app/src/Services/MetricsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ class MetricsService {
// Build the final metrics
const metrics = app.getAppMetrics().map((metric) => {
return {
//TODO: electron4 deprication
memory: {
pid: metric.pid,
workingSetSize: 0,
peakWorkingSetSize: 0,
privateBytes: 0,
sharedBytes: 0
},
...metric,
webContentsInfo: webContentsByPid.get(metric.pid)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ class MailboxesWindowTabManager {
if (!wc) { return undefined }

const pid = wc.getOSProcessId()
return app.getAppMetrics().find((metric) => metric.pid === pid)
//TODO: electron4 deprication: return app.getAppMetrics().find((metric) => metric.pid === pid)
return undefined
}

/* ****************************************************************************/
Expand Down
22 changes: 22 additions & 0 deletions src/scenes/wbui/Guest/WebView/WebView.js
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,28 @@ class WebView extends React.Component {
})
}

send = (...args) => {
//TODO: this is a hack a needs fixing
let res
try {
res = this.getWebviewNode().send(...args)
} catch (ex) {
console.log('webview.send failed', ex)
}
return res
}

executeJavaScript = (...args) => {
//TODO: this is a hack a needs fixing
let res
try {
res = this.getWebviewNode().executeJavaScript(...args)
} catch (ex) {
console.log('webview.executeJavaScript failed', ex)
}
return res
}

/* **************************************************************************/
// Rendering
/* **************************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ gracefulFs.gracefulify(fs)

module.exports = function (env = {}) {
// Config
process.env.CHROME_TARGET = 66
process.env.NODE_TARGET = '10.2.0'
process.env.CHROME_TARGET = 69
process.env.NODE_TARGET = '10.11.0'

const mode = new Set([
'production',
Expand Down

0 comments on commit 0b3ddfa

Please sign in to comment.