Closed
Bug 772966
Opened 12 years ago
Closed 12 years ago
force XBL parameter names to be non-zero
Categories
(Core :: XBL, enhancement)
Core
XBL
Tracking
()
RESOLVED
FIXED
People
(Reporter: Benjamin, Assigned: smaug)
Details
Attachments
(1 file, 1 obsolete file)
2.75 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Otherwise XBL can pass empty parameter names through the JS API, which is not exactly supported.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bugs
Assignee | ||
Comment 1•12 years ago
|
||
Can JSAPI handle cases when param name contains whitespaces?
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #1) > Can JSAPI handle cases when param name contains whitespaces? We don't check if anything is a valid identifier. If it contains whitespace, nothing will probably go wrong, but that's useless, right? You can use JS_IsIdentifier to do this check.
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #641200 -
Flags: review?(jonas)
Comment 4•12 years ago
|
||
Comment on attachment 641200 [details] [diff] [review] bypass empty params Review of attachment 641200 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/xbl/src/nsXBLProtoImplMethod.cpp @@ +57,5 @@ > { > NS_PRECONDITION(!IsCompiled(), > "Must not be compiled when accessing uncompiled method"); > > + NS_ENSURE_TRUE(!aText.IsEmpty(), ); Empty macro arguments cause build warnings :(
Assignee | ||
Comment 5•12 years ago
|
||
Really? We have those in many places. But I can change that to if (aText.IsEmpty()) { NS_WARNING("Empty name attribute in xbl:parameter!"); return; }
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #641208 -
Flags: review?(jonas)
Assignee | ||
Updated•12 years ago
|
Attachment #641200 -
Attachment is obsolete: true
Attachment #641200 -
Flags: review?(jonas)
Attachment #641208 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/588424024294
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•