Closed
Bug 508780
Opened 16 years ago
Closed 16 years ago
Stop using tearoff from quickstubs for nsDOMCSSDeclaration/nsComputedDOMStyle
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(3 files)
|
9.02 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
|
5.69 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
|
604 bytes,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #500850 +++
| Assignee | ||
Comment 1•16 years ago
|
||
Similar to attachment 387529 [details] [diff] [review] but this one generates the template function, instead of using a hand-written one.
| Assignee | ||
Comment 2•16 years ago
|
||
Make CSS2PropertiesTearoff a real non-cached tearoff since we won't call it from JS, and so we don't care about the performance of getting the tearoff.
| Assignee | ||
Comment 3•16 years ago
|
||
Generated code looks like this:
static JSBool
nsIDOMCSS2Properties_Get(JSContext *cx, JSObject *obj, jsval id, const nsCSSProperty prop, jsval *vp)
{
XPC_QS_ASSERT_CONTEXT_OK(cx);
nsICSSDeclaration *self;
xpc_qsSelfRef selfref;
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, nsnull))
return JS_FALSE;
nsresult rv;
nsString result;
rv = self->GetPropertyValue(prop, result);
if (NS_FAILED(rv))
return xpc_qsThrowGetterSetterFailed(cx, rv, JSVAL_TO_OBJECT(*vp), id);
return xpc_qsStringToJsval(cx, result, vp);
}
static JSBool
nsIDOMCSS2Properties_GetAzimuth(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Azimuth, vp);
}
static JSBool
nsIDOMCSS2Properties_GetBackground(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
return nsIDOMCSS2Properties_Get(cx, obj, id, QS_CSS_PROP_Background, vp);
}
...
| Assignee | ||
Comment 4•16 years ago
|
||
Comment on attachment 399294 [details] [diff] [review]
Generate templates for nsIDOM[NS]CSS2Properties v1
This adds support for "template" quickstubs. I implemented just what I needed for CSS2Properties, we can improve it if/when we get other usecases.
Attachment #399294 -
Flags: review?(jst)
| Assignee | ||
Updated•16 years ago
|
Attachment #399295 -
Flags: review?(jst)
| Assignee | ||
Comment 5•16 years ago
|
||
Comment on attachment 399295 [details] [diff] [review]
Don't cache CSS2PropertiesTearoff v1
If we don't use the tearoff for JS we don't need to cache it (and there don't seem to be any uses of nsIDOM[NS]CSS2Properties) from C++ in our code).
Updated•16 years ago
|
Attachment #399294 -
Flags: superreview+
Attachment #399294 -
Flags: review?(jst)
Attachment #399294 -
Flags: review+
Updated•16 years ago
|
Attachment #399295 -
Flags: superreview+
Attachment #399295 -
Flags: review?(jst)
Attachment #399295 -
Flags: review+
| Assignee | ||
Comment 6•16 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e514617889ec
http://hg.mozilla.org/mozilla-central/rev/7c4356fe091b
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Comment 7•16 years ago
|
||
This needs the configure check changed to require python 2.5 on all platforms.
Comment 8•16 years ago
|
||
Attachment #401577 -
Flags: review?(benjamin)
| Assignee | ||
Updated•16 years ago
|
Attachment #401577 -
Flags: review?(benjamin) → review+
Comment 10•16 years ago
|
||
Comment on attachment 401577 [details] [diff] [review]
Alternatively, use 2.4-compatible code
Pushed changeset c899688404f7 to mozilla-central.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•