projects
/
platform
/
framework
/
web
/
wrtjs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41543b9
)
Resolve JS errors in electron apps
44/214144/3
author
surya.kumar7
<surya.kumar7@samsung.com>
Thu, 19 Sep 2019 15:15:04 +0000
(20:45 +0530)
committer
surya.kumar7
<surya.kumar7@samsung.com>
Thu, 19 Sep 2019 15:15:18 +0000
(20:45 +0530)
webApplication object was used without guard in electron
apps
Change-Id: I86aa1b57e4e964be5041ba96f1488a9aaab2e3d2
Signed-off-by: surya.kumar7 <surya.kumar7@samsung.com>
wrt_app/src/runtime.js
patch
|
blob
|
history
diff --git
a/wrt_app/src/runtime.js
b/wrt_app/src/runtime.js
index
dc69391
..
5fac1f4
100755
(executable)
--- a/
wrt_app/src/runtime.js
+++ b/
wrt_app/src/runtime.js
@@
-168,11
+168,13
@@
class Runtime {
});
wrt.on('resume', function() {
console.log('resume');
- _this.webApplication.resume(_this.addonManager.evt_emitter_);
+ if (_this.webApplication)
+ _this.webApplication.resume(_this.addonManager.evt_emitter_);
});
wrt.on('low-memory', function() {
console.log('low-memory');
- _this.webApplication.lowMemory();
+ if (_this.webApplication)
+ _this.webApplication.lowMemory();
});
wrt.on('wgt-installed', function(event, path) {
console.log('wgt-installed at ' + path);