[Thali-talk] 'self' support to JxCore?

Sreejumon Purayil purayil at microsoft.com
Fri Jun 19 12:10:38 EDT 2015


Hi Yaron,

The failure is from catptured_trace.js file.

06-19 09:02:46.946  11427-11427/? E/jxcore-log﹕ ReferenceError:
06-19 09:02:46.946  11427-11427/? E/jxcore-log﹕ self is not defined
06-19 09:02:46.946  11427-11427/? E/jxcore-log﹕ (/data/data/org.thaliproject.postcardapp/files/www/jxcore/node_modules/express-pouchdb/node_modules/bluebird/js/main/captured_trace.js 464:16)
06-19 09:02:46.946  11427-11427/? E/jxcore-log﹕ at module.exports/fireGlobalEvent</< (/data/data/org.thaliproject.postcardapp/files/www/jxcore/node_modules/express-pouchdb/node_modules/bluebird/js/main/captured_trace.js:464:17)
            at module.exports/CapturedTrace.fireRejectionEvent (/data/data/org.thaliproject.postcardapp/files/www/jxcore/node_modules/express-pouchdb/node_modules/bluebird/js/main/captured_trace.js:229:28)

Regards
Sreejumon

From: Yaron Goland
Sent: Friday, June 19, 2015 8:38 AM
To: Oguz Bastemur; Sreejumon Purayil
Cc: Matthew Podwysocki; thali-talk at thaliproject.org
Subject: RE: 'self' support to JxCore?

Note: I’m moving this thread to the public alias.

Issue: We are using Bluebird as part of Express-PouchDB and when we run it on JXCore it fails because it expects to find a ‘self’ variable. Sreejmon is working around this by setting “global.self = global” but he is wondering if this is a more general problem.

Oguz pointed out that this is a browser thing, Node doesn’t do this and therefore Bluebird might be confused about where it is running.

Oguz: Bluebird is a very widely used library so my guess is that if it’s confused then it’s likely to be because JXCore isn’t doing something it is expecting. Something like that isn’t going to just bite us here.

Sreejumon: What line did the request fail on? I did a search https://github.com/petkaantonov/bluebird/search?utf8=%E2%9C%93&q=self+extension%3Ajs+path%3Asrc&type=Code and self only seems to be used in a few places.

               Thanks,

                              Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist10.pair.net/pipermail/thali-talk/attachments/20150619/11b1b3c6/attachment-0001.html>


More information about the Thali-talk mailing list