24 Commits

Author SHA1 Message Date
brendan%mozilla.org
6348c215f4 - Turn jrgm's helpful assert/defend changes into assertions that mCIDOffset
is never 0, and make the memset-to-zero required for these assertions be
  #ifdef NS_DEBUG.
- Extend FastLoad file format to encode a singleton flag in the high bit of
  nsFastLoadSharpObjectInfo.mWeakRefCnt.  The updater code needs to test this
  bit in order to deserialize a singleton that was not read by the updater's
  reader during this FastLoad episode.  Otherwise the updater is likely to
  reserialize the singleton, leading to multiple entries in the object map
  for the same object, and UMRs when loading from the writer's object map
  enumeration (objvec) in nsFastLoadFileWriter::WriteFooter.
- Remove bogus assertion that worked only when an XPCOM data structure being
  serialized was still alive at the time the writer closed.  In general, there
  is no relationship between the strong ref-counts in a FastLoad file and the
  XPCOM refcnts in memory at close time.
- Bug 189832, r=jrgm, sr=ben, a=dbaron.


git-svn-id: svn://10.0.0.236/trunk@137872 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-16 17:40:16 +00:00
jrgm%netscape.com
be802e1b74 Guard against bogus entries in the object map of the fastload file, bug 189832, r=ben/jag, sr=jst, a=asa
git-svn-id: svn://10.0.0.236/trunk@137173 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-31 01:34:45 +00:00
brendan%mozilla.org
15e30e0232 Defend against bad EndMuxedDocument calls, and assert in the underlying {JS,PL}_DHashTableRawRemove that entry is live (188744, r=jrgm, sr=ben).
git-svn-id: svn://10.0.0.236/trunk@136501 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-17 10:01:50 +00:00
alecf%netscape.com
e38457c675 take two at fixing bug 177401 - convert nsIBinaryStream over to using nsAString/nsACString for string values, to speed up fastload
sr=darin, r=dougt
(the previous checkin had a typo which disabled fastload entirely!)


git-svn-id: svn://10.0.0.236/trunk@133832 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-14 18:16:31 +00:00
alecf%netscape.com
1c16ef7f73 argh, back out my last checkin because Ts went UP not down!
git-svn-id: svn://10.0.0.236/trunk@133447 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-09 01:31:32 +00:00
alecf%netscape.com
aac40e7aa5 fix for bug 177401 - use nsAString& classes instead of wstring in nsIBinaryInputStream, to speed up fastload startup
sr=darin, r=dougt


git-svn-id: svn://10.0.0.236/trunk@133429 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-08 23:30:53 +00:00
darin%netscape.com
24feadaaed fixes bug 142870 "nsIFile should use UCS-2 instead of UTF-8"
r=dougt sr=alecf


git-svn-id: svn://10.0.0.236/trunk@121010 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-07 23:07:19 +00:00
ben%netscape.com
e7a1684e98 [Chrome FastLoad]
Patch to make FastLoad Service return the previous URI selected when selecting a new one, as well as fixing a few issues relating to dependencies on non-existent files. Patch from brendan, r=dbaron, sr=waterson


git-svn-id: svn://10.0.0.236/trunk@120643 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-03 02:59:42 +00:00
darin%netscape.com
824def02af fixes bug 129279 "nsIFile unicode/utf8/ascii task"
r=dougt sr=alecf


git-svn-id: svn://10.0.0.236/trunk@120092 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-27 05:33:09 +00:00
timeless%mac.com
535b6f20f2 Bugzilla Bug 107823 change nsIFile
to use 'Modified' instead of 'Modification'
r=akkana sr=brendan


git-svn-id: svn://10.0.0.236/trunk@108891 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 08:05:05 +00:00
brendan%mozilla.org
2bf095e76f Break self-cycle to fix leak (106860, r=dbaron, sr=bienvenu).
git-svn-id: svn://10.0.0.236/trunk@108886 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-26 01:20:31 +00:00
pete%alphanumerica.com
3c4492f3e0 b=107823, r=ccarlen, sr=brendan
--pete


