~ubuntu-branches/ubuntu/gutsy/firefox/gutsy

« back to all changes in this revision

Viewing changes to js/src/jscntxt.h

  • Committer: Bazaar Package Importer
  • Author(s): Ian Jackson
  • Date: 2006-10-10 18:49:32 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20061010184932-da75izt7y0e59afq
Tags: 1.99+2.0rc2+dfsg-0ubuntu1
* New upstream version 2.0rc2.
* Fix/workaround for epiphany GtkSocket lifetype crash:
  apply patch id=241087 from Mozilla Bugzilla #241535 to fix LP #63814.
* Change application name to `Firefox', as requested by mdz.
  Files changed:
    - browser/locales/en-US/chrome/branding/brand.dtd
    - browser/locales/en-US/chrome/branding/brand.properties;
  New values:
    - brandShortName and brandFullName: `Bon Echo' => `Firefox'
    - vendorShortName: `Mozilla' => `Ubuntu'
* Make preferences dialogue fit again (bah!).

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    uint32              gcMallocBytes;
82
82
 
83
83
#if JS_HAS_GENERATORS
84
 
    /* Flag indicating that the current thread is excuting close hooks. */
 
84
    /* Flag indicating that the current thread is executing close hooks. */
85
85
    JSBool              gcRunningCloseHooks;
86
86
#endif
87
87
};
472
472
#define JSLRS_NULL_MARK ((uint32) -1)
473
473
 
474
474
typedef struct JSTempValueRooter JSTempValueRooter;
 
475
typedef void
 
476
(* JS_DLL_CALLBACK JSTempValueMarker)(JSContext *cx, JSTempValueRooter *tvr);
475
477
 
476
478
/*
477
479
 * Context-linked stack of temporary GC roots.
478
480
 *
479
 
 * If count is -1, then u.value contains the single value to root.  Otherwise
480
 
 * u.array points to a stack-allocated vector of jsvals.  Note that the vector
481
 
 * may have length 0 or 1 for full generality, so we need -1 to discriminate
482
 
 * the union.
 
481
 * If count is -1, then u.value contains the single value to root. If count is
 
482
 * -2, then u.marker holds a mark hook that is executed to mark the values.
 
483
 * Otherwise u.array points to a stack-allocated vector of jsvals.  Note that
 
484
 * the vector may have length 0 or 1 for full generality, so we need -1 to
 
485
 * discriminate the union.
483
486
 *
484
487
 * To root a single GC-thing pointer, which need not be tagged and stored as a
485
488
 * jsval, use JS_PUSH_SINGLE_TEMP_ROOT.  The (jsval)(val) cast works because a
495
498
 * internal API (see further below) instead.
496
499
 */
497
500
struct JSTempValueRooter {
498
 
    JSTempValueRooter   *down;
499
 
    jsint               count;
 
501
    JSTempValueRooter       *down;
 
502
    jsint                   count;
500
503
    union {
501
 
        jsval           value;
502
 
        jsval           *array;
 
504
        jsval               value;
 
505
        jsval               *array;
 
506
        JSTempValueMarker   marker;
503
507
    } u;
504
508
};
505
509
 
 
510
 
506
511
#define JS_PUSH_TEMP_ROOT_COMMON(cx,tvr)                                      \
507
512
    JS_BEGIN_MACRO                                                            \
508
513
        JS_ASSERT((cx)->tempValueRooters != (tvr));                           \
524
529
        (tvr)->u.array = (arr);                                               \
525
530
    JS_END_MACRO
526
531
 
 
532
#define JS_PUSH_TEMP_ROOT_MARKER(cx,marker_,tvr)                              \
 
533
    JS_BEGIN_MACRO                                                            \
 
534
        JS_PUSH_TEMP_ROOT_COMMON(cx, tvr);                                    \
 
535
        (tvr)->count = -2;                                                    \
 
536
        (tvr)->u.marker = (marker_);                                          \
 
537
    JS_END_MACRO
 
538
 
527
539
#define JS_POP_TEMP_ROOT(cx,tvr)                                              \
528
540
    JS_BEGIN_MACRO                                                            \
529
541
        JS_ASSERT((cx)->tempValueRooters == (tvr));                           \