edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] my_ErrorReporter
@ 2014-01-24 12:13 Karl Dahlke
  2014-01-24 19:08 ` Adam Thompson
  0 siblings, 1 reply; 2+ messages in thread
From: Karl Dahlke @ 2014-01-24 12:13 UTC (permalink / raw)
  To: Edbrowse-dev

Looks very much the same in Adam's latest as in mine.
A small change, just to be safe, make the last line

if(report) report->flags = 0;

This function uses JS-smprintf and JS_free,
and these are only used one other place in jsloc.c,
and I don't get why the sprintf call doesn't need the js context,
but the corresponding free call does.
That just makes me nervous.
No I don't think that's any of our bug problems so far,
but it's something we should address before a stable release.
And the funny thing is, JS_smprintf is almost pointless in the C++ world,
just concatenate the strings together and C++ will manage everything.
And in my_ErrorReporter we could even use cerr directly.
So might be we don't even need the silly function,
I'm just saying I don't quite understand it.

As you see from this, I finally cloned your code.
I plan to read through it first, then find / install moz 24,
then build and play.

Karl Dahlke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Edbrowse-dev] my_ErrorReporter
  2014-01-24 12:13 [Edbrowse-dev] my_ErrorReporter Karl Dahlke
@ 2014-01-24 19:08 ` Adam Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Thompson @ 2014-01-24 19:08 UTC (permalink / raw)
  To: Karl Dahlke; +Cc: Edbrowse-dev

On Fri, Jan 24, 2014 at 07:13:20AM -0500, Karl Dahlke wrote:
> Looks very much the same in Adam's latest as in mine.
> A small change, just to be safe, make the last line
> 
> if(report) report->flags = 0;

I've removed the JS_smprintf usage from jsloc.cpp and jsdom.cpp.

> That just makes me nervous.
What made me nervous about this was we were relying on something which isn't
really publicly exposed in SpiderMonkey and they freely admit they change the
internals (and public api) with no thought for backward compatability and very 
little notice.

> No I don't think that's any of our bug problems so far,
> but it's something we should address before a stable release.

Agreed.

> And the funny thing is, JS_smprintf is almost pointless in the C++ world,
> just concatenate the strings together and C++ will manage everything.
> And in my_ErrorReporter we could even use cerr directly.
> So might be we don't even need the silly function,
> I'm just saying I don't quite understand it.

We don't, and it's gone as per my last set of commits.

> As you see from this, I finally cloned your code.
> I plan to read through it first, then find / install moz 24,
> then build and play.

Cool. I've just pushed the commits removing JS_smprintf and reformatting the
code using ebindent.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-24 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 12:13 [Edbrowse-dev] my_ErrorReporter Karl Dahlke
2014-01-24 19:08 ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).