Closed
Bug 676857
Opened 13 years ago
Closed 13 years ago
Make it a compile-time error to have a script-implementable interface with more methods than xptcall stubs can handle
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: bzbarsky, Assigned: jcranmer)
Details
Attachments
(1 file, 1 obsolete file)
25.62 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
xptcall is capped at something like 249 methods. I ran into that today with some DOM interfaces and orange builds.... but that code should just have not compiled instead of dying on pure virtual calls, imo.
Assignee | ||
Comment 1•13 years ago
|
||
I have a patch which: 1. Causes an error with xpidl 2. Prevents the interface from being loaded with xpt (un)Fortunately, nsIDOMCSS2Properties has 469 methods on my machine, so it's a good check to make sure that we actually fail hard in these cases.
Assignee | ||
Comment 2•13 years ago
|
||
This is a first cut at the bug. bz suggested over IRC that I elide the check in case of builtinclass interfaces. Since the real problem is over whether or not in can be stubbed, I'm also going to track down the stub generation code and make that fail.
Assignee: nobody → Pidgeot18
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•13 years ago
|
||
http://dxr.mozilla.org/mozilla/mozilla-central/xpcom/reflect/xptcall/src/xptcall.cpp.html#l69 Builtinclasses already fail the stub generation, so there shouldn't be a problem to failing to load that xpt file.
Assignee | ||
Comment 4•13 years ago
|
||
This omits the error in case of builtinclass.
Attachment #551089 -
Attachment is obsolete: true
Attachment #551103 -
Flags: review?(benjamin)
(In reply to Boris Zbarsky (:bz) from comment #0) > xptcall is capped at something like 249 methods. I ran into that today with > some DOM interfaces and orange builds.... but that code should just have not > compiled instead of dying on pure virtual calls, imo. When you say 'xptcall' is capped, you mean the stubs, and not NS_InvokeByIndex, right?
Reporter | ||
Comment 6•13 years ago
|
||
I mean the stubs, yes.
Summary: Make it a compile-time error to have an interface with more methods than xptcall can handle → Make it a compile-time error to have an interface with more methods than xptcall stubs can handle
Summary: Make it a compile-time error to have an interface with more methods than xptcall stubs can handle → Make it a compile-time error to have a script-implementable interface with more methods than xptcall stubs can handle
Updated•13 years ago
|
Attachment #551103 -
Flags: review?(benjamin) → review+
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 7•13 years ago
|
||
Just a few days, and I can't import this to m-i atm, clearing checkin-needed until patch is updated.
Keywords: checkin-needed
Assignee | ||
Comment 8•13 years ago
|
||
I refreshed the patch and pushed to mozilla-inbound...
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/16107d140423
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•