Closed
Bug 598979
Opened 14 years ago
Closed 14 years ago
change "widget" module to use EventEmitter event registration model
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: irakli, Assigned: irakli)
References
Details
Attachments
(1 file)
23.88 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → rFobic
Assignee | ||
Comment 1•14 years ago
|
||
Associated pull request: http://github.com/mozillalabs/jetpack-sdk/pull/17 This patch also includes fix for the widget test failures that occur with ff4b and f3.* now.
Attachment #482535 -
Flags: review?(dietrich)
Comment 2•14 years ago
|
||
What part of the patch addresses the test failures? If possible, it'd be better to split those changes out. If that's not possible, then just comment here about what caused the failure, and how you addressed it.
Assignee | ||
Comment 3•14 years ago
|
||
Please look at the pull request link I've posted the last commit message explains the it also it includes only changes addressing that. Separating patch won't be easy since change is done on top of other changes in this patch.
Comment 4•14 years ago
|
||
Comment on attachment 482535 [details] [diff] [review] v1 >@@ -224,9 +260,8 @@ let browserManager = { > // propagating the change to all windows. > updateItem: function browserManager_updateItem(item, property, value) { > let idx = this.items.indexOf(item); >- if (idx == -1) >- throw new Error("The widget " + item + " cannot be updated because it is not currently registered."); >- this.windows.forEach(function (w) w.updateItem(item, property, value)); >+ if (idx != -1) >+ this.windows.forEach(function (w) w.updateItem(item, property, value)); > }, why are you changing this to silently fail? r=me otherwise on this patch.
Attachment #482535 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 5•14 years ago
|
||
(In reply to comment #4) > Comment on attachment 482535 [details] [diff] [review] > v1 > > > >@@ -224,9 +260,8 @@ let browserManager = { > > // propagating the change to all windows. > > updateItem: function browserManager_updateItem(item, property, value) { > > let idx = this.items.indexOf(item); > >- if (idx == -1) > >- throw new Error("The widget " + item + " cannot be updated because it is not currently registered."); > >- this.windows.forEach(function (w) w.updateItem(item, property, value)); > >+ if (idx != -1) > >+ this.windows.forEach(function (w) w.updateItem(item, property, value)); > > }, > > why are you changing this to silently fail? > > r=me otherwise on this patch. The reason is the assignments that happen in the constructors. With this check exception will be always thrown. Another thing that I noticed that if you can set properties while constructing a Widget there is nothing wrong with changing them even if it's not added yet since actual values will be propagated only when widget is added.
Assignee | ||
Comment 6•14 years ago
|
||
Please let me know whether this reasoning is acceptable or not.
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 8•14 years ago
|
||
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product. To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•