[Verification] Code compiles without errors.
Below code works without any JS errors (special Power
chromium message is ignored):
tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.release("SCREEN");
TCT passrate for Power module is 100% (A & M).
Change-Id: I2b2cf3d97442389b722db8a9943e5c98f1a0d0cf
Signed-off-by: Piotr Kosko <p.kosko@samsung.com>
try {
var msg = JSON_.parse(json);
} catch (error) {
+ // Because of special handling of power lock in chromium, the special signals:
+ // - __DisableChromiumInternalPowerLock
+ // - __EnableChromiumInternalPowerLock
+ // could occur. In such cases we are silently ignroing those messages.
+ // TODO This is workaround for missing patch in chromium-efl package which should handle
+ // this special message and don't forward it to webapi JS. After chromium-efl will
+ // be updated, below checking should be removed.
+ if (json.substring(0,2) === '__') {
+ return;
+ }
xwalk.utils.error('Invalid JSON received: ' + json);
+ return;
}
var id;