diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-06-27 19:15:03 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-06-28 16:12:33 -0700 |
| commit | 49a8cb34d2b6e3f7af4a7cbe842fe48ffa0245eb (patch) | |
| tree | fb74a37b34ec7334f273e1bc59c18d2daf439583 /src/rt/rust_dom.cpp | |
| parent | f6f945fed5c8d1061d80b444331910df29afa392 (diff) | |
| download | rust-49a8cb34d2b6e3f7af4a7cbe842fe48ffa0245eb.tar.gz rust-49a8cb34d2b6e3f7af4a7cbe842fe48ffa0245eb.zip | |
Removed dom_owned, splitting things between task_owned and kernel_owned. Had to re-xfail a few tests brson recently un-xfailed.
Diffstat (limited to 'src/rt/rust_dom.cpp')
| -rw-r--r-- | src/rt/rust_dom.cpp | 68 |
1 files changed, 2 insertions, 66 deletions
diff --git a/src/rt/rust_dom.cpp b/src/rt/rust_dom.cpp index 65ccf158b64..d89cb181fb8 100644 --- a/src/rt/rust_dom.cpp +++ b/src/rt/rust_dom.cpp @@ -10,8 +10,6 @@ rust_dom::rust_dom(rust_kernel *kernel, _log(srv, this), log_lvl(log_note), srv(srv), - local_region(&srv->local_region), - synchronized_region(&srv->synchronized_region), name(name), newborn_tasks(this, "newborn"), running_tasks(this, "running"), @@ -36,6 +34,7 @@ rust_dom::rust_dom(rust_kernel *kernel, rust_dom::~rust_dom() { DLOG(this, dom, "~rust_dom %s @0x%" PRIxPTR, name, (uintptr_t)this); + newborn_tasks.delete_all(); running_tasks.delete_all(); blocked_tasks.delete_all(); @@ -75,69 +74,6 @@ rust_dom::fail() { rval = 1; } -void * -rust_dom::malloc(size_t size) { - return malloc(size, memory_region::LOCAL); -} - -void * -rust_dom::malloc(size_t size, memory_region::memory_region_type type) { - if (type == memory_region::LOCAL) { - return local_region.malloc(size); - } else if (type == memory_region::SYNCHRONIZED) { - return synchronized_region.malloc(size); - } - I(this, false); - return NULL; -} - -void * -rust_dom::calloc(size_t size) { - return calloc(size, memory_region::LOCAL); -} - -void * -rust_dom::calloc(size_t size, memory_region::memory_region_type type) { - if (type == memory_region::LOCAL) { - return local_region.calloc(size); - } else if (type == memory_region::SYNCHRONIZED) { - return synchronized_region.calloc(size); - } - return NULL; -} - -void * -rust_dom::realloc(void *mem, size_t size) { - return realloc(mem, size, memory_region::LOCAL); -} - -void * -rust_dom::realloc(void *mem, size_t size, - memory_region::memory_region_type type) { - if (type == memory_region::LOCAL) { - return local_region.realloc(mem, size); - } else if (type == memory_region::SYNCHRONIZED) { - return synchronized_region.realloc(mem, size); - } - return NULL; -} - -void -rust_dom::free(void *mem) { - free(mem, memory_region::LOCAL); -} - -void -rust_dom::free(void *mem, memory_region::memory_region_type type) { - DLOG(this, mem, "rust_dom::free(0x%" PRIxPTR ")", mem); - if (type == memory_region::LOCAL) { - local_region.free(mem); - } else if (type == memory_region::SYNCHRONIZED) { - synchronized_region.free(mem); - } - return; -} - #ifdef __WIN32__ void rust_dom::win32_require(LPCTSTR fn, BOOL ok) { @@ -372,7 +308,7 @@ rust_dom::get_cache() { rust_task * rust_dom::create_task(rust_task *spawner, const char *name) { rust_task *task = - new (this) rust_task (this, &newborn_tasks, spawner, name); + new (this->kernel) rust_task (this, &newborn_tasks, spawner, name); DLOG(this, task, "created task: " PTR ", spawner: %s, name: %s", task, spawner ? spawner->name : "null", name); newborn_tasks.append(task); |
