Closed Bug 788172 Opened 12 years ago Closed 11 years ago

Proxy is not a function (typeof Proxy should be 'function')

Categories

(Core :: JavaScript Engine, defect)

18 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: bruant.d, Assigned: jorendorff)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, site-compat, Whiteboard: [js:p2])

Attachments

(1 file, 2 obsolete files)

Additionally to typeof, "Proxy" should be callable and do the same thing as "new Proxy"
Blocks: 703537
Whiteboard: [js:p2]
OS: Linux → All
Hardware: x86_64 → All
Assignee: general → jorendorff
Summary: typeof Proxy === 'object' (it should be 'function') → Proxy is not a function (typeof Proxy should be 'function')
Attached patch v1 (obsolete) — Splinter Review
The spec is vague at present but this seems clearly what's intended.

With this patch, Proxy(...) behaves exactly like new Proxy(...).

I thought it should get at least a little test coverage, so in addition to the obvious tests I also did s/new Proxy/Proxy/g on jit-test/tests/proxytest*1.js, arbitrarily switching a few existing tests to the new syntax.
Attachment #685134 - Flags: review?(ejpbruel)
Review ping! (I know, king of hypocrites here)
Comment on attachment 685134 [details] [diff] [review]
v1

Review of attachment 685134 [details] [diff] [review]:
-----------------------------------------------------------------

Patch looks good Jason! No comments.

I do have a question though: what exactly are cached protos?
Attachment #685134 - Flags: review?(ejpbruel) → review+
Blocks: es6
We should get this rebased and landed.
Attached patch rebased patch (obsolete) — Splinter Review
I have rebased the old patch. Should be good to land now!
Attachment #685134 - Attachment is obsolete: true
Attachment #757415 - Flags: review?(ejpbruel)
Comment on attachment 757415 [details] [diff] [review]
rebased patch

Review of attachment 757415 [details] [diff] [review]:
-----------------------------------------------------------------

Looks like this patch was rebased, but never landed, probably because it was flagged for review. In general, I don't think its necessary to review a patch again if its a simple rebase.
Attachment #757415 - Flags: review?(ejpbruel) → review+
Attached patch rebased againSplinter Review
Rebased the patch once again.
Attachment #757415 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/09dcdc2b2120
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Depends on: 899399
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: