~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to deps/v8/src/global-handles.cc

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
      VMState state(isolate, EXTERNAL);
233
233
      func(object, par);
234
234
    }
235
 
    // Absense of explicit cleanup or revival of weak handle
 
235
    // Absence of explicit cleanup or revival of weak handle
236
236
    // in most of the cases would lead to memory leak.
237
237
    ASSERT(state_ != NEAR_DEATH);
238
238
    return true;
384
384
    : isolate_(isolate),
385
385
      number_of_weak_handles_(0),
386
386
      number_of_global_object_weak_handles_(0),
 
387
      number_of_global_handles_(0),
387
388
      first_block_(NULL),
388
389
      first_used_block_(NULL),
389
390
      first_free_(NULL),
403
404
 
404
405
Handle<Object> GlobalHandles::Create(Object* value) {
405
406
  isolate_->counters()->global_handles()->Increment();
 
407
  number_of_global_handles_++;
406
408
  if (first_free_ == NULL) {
407
409
    first_block_ = new NodeBlock(first_block_);
408
410
    first_block_->PutNodesOnFreeList(&first_free_);
423
425
 
424
426
void GlobalHandles::Destroy(Object** location) {
425
427
  isolate_->counters()->global_handles()->Decrement();
 
428
  number_of_global_handles_--;
426
429
  if (location == NULL) return;
427
430
  Node::FromLocation(location)->Release(this);
428
431
}
445
448
}
446
449
 
447
450
 
 
451
bool GlobalHandles::IsIndependent(Object** location) {
 
452
  return Node::FromLocation(location)->is_independent();
 
453
}
 
454
 
 
455
 
448
456
bool GlobalHandles::IsNearDeath(Object** location) {
449
457
  return Node::FromLocation(location)->IsNearDeath();
450
458
}
459
467
  Node::FromLocation(location)->set_wrapper_class_id(class_id);
460
468
}
461
469
 
 
470
uint16_t GlobalHandles::GetWrapperClassId(Object** location) {
 
471
  return Node::FromLocation(location)->wrapper_class_id();
 
472
}
462
473
 
463
474
void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) {
464
475
  for (NodeIterator it(this); !it.done(); it.Advance()) {