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)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(3 files)

+++ This bug was initially created as a clone of Bug #500850 +++
Depends on: 513992
Similar to attachment 387529 [details] [diff] [review] but this one generates the template function, instead of using a hand-written one.
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.
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); } ...
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)
Attachment #399295 - Flags: review?(jst)
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).
Attachment #399294 - Flags: superreview+
Attachment #399294 - Flags: review?(jst)
Attachment #399294 - Flags: review+
Attachment #399295 - Flags: superreview+
Attachment #399295 - Flags: review?(jst)
Attachment #399295 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
This needs the configure check changed to require python 2.5 on all platforms.
Attachment #401577 - Flags: review?(benjamin) → review+
Comment on attachment 401577 [details] [diff] [review] Alternatively, use 2.4-compatible code Pushed changeset c899688404f7 to mozilla-central.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: