Closed
Bug 1082052
Opened 9 years ago
Closed 9 years ago
[Messages][Refactoring] Return a Promise from SMIL.parse
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(b2g-master fixed)
RESOLVED
FIXED
FxOS-S3 (24Jul)
Tracking | Status | |
---|---|---|
b2g-master | --- | fixed |
People
(Reporter: julienw, Assigned: julienw, Mentored)
References
()
Details
(Whiteboard: [good first bug][lang=js][sms-FxOS-S3])
Attachments
(1 file)
SMIL.parse uses a callback to return its result. We should convert it to use a Promise instead. The code is located in smil.js and is unit-tested, therefore it should be a good first bug for someone wanting to work on Gaia.
Comment 1•9 years ago
|
||
Hi Julienw Here we have to use Window.promise instead of window.smil and other related to this in smil.js. Right? Thanks
Assignee | ||
Comment 2•9 years ago
|
||
We have to return a promise instead of calling the callback, and change where it's called. Not sure I understand your question though!
Assignee | ||
Comment 3•9 years ago
|
||
Note that another contributor asked me by mail to work on this. Rishav, since you start to be used to work on the SMS app, I think it's better if you let someone else take this "good first bug" :)
Comment 4•9 years ago
|
||
Yes, sure :)
Comment 5•9 years ago
|
||
Hey I'd like to work on this bug. First Gaia bug for me. How do i begin?
Comment 6•9 years ago
|
||
Hi anirudh Hope you build the Gaia in your system, if not then follow this to build it first https://developer.mozilla.org/en-US/Firefox_OS Thanks
Assignee | ||
Comment 7•9 years ago
|
||
Hi Anirudh! You can find some information about how to run the SMS app in Firefox in [1]. You'll also find information about unit tests in [2]. Please come on IRC (irc.mozilla.org, #gaia and #gaia-messaging) if you want to discuss directly! [1] https://github.com/julienw/gaia/blob/1082618-sms-readme/apps/sms/README.md [2] https://developer.mozilla.org/en-US/Firefox_OS/Platform/Automated_testing/Gaia_unit_tests
Comment 8•9 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #7) > Hi Anirudh! > > You can find some information about how to run the SMS app in Firefox in Hey I'm building gaia on my Linux PC. I'll get on with it as soon as its done building. Thanks!
Assignee | ||
Comment 9•9 years ago
|
||
Ok, adding you as assignee for now :) Please report if you decide to not work on this again. Thanks!
Assignee: nobody → anirudh.gp
Comment 10•9 years ago
|
||
After generating the debug profile, when i run firefox -profile /home/gp/mozilla-source/firefox/mozilla-central/gaia/profile-sms, I get this: (process:7318): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed Firefox opens up with "chrome/branding/locale/browserconfig.properties" at the web address box and the contents of the page are : "browser.startup.homepage=about:home" Is this how its supposed to be have i done something wrong?
URL: Attachments
Updated•9 years ago
|
Flags: needinfo?(felash)
Assignee | ||
Comment 11•9 years ago
|
||
(In reply to anirudh.gp from comment #10) > After generating the debug profile, when i run firefox -profile > /home/gp/mozilla-source/firefox/mozilla-central/gaia/profile-sms, I get this: You really need to launch firefox using: firefox --no-remote -profile /home/gp/mozilla-source/firefox/mozilla-central/gaia/profile-sms app://sms.gaiamobile.org > (process:7318): GLib-CRITICAL **: g_slice_set_config: assertion > 'sys_page_size == 0' failed The error appears for me too, I don't know what it means. > Firefox opens up with "chrome/branding/locale/browserconfig.properties" at > the web address box > and the contents of the page are : "browser.startup.homepage=about:home" > Is this how its supposed to be have i done something wrong? This is strange, but please follow the directions :)
Flags: needinfo?(felash)
Comment 12•9 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #11) > (In reply to anirudh.gp from comment #10) > > After generating the debug profile, when i run firefox -profile > > /home/gp/mozilla-source/firefox/mozilla-central/gaia/profile-sms, I get this: > > You really need to launch firefox using: > > firefox --no-remote -profile > /home/gp/mozilla-source/firefox/mozilla-central/gaia/profile-sms > app://sms.gaiamobile.org > > > (process:7318): GLib-CRITICAL **: g_slice_set_config: assertion > > 'sys_page_size == 0' failed > > The error appears for me too, I don't know what it means. > > > Firefox opens up with "chrome/branding/locale/browserconfig.properties" at > > the web address box > > and the contents ohpposed to be have i done something wrong? > > This is strange, but please follow the directions :) Thanks :) That worked! T
Assignee | ||
Comment 13•9 years ago
|
||
Hey Anirudh, could you move forward here? :)
Flags: needinfo?(anirudh.gp)
Comment 14•9 years ago
|
||
I'm not well versed with javascript yet so i dont know how to convert it to return a promise. Can you help me?
Flags: needinfo?(anirudh.gp)
Assignee | ||
Comment 15•9 years ago
|
||
About Promises, I suggest to first read [1]. Please read this resource very thoroughly, and if you have questions after reading it, I'd suggest you come on IRC (irc.mozilla.org, channel #gaia or #gaia-messaging) and we can discuss. [1] http://www.html5rocks.com/en/tutorials/es6/promises/
Comment 16•9 years ago
|
||
I could give a shot at this bug. But I have a question. I see that parse might accept an array of attachments. You can especially see this in |attachments.forEach(SMIL_parseWithoutSMIL);| How would the promise workout here? Because for every blob processing it seems there is |exitPoint()| is called. So that I understand correctly exitPoint IS a returning spot from the function?
Flags: needinfo?(felash)
Comment 17•9 years ago
|
||
(In reply to Alexey Novak from comment #16) > I could give a shot at this bug. > But I have a question. I see that parse might accept an array of > attachments. You can especially see this in > |attachments.forEach(SMIL_parseWithoutSMIL);| How would the promise workout > here? Because for every blob processing it seems there is |exitPoint()| is > called. So that I understand correctly exitPoint IS a returning spot from > the function? There is an idea that replacing all the activeReaders related function into promise(readTextBlob/convertWbmpToPng), and replace exitPoint with Promise.all to wait for all the promises completed and return slides.
Flags: needinfo?(felash)
Updated•9 years ago
|
Blocks: sms-refactoring
Summary: [Messages] Return a Promise from SMIL.parse → [Messages][Refactoring] Return a Promise from SMIL.parse
Assignee | ||
Comment 19•9 years ago
|
||
Actually taking it, I need it to make my life easier in bug 1162030.
Assignee: nobody → felash
Comment 20•9 years ago
|
||
Assignee | ||
Comment 21•9 years ago
|
||
Comment on attachment 8635336 [details] [review] [gaia] julienw:1082052-smil-promises > mozilla-b2g:master Hey Oleg, how does it look ?
Attachment #8635336 -
Flags: review?(azasypkin)
Assignee | ||
Updated•9 years ago
|
Whiteboard: [good first bug][lang=js] → [good first bug][lang=js][sms-FxOS-S3]
Comment 22•9 years ago
|
||
Comment on attachment 8635336 [details] [review] [gaia] julienw:1082052-smil-promises > mozilla-b2g:master Looks good, left some questions and nits at github. Thanks!
Attachment #8635336 -
Flags: review?(azasypkin) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 23•9 years ago
|
||
Master: https://github.com/mozilla-b2g/gaia/commit/2f059a213fe84f114fc693b8e90b28c452dec5cb
Status: NEW → RESOLVED
Closed: 9 years ago
status-b2g-master:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S3 (24Jul)
You need to log in
before you can comment on or make changes to this bug.
Description
•