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

Yaron Goland yarong at microsoft.com
Mon Jun 22 13:27:04 EDT 2015


Sreejumon, can you please load the Bluebird project into something like webstorm and find where Bluebird defines self. How does that code work? That should help us narrow down the cause of the bug.
               Thanks,

                              Yaron

From: Oguz Bastemur [mailto:obastemur at nubisa.com]
Sent: Friday, June 19, 2015 9:41 AM
To: Sreejumon Purayil
Cc: Yaron Goland; Matthew Podwysocki; thali-talk at thaliproject.org
Subject: Re: 'self' support to JxCore?

AFAIK the jxcore users don’t have an issue with bluebird.

I’ve just test jxcore SM with bluebird sample app and it worked straight.

Oguz

On Jun 19, 2015, at 6:10 PM, Sreejumon Purayil <purayil at microsoft.com<mailto:purayil at microsoft.com>> wrote:

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<mailto: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/20150622/f4dbb74c/attachment.html>


More information about the Thali-talk mailing list