diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2019-01-11 19:27:20 +0000 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2019-01-29 23:06:10 +0000 |
commit | a3d232b697dfc7c8833fc1855abbc190fe0d5970 (patch) | |
tree | fb02e9d3383f6342944fc4f2cd494ea86d42a92a /src/mongo/scripting/mozjs/jscustomallocator.cpp | |
parent | 941c4fbab21029e3bbe577d953250116cd0e8533 (diff) | |
download | mongo-a3d232b697dfc7c8833fc1855abbc190fe0d5970.tar.gz |
SERVER-29286 import and use mozjs-60
Diffstat (limited to 'src/mongo/scripting/mozjs/jscustomallocator.cpp')
-rw-r--r-- | src/mongo/scripting/mozjs/jscustomallocator.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mongo/scripting/mozjs/jscustomallocator.cpp b/src/mongo/scripting/mozjs/jscustomallocator.cpp index d2d8741bca6..b74fbcdac7b 100644 --- a/src/mongo/scripting/mozjs/jscustomallocator.cpp +++ b/src/mongo/scripting/mozjs/jscustomallocator.cpp @@ -258,16 +258,6 @@ void* js_realloc(void* p, size_t bytes) { [](void* ptr, size_t b) { return std::realloc(ptr, b); }, p, bytes); } -char* js_strdup(const char* s) { - size_t bytes = std::strlen(s) + 1; +void js::InitMallocAllocator() {} - char* new_s = static_cast<char*>(js_malloc(bytes)); - - if (!new_s) { - return nullptr; - } - - std::memcpy(new_s, s, bytes); - - return new_s; -} +void js::ShutDownMallocAllocator() {} |