head 1.6; access; symbols pkgsrc-2013Q2:1.4.0.2 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.3.0.2 pkgsrc-2013Q1-base:1.3 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.1.0.2 pkgsrc-2012Q3-base:1.1; locks; strict; comment @// @; 1.6 date 2013.09.28.14.37.05; author ryoon; state dead; branches; next 1.5; commitid RJpfztu2N6Kgkd7x; 1.5 date 2013.07.12.12.24.10; author ryoon; state Exp; branches; next 1.4; commitid QpgwIje676s86bXw; 1.4 date 2013.05.23.13.25.30; author ryoon; state dead; branches; next 1.3; commitid B2zASeC5iDep2LQw; 1.3 date 2013.01.07.21.55.30; author ryoon; state Exp; branches; next 1.2; 1.2 date 2012.11.23.17.28.50; author ryoon; state Exp; branches; next 1.1; 1.1 date 2012.09.06.12.08.52; author ryoon; state Exp; branches; next ; desc @@ 1.6 log @Update to 2.21 Changelog: SeaMonkey-specific changes Implemented an option to thread messages received by date. Allowed deletion of news posts by default. Implemented optional taskbar preview-per-tab. Added support (permission prompt) for desktop notifications. Added Isn't operator for searching by Priority. See the changes page for a more complete overview. Mozilla platform changes Support for new scrollbar style on Mac OS X 10.7 and newer. Accessibility related improvements on using pinned tabs (bug 577727). Major SVG rendering improvements around Image tiling and scaling (bug 600207). Removed support for sherlock files that are loaded from application or profile directory. Support for W3C touch events disabled (bug 888304). Fixed several stability issues. Fixed in SeaMonkey 2.21 MFSA 2013-92 GC hazard with default compartments and frame chain restoration MFSA 2013-91 User-defined properties on DOM proxies get the wrong "this" object MFSA 2013-90 Memory corruption involving scrolling MFSA 2013-89 Buffer overflow with multi-column, lists, and floats MFSA 2013-88 compartment mismatch re-attaching XBL-backed nodes MFSA 2013-85 Uninitialized data in IonMonkey MFSA 2013-83 Mozilla Updater does not lock MAR file after signature verification MFSA 2013-82 Calling scope for new Javascript objects can lead to memory corruption MFSA 2013-81 Use-after-free with select element MFSA 2013-80 NativeKey continues handling key messages after widget is destroyed MFSA 2013-79 Use-after-free in Animation Manager during stylesheet cloning MFSA 2013-78 Integer overflow in ANGLE library MFSA 2013-77 Improper state in HTML5 Tree Builder with templates MFSA 2013-76 Miscellaneous memory safety hazards (rv:24.0 / rv:17.0.9) @ text @$NetBSD: patch-mozilla_js_src_jsgc.cpp,v 1.5 2013/07/12 12:24:10 ryoon Exp $ --- mozilla/js/src/jsgc.cpp.orig 2013-06-20 04:35:08.000000000 +0000 +++ mozilla/js/src/jsgc.cpp @@@@ -478,13 +478,15 @@@@ FinalizeArenas(FreeOp *fop, } static inline Chunk * -AllocChunk() { - return static_cast(MapAlignedPages(ChunkSize, ChunkSize)); +AllocChunk(JSRuntime *rt) +{ + return static_cast(MapAlignedPages(rt, ChunkSize, ChunkSize)); } static inline void -FreeChunk(Chunk *p) { - UnmapPages(static_cast(p), ChunkSize); +FreeChunk(JSRuntime *rt, Chunk *p) +{ + UnmapPages(rt, static_cast(p), ChunkSize); } inline bool @@@@ -574,25 +576,25 @@@@ ChunkPool::expire(JSRuntime *rt, bool re } static void -FreeChunkList(Chunk *chunkListHead) +FreeChunkList(JSRuntime *rt, Chunk *chunkListHead) { while (Chunk *chunk = chunkListHead) { JS_ASSERT(!chunk->info.numArenasFreeCommitted); chunkListHead = chunk->info.next; - FreeChunk(chunk); + FreeChunk(rt, chunk); } } void ChunkPool::expireAndFree(JSRuntime *rt, bool releaseAll) { - FreeChunkList(expire(rt, releaseAll)); + FreeChunkList(rt, expire(rt, releaseAll)); } /* static */ Chunk * Chunk::allocate(JSRuntime *rt) { - Chunk *chunk = static_cast(AllocChunk()); + Chunk *chunk = AllocChunk(rt); #ifdef JSGC_ROOT_ANALYSIS // Our poison pointers are not guaranteed to be invalid on 64-bit @@@@ -605,7 +607,7 @@@@ Chunk::allocate(JSRuntime *rt) // were marked as uncommitted, but it's a little complicated to avoid // clobbering pre-existing unrelated mappings. while (IsPoisonedPtr(chunk)) - chunk = static_cast(AllocChunk()); + chunk = AllocChunk(rt); #endif if (!chunk) @@@@ -621,7 +623,7 @@@@ Chunk::release(JSRuntime *rt, Chunk *chu { JS_ASSERT(chunk); chunk->prepareToBeFreed(rt); - FreeChunk(chunk); + FreeChunk(rt, chunk); } inline void @@@@ -749,7 +751,7 @@@@ Chunk::fetchNextDecommittedArena() decommittedArenas.unset(offset); Arena *arena = &arenas[offset]; - MarkPagesInUse(arena, ArenaSize); + MarkPagesInUse(info.runtime, arena, ArenaSize); arena->aheader.setAsNotAllocated(); return &arena->aheader; @@@@ -948,6 +950,8 @@@@ static const int64_t JIT_SCRIPT_RELEASE_ JSBool js_InitGC(JSRuntime *rt, uint32_t maxbytes) { + InitMemorySubsystem(rt); + if (!rt->gcChunkSet.init(INITIAL_CHUNK_CAPACITY)) return false; @@@@ -2024,6 +2028,9 @@@@ js::MaybeGC(JSContext *cx) static void DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp) { + if (!DecommitEnabled(rt)) + return; + Chunk *chunk = *availableListHeadp; if (!chunk) return; @@@@ -2075,7 +2082,7 @@@@ DecommitArenasFromAvailableList(JSRuntim Maybe maybeUnlock; if (!rt->isHeapBusy()) maybeUnlock.construct(rt); - ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + ok = MarkPagesUnused(rt, aheader->getArena(), ArenaSize); } if (ok) { @@@@ -2105,7 +2112,7 @@@@ DecommitArenasFromAvailableList(JSRuntim JS_ASSERT(chunk->info.prevp); } - if (rt->gcChunkAllocationSinceLastGC) { + if (rt->gcChunkAllocationSinceLastGC || !ok) { /* * The allocator thread has started to get new chunks. We should stop * to avoid decommitting arenas in just allocated chunks. @@@@ -2143,7 +2150,7 @@@@ ExpireChunksAndArenas(JSRuntime *rt, boo { if (Chunk *toFree = rt->gcChunkPool.expire(rt, shouldShrink)) { AutoUnlockGC unlock(rt); - FreeChunkList(toFree); + FreeChunkList(rt, toFree); } if (shouldShrink) @ 1.5 log @Update to 2.19 * Update enigmail to 1.5.2. Changelog: SeaMonkey-specific changes Mark -> As Read now checks the state of all selected messages instead of only the first one's. Notifications for mixed content blocker have been implemented. A new 3rd-party cookie restriction to visited websites option has been added to the Cookies pref pane. The context menu Search option is now available for textareas and input fields. Website storage mechanisms are now available in the Data Manager (localStorage, indexedDB, etc.). "Open Containing Folder" is now already available during download. See the changes page for minor changes. Mozilla platform changes asm.js optimizations (OdinMonkey) have been enabled for major performance improvements. Improved WebGL rendering performance through asynchronous canvas updates. Plain text files displayed within the browser will now word-wrap. For user security, the Components object is no longer accessible from web content. Improved memory usage and display time when rendering images. The Pointer Lock API can now be used outside of fullscreen. CSS3 Flexbox has been implemented and enabled by default. The new Web Notifications API has been implemented. Added clipboardData API for JavaScript access to a user's clipboard. Support for new HTML5 and