git-svn-id: svn://10.0.0.236/trunk@106886 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:11:15 +00:00
brendan%mozilla.org
b27e4fa386 Store FastLoad dependency mtimes, and invalidate if any changes (106021, r=dveditz, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@106823 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 08:29:25 +00:00
brendan%mozilla.org
040a610072 Add SetAlphaBounds, TABLE_SIZE, and MIN_ALPHA APIs (103990, r=dbaron, sr=waterson).
git-svn-id: svn://10.0.0.236/trunk@105470 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-16 05:40:27 +00:00
brendan%mozilla.org
70be6480f2 Fix to avoid dangling PLDHashTable entry pointers that lead to humongous FastLoad files (95888, r=dbaron, sr=waterson).
git-svn-id: svn://10.0.0.236/trunk@104530 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-03 06:57:52 +00:00
gerv%gerv.net
13afb6d0f9 Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089.
git-svn-id: svn://10.0.0.236/trunk@104119 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-28 20:14:13 +00:00
brendan%mozilla.org
6abf5e7f73 Bit checkin for bug 68045, r/sr=waterson&shaver, second attempt. It all works
for me on optimized and debug gcc2.96, rh7.1.

- Better failure codes from nsXULPrototypeScript::Deserialize.

- Call nsXULDocument::AbortFastLoads after nsXULPrototypeScript::Serialize
  failure, instead of just nulling the FastLoad service's output stream.

- Expose nsXULDocument::AbortFastLoads via nsIXULPrototypeCache, for use from
  nsChromeProtocolHandler.cpp.  AbortFastLoads flushes the XUL cache now, for
  good measure.

- The needless "Current" adjective in nsIFastLoadService attribute and method
  names is no more.

- Add a do_GetFastLoadService() helper, to use CID instead of contractid, and
  to let the compiler consolidate the static inline CID.

- Add "nglayout.debug.checksum_xul_fastload_file" pref so people can do without
  the checksum verification step when reading a FastLoad file.

- Verify the FastLoad file checksum, by default.  Also, cache it in the FastLoad
  service so we don't recompute it when re-opening the FastLoad file as mailnews
  and other top-levels start up.  Fill the checksum cache in EndFastLoad, when
  the last pseudo-concurrent top-level finishes loading.

  My hope to compute the checksum while writing the FastLoad file ran afoul of
  misordered writes.  The old code to checksum the in-memory nsFastLoadHeader
  also was broken on little endian platforms.  Now all checksumming is done via
  a separate read pass over the complete file, save for the header's checksum
  field, which is summed as if it contained zero.

- Track and check FastLoad file dependencies.  This required groveling with a
  bunch of Necko interfaces in nsChromeProtocolHandler::NewChannel -- read it
  and weep.  Dependency checking, as well as checksum access and computation,
  use better-factored nsIFastLoad{File,Read,Write}Control interfaces.

- nsBufferedStream::Seek wasn't flushing the buffer when seeking backward
  within the buffer, but it must, because mCursor bounds the amount to write
  if the buffer contains the end of file.

- Add an unbufferedStream readonly attribute to nsIStreamBufferAccess, so we
  don't have to screw around with the bufferying layer when checksumming. Also
  implement nsIStreamBufferAccess in nsBufferedOutputStream.

- nsISeekableOutputStream was bogus, based on a bad state I had put the
  nsBufferedOutputStream code in on its way from being completely broken when
  you seek backwards outside of the buffer.  Removing this interface required
  using nsIFastLoadFileIO in nsFastLoadFileWriter, and it also required careful
  ordering of Close calls (the Reader must close after the Writer or Updater,
  so that the Reader's underlying, unbuffered input stream can be read by
  nsFastLoadFileWriter::Close to compute the checksum.

- Miscellaneous tab/indentation, comment typo, bracing, if( => if ( style,
  nsnull vs. 0, useless variable elimination, tortured control flow,
  AutoString instead of String, and gratuitous ; after nsISupportsUtils.h
  macro call cleanups.


git-svn-id: svn://10.0.0.236/trunk@101544 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-21 20:51:34 +00:00
blizzard%redhat.com
ac9d1a4c2e Back out brendan's checkin to try and get linux starting up again.
git-svn-id: svn://10.0.0.236/trunk@101334 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 19:45:11 +00:00
brendan%mozilla.org
cad980f881 - Better failure codes from nsXULPrototypeScript::Deserialize.
- Call nsXULDocument::AbortFastLoads after nsXULPrototypeScript::Serialize
  failure, instead of just nulling the FastLoad service's output stream.

- Expose nsXULDocument::AbortFastLoads via nsIXULPrototypeCache, for use from
  nsChromeProtocolHandler.cpp.  AbortFastLoads flushes the XUL cache now, for
  good measure.

- The needless "Current" adjective in nsIFastLoadService attribute and method
  names is no more.

- Add a do_GetFastLoadService() helper, to use CID instead of contractid, and
  to let the compiler consolidate the static inline CID.

- Add "nglayout.debug.checksum_xul_fastload_file" pref so people can do without
  the checksum verification step when reading a FastLoad file.

- Verify the FastLoad file checksum, by default.  Also, cache it in the FastLoad
  service so we don't recompute it when re-opening the FastLoad file as mailnews
  and other top-levels start up.  Fill the checksum cache in EndFastLoad, when
  the last pseudo-concurrent top-level finishes loading.

  My hope to compute the checksum while writing the FastLoad file ran afoul of
  misordered writes.  The old code to checksum the in-memory nsFastLoadHeader
  also was broken on little endian platforms.  Now all checksumming is done via
  a separate read pass over the complete file, save for the header's checksum
  field, which is summed as if it contained zero.

- Track and check FastLoad file dependencies.  This required groveling with a
  bunch of Necko interfaces in nsChromeProtocolHandler::NewChannel -- read it
  and weep.  Dependency checking, as well as checksum access and computation,
  use better-factored nsIFastLoad{File,Read,Write}Control interfaces.

- nsBufferedStream::Seek wasn't flushing the buffer when seeking backward
  within the buffer, but it must, because mCursor bounds the amount to write
  if the buffer contains the end of file.

- Add an unbufferedStream readonly attribute to nsIStreamBufferAccess, so we
  don't have to screw around with the bufferying layer when checksumming. Also
  implement nsIStreamBufferAccess in nsBufferedOutputStream.

- nsISeekableOutputStream was bogus, based on a bad state I had put the
  nsBufferedOutputStream code in on its way from being completely broken when
  you seek backwards outside of the buffer.  Removing this interface required
  using nsIFastLoadFileIO in nsFastLoadFileWriter, and it also required careful
  ordering of Close calls (the Writer or Updater must close after the Reader,
  so that the Reader's underlying, unbuffered input stream can be read by
  nsFastLoadFileWriter::Close to compute the checksum.

- Miscellaneous tab/indentation, comment typo, bracing, if( => if ( style,
  nsnull vs. 0, useless variable elimination, tortured control flow,
  AutoString instead of String, and gratuitous ; after nsISupportsUtils.h
  macro call cleanups.


git-svn-id: svn://10.0.0.236/trunk@101289 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-17 09:52:55 +00:00
cls%seawood.org
e8d28b7625 Use NS_PTR_TO_INT32 macros to do 64-bit safe pointer conversions.
Bug #20860 r=Roland.Mainz@informatik.med.uni-giessen.de sr=brendan@mozilla.org


git-svn-id: svn://10.0.0.236/trunk@100998 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-14 04:18:27 +00:00
brendan%mozilla.org
50f90d9eeb Restore scriptable nsIClassInfo.classID but add fast/C++-only classIDNoAlloc; define and use nsIClassInfo::EAGER_CLASSINFO in caps (93792, sr=waterson&jst).
git-svn-id: svn://10.0.0.236/trunk@100464 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-07 03:59:29 +00:00
pinkerton%netscape.com
81222970fe Working around dynamic linker restrictions on hp/macosx. r=dbaron/sr=brendan.
bug# 93479


git-svn-id: svn://10.0.0.236/trunk@100318 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-03 20:54:25 +00:00
brendan%mozilla.org
15e18e8ee5 Danm's fix for Mac CodeWarrior C++ glitch, and a cosmetic sneak-fix.
git-svn-id: svn://10.0.0.236/trunk@100048 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-31 22:22:36 +00:00
brendan%mozilla.org
f5bc62edea FASTLOAD_20010703_BRANCH landing, r=dbaron, sr=shaver.
git-svn-id: svn://10.0.0.236/trunk@100030 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-31 19:05:34 +00:00