diff options
author | Jason Carey <jcarey@argv.me> | 2015-10-06 20:23:08 -0400 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2015-10-06 20:26:14 -0400 |
commit | 8d65462cd4b56fd12d3fbe8799ee78be677bae38 (patch) | |
tree | f86313611afb4c9e4e5e04238f0e88f830ed49c2 /src/mongo/scripting/mozjs/objectwrapper.h | |
parent | 95060c27ed2dddcb6343a88f7aa405ed8a935ad7 (diff) | |
download | mongo-8d65462cd4b56fd12d3fbe8799ee78be677bae38.tar.gz |
SERVER-19977 Offer a stack based JSStringWrapper
Small string optimization for encoding utf8 strings from JS strings on
the stack. Additions to the api to use on stack buffers.
Diffstat (limited to 'src/mongo/scripting/mozjs/objectwrapper.h')
-rw-r--r-- | src/mongo/scripting/mozjs/objectwrapper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/scripting/mozjs/objectwrapper.h b/src/mongo/scripting/mozjs/objectwrapper.h index efc8039bf26..4463cd99c98 100644 --- a/src/mongo/scripting/mozjs/objectwrapper.h +++ b/src/mongo/scripting/mozjs/objectwrapper.h @@ -35,6 +35,7 @@ #include "mongo/platform/decimal128.h" #include "mongo/scripting/mozjs/exception.h" #include "mongo/scripting/mozjs/internedstring.h" +#include "mongo/scripting/mozjs/jsstringwrapper.h" #include "mongo/scripting/mozjs/lifetimestack.h" namespace mongo { @@ -85,6 +86,7 @@ public: void define(JSContext* cx, JS::HandleObject o, JS::HandleValue value, unsigned attrs); void del(JSContext* cx, JS::HandleObject o); std::string toString(JSContext* cx); + StringData toStringData(JSContext* cx, JSStringWrapper* jsstr); union { const char* _field; |