Closed jaszhix closed 7 years ago
Using native parsing would effectively run code from an untrusted source (yahoo). Do you really want yahoo running arbitrary javascript code in your cinnamon desktop?
I don't. Fortunately, that has nothing to do with this issue, nor is it possible as CJS can't run browser JS without modification.
Edit: Here's the MDN documentation for JSON.parse
, it does everything Soup's seemingly pointless abstraction does, but more concisely. You may be confusing this with eval
.
Hello,
This issue is being closed because development is moving to linuxmint/cinnamon-spices/applets. Feel free to reopen your issue there.
Please see the release announcement here:
http://segfault.linuxmint.com/2017/01/changes-to-cinnamon-spices-for-developer-and-artists/
Linux Mint 18.1 Cinnamon 3.2.7 Weather 1.13.7
For some reason the applet only loads once on a fresh boot. If I restart Cinnamon or the applet, the http request never completes. When I comment out this try-catch block, it works every time. I can see this might not be an issue if someone never restarts Cinnamon, but I think there must be a way to debug this. I see this in glass.log a lot every day:
It seems like we could replace this with JSON.parse and have native formatting of the weather object. It would require rewriting all the lines accessing the object but would be a lot easier to read and debug.
When I import Main and add
Main._logInfo(message.response_body.data)
on L370, I seeSo maybe when results is null, we could recurse the object for x amount of times, checking its value. I'm not sure why the request would return null, but I'm guessing its Soup's fault. I found this, which also might be useful.