GNOME Bugzilla – Bug 697309
Fix some compile warnings with js17
Last modified: 2013-05-09 13:57:48 UTC
See patches. Doesn't fix all warnings.
Created attachment 240692 [details] [review] gerror: Fix a broken signature
Created attachment 240693 [details] [review] jsapi-util: Remove unused variable
Created attachment 240694 [details] [review] compat: Fix unused method warnings
Created attachment 240695 [details] [review] context: Fix the signature of the GC callback
Created attachment 240696 [details] [review] profiler: Fix some profiler warnings
Created attachment 240697 [details] [review] Fix a lot of property op and class init warnings
Created attachment 240698 [details] [review] Add a wrapper for finalize This wraps JSFreeOp and makes a context for the finalizer run.
Review of attachment 240692 [details] [review]: Yep.
Review of attachment 240693 [details] [review]: I'd be fine with just committing unused variable fixes.
Review of attachment 240694 [details] [review]: Right.
Review of attachment 240695 [details] [review]: Yep. (But note we'd eventually like to have control over the GC, but that's something we have to fix upstream)
Review of attachment 240696 [details] [review]: Hooray for deleting dead code.
Review of attachment 240697 [details] [review]: Interesting. Yes, this looks right. ::: gjs/jsapi-util.c @@ +84,3 @@ +static void +finalize_stub(JSFreeOp *fop, JSObject *global) {} Can you put the parens each on a new line here? It just helps me visually scan.
Review of attachment 240698 [details] [review]: Is this really necessary? Or only if we invoke JSAPI from the finalizer? Looking at the js source, there's e.g. xmlfilter_finalize() which doesn't appear to create a context. Hmm...feels like this one needs more investigation.
Review of attachment 240698 [details] [review]: It was simply the easiest way to get a context from the runtime provided. Should I instead just use JS_GetRuntimeData to get the same context? I feel that since the finalizer will be called on the GC thread, it makes more sense to create a context rather than use the main thread only one.
Attachment 240692 [details] pushed as 5f54f55 - gerror: Fix a broken signature Attachment 240693 [details] pushed as aecd778 - jsapi-util: Remove unused variable Attachment 240694 [details] pushed as 96388ed - compat: Fix unused method warnings Attachment 240695 [details] pushed as f503b31 - context: Fix the signature of the GC callback Attachment 240696 [details] pushed as 406b0b3 - profiler: Fix some profiler warnings Attachment 240697 [details] pushed as 0bd8418 - Fix a lot of property op and class init warnings