Closed
Bug 1135961
Opened 11 years ago
Closed 10 years ago
Implement subclassing of DOM objects
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(3 files, 7 obsolete files)
|
6.97 KB,
patch
|
Details | Diff | Splinter Review | |
|
512 bytes,
text/html
|
Details | |
|
44.26 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Updated•11 years ago
|
Depends on: new.target
| Assignee | ||
Comment 1•11 years ago
|
||
This should all work, I think, except for preserving the wrapper when using a non-default proto. In particular, I need to sort out the proxy story there, since apparently preserving the wrapper for proxies is ... complicated.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•11 years ago
|
||
Note to self: Use new XMLSerializer() as a fast constructor to test perf impact of this stuff.
| Assignee | ||
Comment 3•11 years ago
|
||
OK, so the preserving works now... . New problem is that my asserts trigger in a debug buid, because the Promise ctor actually does the wrapping in Promise::Constructor, so the bindings don't get a chance to use the right proto. Need to think a bit about how to handle that.
| Assignee | ||
Updated•11 years ago
|
Attachment #8600555 -
Attachment is obsolete: true
| Assignee | ||
Comment 4•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Attachment #8600674 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•11 years ago
|
||
So I think the main options are to either hack codegen for Promise to pass in the desired proto for now, pending Promise moving into SpiderMonkey, or to change all DOM constructors to pass in the desired proto, in case the callee wraps eagerly.
I'm pretty happy doing the former, honestly. Promise is a pretty special snowflake. Peter, do you have a preference?
Flags: needinfo?(peterv)
| Assignee | ||
Comment 6•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Attachment #8600675 -
Attachment is obsolete: true
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(peterv)
| Assignee | ||
Comment 7•11 years ago
|
||
| Assignee | ||
Comment 8•11 years ago
|
||
| Assignee | ||
Comment 9•11 years ago
|
||
Attachment #8615530 -
Flags: review?(peterv)
| Assignee | ||
Updated•11 years ago
|
Attachment #8600750 -
Attachment is obsolete: true
Updated•11 years ago
|
Keywords: dev-doc-needed
| Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8638582 -
Flags: review?(peterv)
| Assignee | ||
Updated•10 years ago
|
Attachment #8615530 -
Attachment is obsolete: true
Attachment #8615530 -
Flags: review?(peterv)
| Assignee | ||
Comment 11•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8638582 -
Attachment is obsolete: true
Attachment #8638582 -
Flags: review?(peterv)
| Assignee | ||
Updated•10 years ago
|
Attachment #8638873 -
Flags: review?(peterv)
| Assignee | ||
Comment 12•10 years ago
|
||
Attachment #8639901 -
Flags: review?(peterv)
| Assignee | ||
Updated•10 years ago
|
Attachment #8638873 -
Attachment is obsolete: true
Attachment #8638873 -
Flags: review?(peterv)
Comment 13•10 years ago
|
||
Comment on attachment 8639901 [details] [diff] [review]
And even compiling, with the GetWrapper changes
Review of attachment 8639901 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the comments, they're really helpful.
::: dom/bindings/Codegen.py
@@ +3446,5 @@
> + if self.descriptor.proxy:
> + preserveWrapper = dedent(
> + """
> + // For DOM proxies, the only reliable way to preserve the wrapper
> + // is to force creation of the expando object.
:-(
Attachment #8639901 -
Flags: review?(peterv) → review+
| Assignee | ||
Comment 14•10 years ago
|
||
> :-(
I filed bug 1189822.
Comment 15•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Updated•10 years ago
|
Keywords: dev-doc-needed
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•