Closed
Bug 986294
Opened 10 years ago
Closed 8 years ago
replace uses of Proxy.create() with new Direct Proxy API
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(firefox48 fixed)
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: zombie, Assigned: evilpie)
References
Details
Attachments
(1 file, 3 obsolete files)
5.96 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
SpiderMonkey folks are trying to align with the ES6 soon-to-be spec on proxies, and they would be grateful if we could move from the old, unspecced Proxy.create() API to the new, ES6 standards-track "direct proxies". i believe Erik is going to update preferences/service.js in bug 980565, and that leaves just system/environment.js, util/iteration.js and one content-script test. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
Updated•10 years ago
|
Whiteboard: [good first bug]
Priority: -- → P2
Reporter | ||
Comment 2•10 years ago
|
||
hi Anuj, that's great. what exactly do you need help with? here is a page describing how to contribute to the Jetpack project: https://github.com/mozilla/addon-sdk/wiki/contribute
Flags: needinfo?(tomica+amo)
Comment 3•10 years ago
|
||
(In reply to Tomislav Jovanovic [:zombie] from comment #2) > what exactly do you need help with? Can you tell me how I should replace Proxy.create() with new Proxy() in this line- http://mxr.mozilla.org/mozilla-central/source/addon-sdk/source/lib/sdk/util/iteration.js#15
Reporter | ||
Comment 4•10 years ago
|
||
that line is a bit special, as it's basically a "hack" to get to the ES6 @@iterator symbol (even before it's implemented). i believe this should be: for (let _ of new Proxy({}, {get: (_, name) => { throw name; } })) but you should try doing the other, more regular uses of Proxy.create(). to help with that, i suggest you study both the documentation for new direct proxies [1] and how they differ from the old API [2]. [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Old_Proxy_API and ask if you get stuck.
Comment 5•10 years ago
|
||
Assignee: nobody → anujagarwal464
Attachment #8400024 -
Flags: feedback?(tomica+amo)
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8400024 [details] [diff] [review] bug986294.diff hey Jordan, can you take this review please? i don't feel comfortable doing it, especially after talking with Eric Faust, who said he didn't do the whole conversion to direct proxies because the semantics seemed different enough.
Attachment #8400024 -
Flags: feedback?(tomica+amo) → feedback?(jsantell)
Comment 7•10 years ago
|
||
the test string overload (test-content-script.js) test fails, as do the environment tests. the `iteratorSymbol` works, and things that use it are working (sequence, list), but the other two conversions aren't currently. I would recommend checking out the master repo (mozilla/addon-sdk) on GH to run the tests, and also submit a PR through there, rather than a patch for m-c. Let me know if you have any questions
Updated•10 years ago
|
Attachment #8400024 -
Flags: feedback?(jsantell) → feedback-
Updated•10 years ago
|
Assignee: anujagarwal464 → nobody
Updated•9 years ago
|
Blocks: sdk/simple-prefs, 892903
Comment 9•9 years ago
|
||
Irakli has a patch for this in bug 1110457
Assignee: nobody → rFobic
Whiteboard: [good first bug]
Comment 10•9 years ago
|
||
Irakli's pull request depends on bug 783829 according to him in https://github.com/mozilla/addon-sdk/pull/1746
Depends on: 783829
Reporter | ||
Comment 11•9 years ago
|
||
hey Irakli, bug 783829 was resolved, wanna commit it now? (SM guys are anxious to remove Proxy.create)
Flags: needinfo?(rFobic)
Updated•9 years ago
|
No longer blocks: sdk/simple-prefs
Comment 12•9 years ago
|
||
(In reply to Tomislav Jovanovic [:zombie] from comment #11) > hey Irakli, bug 783829 was resolved, wanna commit it now? (SM guys are > anxious to remove Proxy.create) That change has landed now.
Comment 13•9 years ago
|
||
(In reply to Irakli Gozalishvili [:irakli] [:gozala] [@gozala] from comment #12) > (In reply to Tomislav Jovanovic [:zombie] from comment #11) > > hey Irakli, bug 783829 was resolved, wanna commit it now? (SM guys are > > anxious to remove Proxy.create) > > That change has landed now. So this bug is RESOLVED FIXED or is there something missing?
Flags: needinfo?(rFobic)
Assignee | ||
Comment 14•8 years ago
|
||
I still see the following three uses of Proxy.create: addon-sdk/source/lib/sdk/system/environment.js 15:exports.env = Proxy.create({ addon-sdk/source/test/addons/e10s-content/lib/test-content-script.js 264: let p = Proxy.create({ 329: // return obj._proxy = Proxy.create(...); addon-sdk/source/test/test-content-script.js 264: let p = Proxy.create({ 329: // return obj._proxy = Proxy.create(...);
Assignee | ||
Comment 15•8 years ago
|
||
This code will now generate a warning.
Comment hidden (spam) |
Assignee | ||
Updated•8 years ago
|
Attachment #8727107 -
Attachment is obsolete: true
Attachment #8727107 -
Flags: review?(dtownsend)
Assignee | ||
Comment 17•8 years ago
|
||
This is not necessarily a perfect match for the old semantics, but it passes the tests and I assume it's good enough for most reasonable uses of this API.
Attachment #8727108 -
Flags: review?(dtownsend)
Assignee | ||
Comment 18•8 years ago
|
||
Sorry about the bug spam, just forgot the refresh for two times.
Attachment #8727108 -
Attachment is obsolete: true
Attachment #8727108 -
Flags: review?(dtownsend)
Attachment #8727109 -
Flags: review?(dtownsend)
Assignee | ||
Updated•8 years ago
|
Assignee: rFobic → evilpies
Assignee | ||
Updated•8 years ago
|
Attachment #8400024 -
Attachment is obsolete: true
Updated•8 years ago
|
Attachment #8727109 -
Flags: review?(dtownsend) → review+
Comment 20•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c138edad150f
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Updated•6 years ago
|
Flags: needinfo?(rFobic)
You need to log in
before you can comment on or make changes to this bug.
Description
•